@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary-blue: #001552;
    --accent-red: #c41e3a;
    --accent-green: #2d5a27;
    --bg-cream: #f5e1a8;
    --text-dark: #333;
    --text-light: #666;
    --light-gray: #f0f2f5;
    --white: #ffffff;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-dark);
    background-color: #fcfcfc;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* HEADER - FIXO NO TOPO */
header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 12px 0; /* Respiro vertical equilibrado */
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem; /* Removido padding vertical para usar a altura do container */
    display: flex;
    justify-content: space-between;
    align-items: center; /* Centraliza verticalmente logo e menu */
    flex-wrap: nowrap;
    gap: 2rem;
    min-height: 60px; /* Altura mínima garantida */
}

.logo-section-container {
    display: flex;
    align-items: center; /* Centraliza verticalmente os itens internos */
    gap: 1.2rem;
    flex: 1;
    height: 100%; /* Ocupa toda a altura disponível */
}

.logo-link-hd {
    display: block;
    transition: transform 0.3s ease;
}

.logo-link-hd:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary-blue);
    padding: 2px;
    background: white;
}

.logo-text-link {
    text-decoration: none;
    color: var(--primary-blue);
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 500;
}

/* NAVEGAÇÃO - MENU HAMBÚRGUER MOBILE */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-blue);
    padding: 0.5rem;
}

nav {
    display: none; /* Oculta o menu por padrão em mobile */
    gap: 1.2rem;
    align-items: center;
}

nav.active { /* Exibe o menu quando a classe 'active' é adicionada pelo JS */
    display: flex;
}

@media (min-width: 1024px) { /* Exibe o menu sempre em desktop */
    nav {
        display: flex !important;
        flex-basis: auto;
        order: 2;
    }
    .header-top {
        flex-wrap: nowrap;
    }
    .logo-section-container {
        flex: 0 0 auto;
    }
    .menu-toggle {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .header-top {
        flex-wrap: nowrap; /* Mantém logo e menu na mesma linha no mobile */
        padding: 0 1rem;
        min-height: 50px;
    }
    header {
        padding: 10px 0; /* Respiro vertical simétrico no mobile */
    }
    
    .logo-section-container {
        gap: 0.8rem;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
    }

    .logo-text h1 {
        font-size: 1.1rem;
    }

    .logo-text p {
        font-size: 0.65rem;
    }

    .menu-toggle {
        display: block !important;
        font-size: 1.8rem;
        order: 2;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        gap: 0;
        padding: 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid #eee;
        display: none !important; /* Oculta por padrão */
    }

    nav.active {
        display: flex !important;
    }

    nav a {
        padding: 1.2rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #f5f5f5;
        font-size: 1rem;
        white-space: normal; /* No mobile pode quebrar linha se necessário */
    }
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.8rem; /* Reduzido para caber tudo em uma linha */
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    nav {
        gap: 0.6rem !important; /* Espaçamento menor entre links no desktop */
    }
}

nav a:hover,
nav a:active {
    color: var(--primary-blue);
    border-bottom-color: var(--accent-red);
}

/* CARROSSEL */
.carousel-section {
    margin-top: 65px;
    background-color: #000;
    padding: 0 !important;
}

@media (max-width: 1023px) {
    .carousel-section {
        margin-top: 75px; /* Ajuste fino para mobile com novo header */
    }
}

.carousel-container {
    position: relative;
    max-width: 100%;
    height: 500px;
    margin: auto;
    overflow: hidden;
}

@media (max-width: 768px) {
    .carousel-container {
        height: 350px;
    }
    .carousel-caption h2 {
        font-size: 1.6rem;
    }
    .carousel-caption p {
        font-size: 0.9rem;
    }
}

.carousel-slide {
    display: none;
    height: 100%;
    width: 100%;
    position: relative;
}

.carousel-slide.active {
    display: block;
    animation: fade 1s ease-in-out;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.carousel-caption {
    position: absolute;
    bottom: 20%;
    left: 10%;
    right: 10%;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.2rem;
    font-weight: 500;
}

.carousel-prev, .carousel-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
    border: none;
    z-index: 10;
}

.carousel-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.carousel-prev:hover, .carousel-next:hover {
    background-color: rgba(0,0,0,0.8);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: white;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* BUSCA DISCRETA */
.search-section-discreet {
    padding: 2rem 0 !important; /* Busca discreta tem padding próprio */
    background-color: var(--white);
    border-bottom: 1px solid var(--light-gray);
}

.search-box-discreet {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: var(--light-gray);
    border-radius: 30px;
    padding: 5px 5px 5px 15px;
    align-items: center;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

@media (max-width: 480px) {
    .search-box-discreet {
        padding: 2px 2px 2px 12px;
    }
    .search-box-discreet input {
        font-size: 0.9rem;
    }
    .search-box-discreet button {
        width: 38px;
        height: 38px;
    }
}

.search-box-discreet:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.search-box-discreet input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 1rem;
    outline: none;
    color: var(--text-dark);
}

.search-box-discreet button {
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box-discreet button:hover {
    background: var(--accent-red);
}

/* CONTAINER GERAL */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* SEÇÕES */
section, .main-content {
    padding: 5rem 1rem 6rem !important; /* Respiro equilibrado: reduzido pela metade conforme solicitado */
    background-color: var(--white);
    margin-bottom: 0;
    display: block;
    width: 100%;
}

/* Garante que a primeira seção de cada página tenha um respiro extra em relação ao header fixo */
section:first-of-type {
    margin-top: 85px; /* Aumentado para compensar o novo padding do header */
    padding-top: 3rem;
}



section:nth-child(even) {
    background-color: var(--light-gray);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-top: 1rem;
    margin-bottom: 4rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--accent-red);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

/* GRID DE CARDS - OTIMIZADO PARA MOBILE */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

@media (hover: hover) {
    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    }
}

.card-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
}

.card-content {
    padding: 1.2rem;
}

.card-content h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.card-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.card-link {
    display: inline-block;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.card-link:active {
    color: var(--accent-red);
}

@media (hover: hover) {
    .card-link:hover {
        color: var(--accent-red);
    }
}

/* ÍCONES DE ACESSO RÁPIDO */
.quick-access {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .quick-access {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .quick-access {
        grid-template-columns: repeat(8, 1fr);
    }
}

.quick-access-item {
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s;
    padding: 0.5rem;
}

.quick-access-item:active {
    transform: scale(0.95);
}

@media (hover: hover) {
    .quick-access-item:hover {
        transform: scale(1.08);
    }
}

.quick-access-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 0.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(0,21,82,0.15);
}

.quick-access-item p {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.3;
}

/* FOOTER */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 2.5rem 1rem;
    text-align: center;
}

footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

footer a {
    color: var(--white);
    text-decoration: none;
}

footer a:hover {
    opacity: 1 !important;
    text-decoration: underline;
}

.social-icons {
    margin-bottom: 3rem !important; /* Aumenta o respiro entre os ícones e o bloco azul abaixo */
}

.social-icons a {
    font-size: 1.4rem;
    color: var(--white);
    opacity: 0.8;
    transition: all 0.3s ease;
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

@media (max-width: 480px) {
    .social-icons {
        gap: 0.8rem !important;
    }
    .social-icons a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 1.2rem;
    }
}

.social-icons a:hover {
    opacity: 1;
    transform: translateY(-3px);
    color: var(--bg-cream);
}

/* PÁGINA ESPECÍFICA - HISTÓRIA */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 40px;
    width: 2px;
    height: calc(100% + 1.5rem);
    background-color: var(--accent-red);
}

