/* ==========================================================================
   MUSEU DE MORFOLOGIA DA UNIVERSIDADE FEDERAL DO TOCANTINS (UFT)
   Estilos Institucionais, Acessibilidade e Tipografia Museológica
   ========================================================================== */

/* 1. Base e Tipografia Nobre Acessível (Paleta Oficial Museu Morfologia UFT) */
:root {
    --color-porcelain: #FDFFFC;
    --color-baltic: #235789;
    --color-baltic-dark: #1A436B;
    --color-baltic-light: #2E6FAE;
    --color-flag-red: #C1292E;
    --color-flag-red-dark: #9E1F24;
    --color-bright-gold: #F1D302;
    --color-bright-gold-dark: #D4B800;
    --color-true-black: #020100;

    /* Aliases Institucionais */
    --color-primary: #235789;
    --color-primary-dark: #1A436B;
    --color-primary-light: #2E6FAE;
    --color-terracotta: #C1292E;
    --color-terracotta-dark: #9E1F24;
    --color-amber-uft: #F1D302;
    --color-amber-uft-dark: #D4B800;
    --color-museum-bg: #FDFFFC;
    --color-museum-card: #FFFFFF;
    --color-text-main: #020100;
    --color-text-muted: #374151;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--color-text-main);
    background-color: var(--color-museum-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: inherit;
    font-weight: 800;
    line-height: 1.25;
}

/* 2. Barra Governamental de Acessibilidade (e-MAG) */
.accessibility-bar {
    background-color: var(--color-primary-dark);
    color: #F3F4F6;
    font-size: 14px;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--color-amber-uft);
}

