/* Calculadora de Pirâmide - Estilos CSS */

/* Reset e configurações gerais */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Acessibilidade - Ocultar visualmente mas manter para leitores de tela */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Container principal da pirâmide */
.pyramid-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    margin: 2rem 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pyramid-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* Ícone da pirâmide */
.pyramid-icon {
    font-size: 3rem;
    color: #d4a574;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
}

.breadcrumb-item a {
    color: #d4a574;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #c89d60;
    text-decoration: underline;
}

/* Headers semânticos */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

/* Cards de resultado */
.result-card {
    background: #f8f9fa;
    border-left: 4px solid #d4a574;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 0 8px 8px 0;
    transition: all 0.3s ease;
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.result-card:hover {
    background: #f0f0f0;
    border-left-color: #c89d60;
    transform: translateX(5px);
}

.result-card h5, .result-card h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Grid de dimensões */
.dimension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Botão da pirâmide */
.btn-pyramid {
    background: linear-gradient(45deg, #d4a574, #e6c39a);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.btn-pyramid:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 165, 116, 0.4);
    color: white;
    background: linear-gradient(45deg, #c89d60, #d4a574);
}

.btn-pyramid:active {
    transform: translateY(0);
}

.btn-pyramid:focus {
    outline: 2px solid #d4a574;
    outline-offset: 2px;
}

/* Navbar */
.navbar-brand {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.navbar {
    background: linear-gradient(45deg, #2c3e50, #3498db) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #d4a574 !important;
}

/* Badge do ângulo */
.angle-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(238, 90, 36, 0.3);
}

/* Inputs de dimensões */
.dimension-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.dimension-input:focus {
    border-color: #d4a574;
    box-shadow: 0 0 0 0.2rem rgba(212, 165, 116, 0.25);
    outline: none;
}

.dimension-input:invalid {
    border-color: #dc3545;
}

.dimension-input:valid {
    border-color: #28a745;
}

/* Labels */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Form text helpers */
.form-text {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Alertas */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.alert-info {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
}

.alert-danger {
    background: linear-gradient(45deg, #ff7675, #d63031);
    color: white;
}

/* Footer */
footer {
    background: rgba(44, 62, 80, 0.1);
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 2rem;
}

/* Figuras e caption */
figure {
    margin: 0;
}

figcaption {
    text-align: center;
    font-style: italic;
}

/* SVG Diagrams */
svg {
    max-width: 100%;
    height: auto;
}

/* Listas */
ul {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Links */
a {
    color: #d4a574;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #c89d60;
    text-decoration: underline;
}

/* Estados de focus para acessibilidade */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #d4a574;
    outline-offset: 2px;
}

/* Melhorias para telas pequenas */
@media (max-width: 768px) {
    .pyramid-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .pyramid-icon {
        font-size: 2rem;
    }
    
    .dimension-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-pyramid {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .pyramid-icon {
        font-size: 1.5rem;
    }
    
    .pyramid-container {
        padding: 0.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pyramid-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de loading */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #d4a574;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pyramid-container {
        border: 2px solid #000;
    }
    
    .btn-pyramid {
        border: 2px solid #000;
    }
    
    .result-card {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Será implementado conforme necessário */
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .pyramid-container {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
    }
    
    /* Evitar quebra de página em elementos importantes */
    .result-card,
    figure {
        page-break-inside: avoid;
    }
}
