/*
==============================================
--- RESET, FONTES E ESTILOS GLOBAIS ---
==============================================
*/
html {
    scroll-behavior: smooth;
}

body, html { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: #f4f4f4; 
    /* Previne overflow horizontal causado por animações */
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* Melhoria de Acessibilidade: Foco visível */
a:focus-visible, button:focus-visible, input[type="search"]:focus-visible {
    outline: 3px solid #00a89d;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(77, 182, 172, 0.5);
}

/*
==============================================
--- CABEÇALHO ---
==============================================
*/
.new-header {
    position: relative;
    z-index: 2000;
}

.header-top-bar {
    padding: 15px 0;
    /* Caminho da imagem corrigido (removido ../) */
    background-image: url('imagens/rodapeazul.png');
}
.header-top-bar-content { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.header-left { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    /* Garante que o logo e título não sejam espremidos */
    flex-shrink: 0;
}
.header-logo { 
    height: 70px; 
    background-color: rgba(255, 255, 255, 0.9); 
    border-radius: 50%; 
    border: 3px solid #fff; 
}
.header-title { 
    color: #ffffff; 
    font-size: 1.1rem; 
    font-weight: 600; 
}
.header-right { 
    display: flex; 
    align-items: center; 
    gap: 25px; 
}
.header-socials { 
    display: flex; 
    gap: 15px; 
}
.header-socials a { 
    color: #ffffff; 
    font-size: 1.5rem; 
    text-decoration: none; 
    transition: opacity 0.3s; 
}
.header-socials a:hover { 
    opacity: 0.8; 
}
.search-form { 
    position: relative; 
}
.search-input { 
    background-color: #ffffff; 
    border: 2px solid #ffffff; 
    border-radius: 20px; 
    padding: 10px 45px 10px 20px; 
    width: 250px; 
    font-size: 0.9rem; 
    color: #1e4799; 
}
.search-input::placeholder { 
    color: #1e4799; 
    opacity: 0.7; 
}
.search-button { 
    position: absolute; 
    right: 5px; 
    top: 50%; 
    transform: translateY(-50%); 
    background: none; 
    border: none; 
    color: #1e4799; 
    font-size: 1.1rem; 
    cursor: pointer; 
    padding: 5px 10px; 
}

/*
==============================================
--- NAVEGAÇÃO PRINCIPAL (DESKTOP) ---
==============================================
*/
/* Regras duplicadas foram consolidadas aqui */
.header-main-nav { 
    background-color: #0f2c5d;
    position: relative;
}

.header-main-nav > .container > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}
.header-main-nav > .container > ul > li { 
    position: relative;
}
.header-main-nav a { 
    display: block; 
    padding: 15px 0; 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Melhoria: Seta para indicar dropdown no desktop */
.has-dropdown > a::after {
    content: ' \25BC'; /* Código do caractere de seta para baixo */
    font-size: 0.7em;
    display: inline-block;
    margin-left: 5px;
    transition: transform 0.2s ease;
}
.has-dropdown:hover > a::after,
.has-dropdown.active > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #0f2c5d;
    border-top: 2px solid #4db6ac;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 250px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2100;
    /* Animação de entrada */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.has-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.dropdown-menu li a {
    padding: 12px 20px;
    white-space: nowrap;
    transition: background-color 0.3s, padding-left 0.3s;
}

/* Seta não é necessária nos itens do submenu */
.dropdown-menu li a::after {
    display: none;
}

.dropdown-menu li a:hover {
    background-color: #1e4799;
    padding-left: 25px;
}

/*
==============================================
--- BOTÃO HAMBÚRGUER (MOBILE) ---
==============================================
*/
.mobile-menu-toggle {
    display: none; /* Escondido por padrão no desktop */
    background-color: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 2200;
    line-height: 1; /* Alinha os ícones */
}

/* Estilos para os ícones de abrir/fechar */
.mobile-menu-toggle .icon-close {
    display: none;
}
.nav-active .mobile-menu-toggle .icon-open {
    display: none;
}
.nav-active .mobile-menu-toggle .icon-close {
    display: block;
}


/*
==============================================
--- SEÇÃO HERO (BANNER) ---
==============================================
*/
.hero-section {
    position: relative;
    height: 85vh;
    width: 100%;
    /* Caminho da imagem corrigido (removido ' ') */
    background-image: url('imagens/SITE\ NATAL.png'); 
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #ffffff;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Escurecido um pouco para legibilidade */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0 0 30px 0;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/*
==============================================
--- SEÇÃO DE NOTÍCIAS ---
==============================================
*/
main {
    width: 100%;
}

.news-section {
    padding: 60px 0;
    background-color: #f8f9fa;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: #002d56;
    margin-top: 0;
    margin-bottom: 50px;
}

/*
==============================================
--- CARROSSEL DE NOTÍCIAS (SWIPER) ---
==============================================
*/
.news-slider {
    width: 100%;
    padding-bottom: 50px; /* Espaço para a paginação */
}

.swiper-wrapper {
    align-items: stretch; /* Garante que os cards tenham a mesma altura */
}

.swiper-slide {
    height: auto; /* Permite que o card defina a altura */
    display: flex;
}

.news-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%; /* Ocupa 100% do slide */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-image {
    width: 100%;
    height: 450px; /* Altura padrão para desktop */
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que a imagem cubra a área */
    display: block;
}

.card-content {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Faz o conteúdo crescer para preencher o espaço */
}

.card-date {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0 15px 0;
}

.card-button {
    display: inline-block;
    background-color: #005a87;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    align-self: flex-start;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Empurra o botão para o final do card */
}

.card-button:hover {
    background-color: #002d56;
}

/* Navegação e Paginação do Swiper */
.news-slider-navigation {
    /* As setas serão posicionadas sobre o slider */
    width: 100%;
    max-width: 1280px; /* Alinha com o .container + padding */
    position: absolute;
    left: 50%;
    top: 55%; /* Centraliza verticalmente nos cards */
    transform: translateX(-50%);
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none; /* Permite clicar através */
}

.swiper-button-next,
.swiper-button-prev {
    position: static; /* Remove posicionamento absoluto do Swiper */
    transform: none;
    margin: 0;
    color: #002d56;
    background-color: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: background-color 0.3s, color 0.3s;
    pointer-events: all; /* Torna as setas clicáveis */
}
/* Esconde as setas em telas muito pequenas */
@media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}


.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: #002d56;
    color: #ffffff;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

.swiper-pagination {
    position: absolute;
    bottom: 10px; /* Posição na base do slider */
    width: 100%;
}

.swiper-pagination-bullet {
    background-color: #005a87;
    width: 10px;
    height: 10px;
    opacity: 0.5;
    margin: 0 5px;
}

.swiper-pagination-bullet-active {
    background-color: #002d56;
    opacity: 1;
}


/*
==============================================
--- RODAPÉ (FOOTER) ---
==============================================
*/
.site-footer {
    background-color: #002d56;
    color: #a9d4f5;
    padding-top: 60px;
    font-size: 0.95rem;
    /* Caminho da imagem corrigido */
    background-image: url('imagens/rodapeazul.png');
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #4db6ac;
}

.footer-logo {
    max-width: 300px;
    margin-bottom: 20px;
    border-radius: 8px;
    padding: 10px;
}

.footer-about p {
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-socials a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.footer-socials a:hover {
    transform: translateY(-2px);
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #a9d4f5;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    padding-left: 8px;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-contact i {
    color: #4db6ac;
    margin-right: 15px;
    margin-top: 5px;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    background-color: #001f3d;
    padding: 20px 0;
    border-top: 1px solid #004175;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: #8cb6d9;
    font-size: 0.9rem;
}


/*
==============================================
--- ESTILOS RESPONSIVOS ---
==============================================
*/

/* Para tablets e telas menores (992px) */
@media (max-width: 992px) {
    .header-top-bar-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .header-left {
        order: 0; /* Logo e título primeiro */
    }

    .header-right {
        order: 2; /* Busca e sociais por último */
        width: 100%;
        justify-content: space-between;
    }

    .mobile-menu-toggle {
        order: 1; /* Botão do menu entre o logo e a busca */
        display: block; /* Começa a aparecer aqui */
        margin-left: auto; /* Empurra para a direita */
    }

    .search-input {
        width: 100%;
    }

    /* --- Menu Principal (Tablet) --- */
    .header-main-nav > .container > ul {
        /* Esconde o menu de desktop */
        display: none; 
        
        /* Prepara para o layout mobile */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #0f2c5d;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        padding: 10px 0;
        gap: 0;
    }

    /* Mostra o menu quando .nav-active é adicionado via JS */
    .header-main-nav.nav-active > .container > ul {
        display: flex;
    }
    
    .header-main-nav > .container > ul > li {
        text-align: left;
        width: 100%;
    }
    
    .header-main-nav a {
        padding: 12px 20px;
    }

    /* --- Dropdowns (Tablet/Mobile) --- */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background-color: #1e4799; /* Cor de fundo para sub-itens */
        padding-left: 20px;
        min-width: unset;
        border-radius: 0;
        /* Escondido por padrão, aberto via JS com classe .active */
        display: none;
    }
    
    /* Mostra o dropdown quando .active é adicionado via JS */
    .has-dropdown.active > .dropdown-menu {
        display: block;
    }

    /* Indicador de dropdown para mobile */
    .has-dropdown > a::after {
        content: '[+]';
        float: right;
        transform: none;
        font-size: 1rem;
        font-weight: bold;
    }

    .has-dropdown.active > a::after {
        content: '[\2212]'; /* Símbolo de menos */
    }


    /* --- Hero (Tablet) --- */
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }

    /* --- CARDS SWIPER (TABLET) --- */
    .card-image {
        height: 350px; /* Mantido em 350px para telas de tablet */
    }

    /* --- Navegação do Swiper (Tablet) --- */
    .news-slider-navigation {
        top: 50%;
    }
}


/* Para celulares (768px e abaixo) */
@media (max-width: 768px) {
    .header-top-bar-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }

    .header-left {
        gap: 10px;
        flex-grow: 1; /* Permite que o título cresça */
        flex-basis: 60%; /* Ocupa mais espaço */
    }

    .header-logo {
        height: 50px;
        border: 2px solid #fff;
    }

    .header-title {
        font-size: 0.9rem;
        white-space: normal; /* Permite quebra de linha no título */
        line-height: 1.3;
    }
    
    .mobile-menu-toggle {
        flex-basis: auto; /* Tamanho automático */
    }

    /* --- CORREÇÃO DO LAYOUT MOBILE DO HEADER --- */
    .header-right {
        display: flex;
        flex-direction: row;    
        flex-wrap: nowrap;      /* CORREÇÃO: Impede a quebra de linha */
        justify-content: center;
        align-items: center; 
        order: 2;
        width: 100%;
        margin-top: 15px;
        gap: 15px; 
    }

    .header-socials {
        flex: 0 0 auto; /* Não cresce nem encolhe, mantém o tamanho original */
    }
    
    .search-form {
        flex: 1 1 50%;   /* Cresce e ocupa o espaço restante */
        max-width: 400px; 
    }
    
    .search-input {
        width: 100%; /* Ocupa 100% do .search-form */
    }
    /* --- FIM DA CORREÇÃO --- */


    /* --- Seção Hero (Mobile) --- */
    .hero-section {
        height: 70vh; 
    }

    .hero-title {
        font-size: 2.2rem; 
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1.1rem; 
        margin-bottom: 40px;
    }

    /* --- CARDS SWIPER (CELULAR) --- */
    .card-image {
        /* *** NOVO AJUSTE: Usando altura relativa à tela (viewport height) *** */
        height: 55vh; 
    }
    
    /* --- Seção de Notícias (Mobile) --- */
    .news-section {
        padding: 40px 0;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .news-slider-navigation {
        display: none; /* Esconde as setas no celular */
    }


    /* --- Rodapé (Mobile) --- */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-contact p {
        justify-content: center;
        text-align: left; /* Mantém o texto do endereço alinhado */
    }
    
    .footer-contact i {
        margin-top: 4px; /* Ajuste fino */
    }
}