.accessibility-bar a, 
.accessibility-bar button {
    color: #F9FAFB;
    text-decoration: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.accessibility-bar button:hover, 
.accessibility-bar a:hover,
.accessibility-bar button:focus,
.accessibility-bar a:focus {
    background: var(--color-amber-uft);
    color: #111827;
    outline: none;
}

/* 3. Header & Navegação Institucional */
.site-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.nav-link {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    padding: 8px 12px;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover, .nav-link:focus {
    color: var(--color-primary);
    background-color: rgba(22, 78, 61, 0.05);
}

/* 4. Botões Museológicos */
.btn-museum-primary {
    background-color: var(--color-primary);
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(22, 78, 61, 0.2);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-museum-primary:hover, .btn-museum-primary:focus {
    background-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(22, 78, 61, 0.3);
}

.btn-museum-terracotta {
    background-color: var(--color-terracotta);
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(179, 71, 45, 0.2);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-museum-terracotta:hover, .btn-museum-terracotta:focus {
    background-color: var(--color-terracotta-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(179, 71, 45, 0.3);
}

.btn-museum-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-museum-outline:hover, .btn-museum-outline:focus {
    background-color: var(--color-primary);
    color: #FFFFFF;
}

/* 5. Reprodutor de Audioguia Ergonômico */
.museu-audio-player {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin: 18px 0;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.audio-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    flex-shrink: 0;
}

.audio-play-btn:hover {
    background: var(--color-primary-dark);
    transform: scale(1.05);
}

.audio-progress-bar {
    flex: 1;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.audio-progress-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    width: 0%;
}

.audio-speed-btn {
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.2s;
}

.audio-speed-btn:hover {
    background: #E5E7EB;
}

/* 6. Visualizador 3D */
.model-3d-wrapper {
    width: 100%;
    height: 480px;
    background: radial-gradient(circle, #FFFFFF 0%, #F3F4F6 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid #E5E7EB;
}

model-viewer {
    width: 100%;
    height: 100%;
}

.model-3d-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(10, 38, 29, 0.88);
    color: white;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

/* 7. Modo Visita Presencial */
.modo-presencial-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px;
    background: #FFFFFF;
    min-height: 100vh;
}

/* 8. Foco Acessível Universal */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--color-bright-gold);
    outline-offset: 2px;
}

/* 9. Banner Rotativo de Notícias (Hero Slider) */
.news-hero-slider {
    position: relative;
    width: 100%;
    min-height: 480px;
    border-radius: 24px;
    overflow: hidden;
    background-color: var(--color-true-black);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .news-hero-slider {
        min-height: 520px;
    }
}

.news-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
}

@media (min-width: 768px) {
    .news-slider-track {
        min-height: 520px;
    }
}

/* Botões da Identidade Visual Oficial */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-flag-red, #C1292E);
    color: #FDFFFC !important;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(193, 41, 46, 0.28);
    border: none;
    cursor: pointer;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--color-flag-red-dark, #9E1F24);
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(193, 41, 46, 0.38);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-baltic, #235789);
    color: #FDFFFC !important;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--color-baltic-dark, #1A436B);
    color: #FFFFFF !important;
}

.btn-terracotta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-flag-red, #C1292E) !important;
    color: #FDFFFC !important;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(193, 41, 46, 0.28);
    border: none;
    cursor: pointer;
}
.btn-terracotta:hover, .btn-terracotta:focus {
    background-color: var(--color-flag-red-dark, #9E1F24) !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(193, 41, 46, 0.38);
}

.bg-gradient-baltic {
    background: linear-gradient(135deg, #235789 0%, #1A436B 100%) !important;
}

/* Classes utilitárias com garantia estrita de contraste */
.bg-porcelana { background-color: #FDFFFC !important; }
.text-porcelana { color: #FDFFFC !important; }

.bg-azul { background-color: #235789 !important; }
.text-azul { color: #235789 !important; }
.border-azul { border-color: #235789 !important; }
.bg-primary-dark { background-color: #1A436B !important; }
.bg-primary { background-color: #235789 !important; }
.text-primary { color: #235789 !important; }

.bg-vermelho { background-color: #C1292E !important; }
.text-vermelho { color: #C1292E !important; }
.border-vermelho { border-color: #C1292E !important; }
.bg-terracotta { background-color: #C1292E !important; }
.hover\:bg-terracotta-dark:hover { background-color: #9E1F24 !important; }

.bg-ouro { background-color: #F1D302 !important; }
.text-ouro { color: #F1D302 !important; }
.border-ouro { border-color: #F1D302 !important; }
.border-amberUft { border-color: #F1D302 !important; }
.bg-amberUft { background-color: #F1D302 !important; }

.bg-preto { background-color: #020100 !important; }
.text-preto { color: #020100 !important; }

.news-slide-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 1;
}

.news-slide-item.active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
}

.news-slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transform: scale(1.02);
    transition: transform 6s ease-out;
}

.news-slide-item.active .news-slide-bg {
    transform: scale(1);
}

.news-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 1, 0, 0.95) 0%, rgba(35, 87, 137, 0.6) 50%, rgba(2, 1, 0, 0.3) 100%);
    z-index: 1;
}

.news-slide-content {
    position: relative;
    z-index: 2;
    padding: 32px 24px;
    max-width: 860px;
}

@media (min-width: 768px) {
    .news-slide-content {
        padding: 48px 40px;
    }
}

.news-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(2, 1, 0, 0.6);
    color: #FDFFFC;
    border: 1px solid rgba(253, 255, 252, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.news-slider-arrow:hover,
.news-slider-arrow:focus {
    background: var(--color-flag-red);
    color: #FFFFFF;
    border-color: var(--color-flag-red);
}

.news-slider-prev {
    left: 16px;
}

.news-slider-next {
    right: 16px;
}

.news-slider-dots {
    position: absolute;
    bottom: 20px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.news-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: rgba(253, 255, 252, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.news-dot.active {
    width: 28px;
    background: var(--color-bright-gold);
}

/* 10. Referência Cruzada (Cards Relacionais Blog ⇄ Acervo) */
.cross-ref-container {
    background: #FDFFFC;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    padding: 24px;
    margin-top: 36px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.cross-ref-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-baltic);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #F3F4F6;
    padding-bottom: 10px;
}