.timeline-year {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-red);
    min-width: 80px;
    position: relative;
}

.timeline-year::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--accent-red);
    border-radius: 50%;
    left: 24px;
    top: 5px;
    border: 3px solid var(--white);
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.timeline-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* MAPA TURÍSTICO */
.map-container {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* TABELA DE DADOS */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.data-table th {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 0.8rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 0.8rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:active {
    background-color: rgba(0,21,82,0.05);
}

@media (hover: hover) {
    .data-table tr:hover {
        background-color: var(--light-gray);
    }
}

/* FILTROS */
.filter-bar {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.6rem 1rem;
    border: 2px solid var(--primary-blue);
    background-color: var(--white);
    color: var(--primary-blue);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
    white-space: nowrap;
}

.filter-btn:active {
    transform: scale(0.95);
}

.filter-btn:active,
.filter-btn.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

@media (hover: hover) {
    .filter-btn:hover {
        background-color: var(--primary-blue);
        color: var(--white);
    }
}

/* CAIXA DE ANÚNCIO */
.announcement-box {
    background: linear-gradient(135deg, var(--primary-blue), #003d99);
    color: var(--white);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
    box-shadow: 0 8px 20px rgba(0,21,82,0.15);
}

.announcement-box h3 {
    color: var(--white);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.announcement-box p {
    margin-bottom: 1.2rem;
    opacity: 0.95;
}

.announcement-box a {
    display: inline-block;
    background-color: var(--accent-red);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.announcement-box a:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .announcement-box a:hover {
        background-color: #a01730;
    }
}

/* MODAL DA LOGO */
.logo-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 500px;
    border-radius: 50%; /* Mantém a logo circular no modal */
    animation: zoom 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
}

/* AJUSTES MOBILE ADICIONAIS */
@media (max-width: 640px) {
    section, .main-content {
        padding: 4rem 1rem 6rem !important; /* Padding reduzido para telas pequenas */
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2.5rem;
    }

    .card-image {
        height: 120px;
        font-size: 2rem;
    }

    .quick-access-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .announcement-box {
        padding: 2rem 1rem;
    }
    
    .cta-box {
        padding: 2.5rem 1.5rem;
        margin-top: 2rem;
    }
}

/* SUAVIZAÇÃO DE TRANSIÇÕES PARA MOBILE */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* CLASSES UTILITÁRIAS DE ESPAÇAMENTO */
.subsection-title {
    color: var(--primary-blue);
    margin: 4rem 0 2rem;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-blue), #003d99);
    color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    margin-top: 3rem;
    box-shadow: 0 10px 30px rgba(0, 21, 82, 0.15);
}

.section-subtitle {
    text-align: center;
    margin: -2.5rem auto 3rem;
    max-width: 800px;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.6;
}
