/* ==========================================================================
   VARIÁVEIS E RESET
   ========================================================================== */
:root {
    --azul-sindbares: #2B3384; /* Azul clássico da logo */
    --texto-escuro: #333333;
    --texto-claro: #666666;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; color: var(--texto-escuro); background: #fff; }
a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ==========================================================================
   CABEÇALHO E NAVEGAÇÃO
   ========================================================================== */
.header {
    background: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    max-height: 100px; 
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-menu a {
    color: var(--texto-escuro);
    font-size: 15px;
    margin-left: 30px;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

/* Efeito Hover Moderno (Linha animada em azul) */
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    bottom: 0;
    left: 0;
    background: var(--azul-sindbares);
    transition: width 0.3s ease;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--azul-sindbares);
}

.nav-menu a:hover::after, .nav-menu a.active::after {
    width: 100%;
}

/* ==========================================================================
   HERO SLIDER (Banner da Home)
   ========================================================================== */
.hero-slider {
    position: relative;
    height: 55vh; 
    min-height: 450px;
    overflow: hidden; 
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out; 
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-content {
    color: #fff;
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 3rem; 
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 600px;
    margin-bottom: 30px;
}

/* Botões Globais */
.btn-primary {
    background-color: var(--azul-sindbares);
    color: #fff;
    padding: 12px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #1a1f54;
}

.btn-white {
    background-color: #fff;
    color: var(--azul-sindbares);
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
    transition: background 0.3s;
}

.btn-white:hover {
    background-color: #f1f1f1;
}

/* ==========================================================================
   SEÇÃO DOS 4 ÍCONES (Home)
   ========================================================================== */
.icons-section {
    padding: 80px 0 100px 0;
    background: #fff;
}

.icons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.icon-card i {
    font-size: 50px;
    color: var(--azul-sindbares);
    margin-bottom: 20px;
}

.icon-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
}

.icon-card p {
    font-size: 0.9rem;
    color: var(--texto-claro);
    line-height: 1.5;
}

/* ==========================================================================
   SEÇÃO DE CHAMADA (Fundo Azul com Recorte)
   ========================================================================== */
.news-cta-section {
    background-color: var(--azul-sindbares);
    padding: 100px 0;
    color: #fff;
    clip-path: polygon(50% 5%, 100% 0, 100% 95%, 50% 100%, 0 95%, 0 0);
    margin-top: -50px; 
}

.text-center { text-align: center; }

.news-cta-section h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

/* ==========================================================================
   PÁGINA DE CONTATO E RODAPÉ
   ========================================================================== */
.contact-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.info-item {
    margin-bottom: 25px;
}

.info-item h4 {
    color: var(--azul-sindbares);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.info-item p {
    color: var(--texto-claro);
    line-height: 1.6;
}

.info-item a {
    color: var(--texto-claro);
    transition: 0.3s;
}

.info-item a:hover {
    color: var(--azul-sindbares);
    text-decoration: underline;
}

.contact-map iframe {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#footer {
    background-color: #1A1A1A; 
    color: #CCCCCC;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.6;
}

#footer p {
    margin-bottom: 5px;
}

/* ==========================================================================
   PÁGINAS INTERNAS (Cabeçalhos padrão)
   ========================================================================== */
.page-header {
    background-color: var(--azul-sindbares);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

.content-section {
    padding: 60px 0;
    background-color: #fff;
}

/* ==========================================================================
   PÁGINA: BENEFÍCIOS E HOMOLOGAÇÃO
   ========================================================================== */
.benefits-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.benefit-card-large {
    display: flex;
    gap: 20px;
    background: #fdfdfd;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.benefit-icon i { font-size: 40px; color: var(--azul-sindbares); }
.benefit-text h3 { margin-bottom: 10px; font-size: 1.3rem; }
.benefit-text p { color: var(--texto-claro); line-height: 1.6; font-size: 0.95rem; }

.cta-box {
    text-align: center;
    background: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.cta-box h3 { margin-bottom: 10px; color: var(--azul-sindbares); }
.cta-box p { margin-bottom: 20px; color: var(--texto-claro); }

.alert-box {
    display: flex;
    gap: 15px;
    background-color: #FEF2F2;
    border-left: 5px solid #DC2626;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 40px;
}

.alert-icon i { color: #DC2626; font-size: 24px; }
.alert-content p { color: #991B1B; margin-top: 5px; }

.homologacao-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.check-list { list-style: none; }
.check-list li { margin-bottom: 12px; color: var(--texto-claro); display: flex; align-items: center; gap: 10px; }
.check-list i { color: #059669; }

.sidebar-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.sidebar-card h3 { margin-bottom: 15px; border-bottom: 2px solid var(--azul-sindbares); padding-bottom: 10px; }
.btn-secondary {
    background: #fff; border: 1px solid var(--azul-sindbares); color: var(--azul-sindbares);
    padding: 10px 20px; border-radius: 30px; font-weight: 600; transition: 0.3s;
}
.btn-secondary:hover { background: var(--azul-sindbares); color: #fff; }

/* ==========================================================================
   PÁGINA: NOTÍCIAS E BARRA DE PESQUISA
   ========================================================================== */
.news-search-container {
    margin-bottom: 30px;
    text-align: center;
}

#searchBar {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 2px solid var(--azul-sindbares);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
}

.news-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: #fff;
    border: 1px solid #ddd;
    color: var(--texto-claro);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: 0.3s;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--azul-sindbares);
    color: #fff;
    border-color: var(--azul-sindbares);
}

.avisos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Mantém o tamanho fixo dos cards */
    gap: 30px;
    margin-top: 40px;
    align-items: start;
}

.aviso-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: transform 0.3s ease;
    width: 100%;
}

.aviso-item:hover {
    transform: translateY(-5px);
}

.news-image {
    width: 100%;
    height: 500px; /* Altura corrigida para não esticar */
    border-bottom: 3px solid var(--azul-sindbares);
    object-fit: cover; 
    object-position: center;
}

.news-content { padding: 25px; }

.aviso-data {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #b0415a;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-content h3 { margin-bottom: 15px; color: var(--texto-escuro); font-size: 1.2rem; }
.news-content p { font-size: 0.95rem; color: var(--texto-claro); line-height: 1.6; }

/* Classe utilitária para a pesquisa em tempo real */
.hidden {
    display: none !important;
}

/* ==========================================================================
   PÁGINA: CCTs (PDFs)
   ========================================================================== */
.ccts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    justify-content: center;
}

.cct-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.item-destaque {
    border: 2px solid var(--azul-sindbares);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(43, 51, 132, 0.1);
}

.badge-cct {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #10B981; 
    color: #fff;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
}

.cct-icon i {
    font-size: 50px;
    color: #DC2626; 
    margin-bottom: 20px;
}

.cct-card h3 { margin-bottom: 15px; color: var(--texto-escuro); }
.cct-card p { font-size: 0.9rem; color: var(--texto-claro); margin-bottom: 25px; line-height: 1.6; }

.btn-download {
    display: inline-block;
    padding: 10px 25px;
    border: 1px solid var(--azul-sindbares);
    color: var(--azul-sindbares);
    border-radius: 30px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-download:hover { background: var(--azul-sindbares); color: #fff; }

/* ==========================================================================
   RESPONSIVIDADE (MOBILE / CELULARES E TABLETS)
   ========================================================================== */
.menu-toggle {
    display: none; 
    background: none;
    border: none;
    font-size: 28px;
    color: var(--azul-sindbares);
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-container { flex-wrap: wrap; }
    .logo img { max-width: 200px; }
    .menu-toggle { display: block; }

    .nav-menu {
        display: none; 
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        padding: 15px 0;
    }

    .nav-menu.active { display: flex; }
    .nav-menu a {
        margin: 0;
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        text-align: left;
    }

    .hero-slider { height: auto; min-height: 400px; }
    .hero-content { padding: 40px 20px; text-align: center; }
    .hero-content h1 { font-size: 2.2rem; }

    .icons-grid { grid-template-columns: 1fr; gap: 40px; }

    .news-cta-section {
        clip-path: polygon(50% 2%, 100% 0, 100% 98%, 50% 100%, 0 98%, 0 0); 
        padding: 60px 20px;
    }

    .contact-grid { grid-template-columns: 1fr; gap: 30px; }
    
    /* Telas internas */
    .benefits-detail-grid { grid-template-columns: 1fr; }
    .benefit-card-large { flex-direction: column; text-align: center; align-items: center; }
    .homologacao-layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   PÁGINA SOBRE (História e Diretoria)
   ========================================================================== */
.historia-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
}

.historia-box h2 {
    text-align: center;
    color: var(--azul-sindbares);
    margin-bottom: 20px;
}

.historia-box p {
    color: var(--texto-claro);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.diretoria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.membro-card {
    display: flex;
    align-items: center; /* Alinha a foto com o texto no centro */
    gap: 20px;
    background: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    transition: transform 0.3s ease;
}

.membro-card:hover {
    transform: translateY(-3px);
}

.foto-circular {
    width: 80px;
    height: 80px;
    border-radius: 50%; /* É isso que faz a foto ficar 100% redonda */
    object-fit: cover;
    border: 3px solid #eee;
}

.membro-info h3 {
    font-size: 1.1rem;
    color: var(--texto-escuro);
    margin-bottom: 5px;
}

.membro-info span {
    font-size: 0.9rem;
    color: var(--azul-sindbares);
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================================================
   PÁGINA DE GALERIA DE FOTOS (ESTILO PINTEREST)
   ========================================================================== */
.galeria-grid {
    column-count: 3; /* Cria 3 colunas de fotos */
    column-gap: 20px;
}

.galeria-item {
    width: 100%;
    height: auto; /* Magia: a imagem respeita a sua proporção original! */
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: block;
    break-inside: avoid; /* Evita que uma imagem seja cortada entre duas colunas */
}

.galeria-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* ==========================================================================
   LIGHTBOX (Pop-up de Expansão da Foto)
   ========================================================================== */
.lightbox {
    display: none; /* Escondido por padrão */
    position: fixed;
    z-index: 2000;
    padding-top: 80px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox.active {
    display: block;
}

.lightbox-img {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh; /* A imagem nunca vai ser maior que 80% da altura da tela */
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    object-fit: contain; /* Garante que a foto toda caiba na tela */
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #fff;
    padding: 15px 0;
    font-size: 1.1rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--azul-sindbares);
}

/* Responsividade das colunas da galeria */
@media (max-width: 768px) {
    .galeria-grid { column-count: 2; }
}

@media (max-width: 480px) {
    .galeria-grid { column-count: 1; }
}

/* ==========================================================================
   MODAL DE NOTÍCIAS E ASSEMBLEIAS
   ========================================================================== */
.btn-ler-mais {
    display: inline-block;
    margin-top: 15px;
    color: var(--azul-sindbares);
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 0.95rem;
    text-decoration: underline;
    font-family: inherit;
    transition: color 0.3s;
}

.btn-ler-mais:hover {
    color: #1a1f54;
}

.modal-overlay {
    display: none; /* Escondido por padrão */
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh; /* Ocupa no máximo 85% da tela */
    overflow-y: auto; /* Cria barra de rolagem se o texto for gigante */
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    line-height: 1;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: 0.3s;
}

.modal-close:hover {
    color: var(--azul-sindbares);
}

.modal-text {
    color: var(--texto-escuro);
    line-height: 1.8;
    text-align: justify; /* Alinhamento formal para editais */
}

.modal-text p {
    margin-bottom: 15px;
}