/* ==========================================================================
LAYOUT.CSS — Header, Nav, Hero, Seções, Galeria, Calendário, Footer
   ========================================================================== */

/* --------------------------------------------------------------------------
Container Principal
   -------------------------------------------------------------------------- */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 100px 24px;
}

/* --------------------------------------------------------------------------
Header e Navegação
   -------------------------------------------------------------------------- */
header {
    position: sticky;
    top: 16px;
    z-index: 100;
    margin-bottom: 32px;
    padding: 0 24px;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Logo */
.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo .badge {
    background: linear-gradient(135deg, var(--brand-accent), #f59e0b);
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 20px;
}

/* Links de Navegação */
.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 100px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
}

/* Ações da Nav */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Botão hamburguer mobile */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--brand-primary);
    cursor: pointer;
}

body.dark-theme .nav-toggle {
    color: #ffffff !important; /* Clarear o ícone de hambúrguer no tema escuro (forçado) */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4); /* Brilho extra para garantir que não fique escuro */
}

/* --------------------------------------------------------------------------
   Seção Hero
   -------------------------------------------------------------------------- */
.hero {
    display: flex;
    align-items: center;
    gap: 48px;
    padding: 64px 48px;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.hero .content,
.hero-content {
    flex: 1;
    z-index: 1;
}

.hero h1 {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(90deg, var(--brand-primary), #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
    font-weight: 600;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.hero-image img:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
}

.cta-group {
    display: flex;
    gap: 16px;
}

/* --------------------------------------------------------------------------
   Seção Sobre Nós
   -------------------------------------------------------------------------- */
.about-container {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 80px;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.02);
}

.about-content {
    flex: 1;
}

.about-content h2 {
    font-size: 36px;
    color: var(--brand-primary);
    margin-bottom: 20px;
}

.about-content p {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 600;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--text-main);
    background: var(--highlight-bg);
    border: 2px solid var(--highlight-border);
    box-shadow: 0 6px 16px var(--highlight-shadow);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.highlight-item:hover {
    background: var(--highlight-hover-bg);
    border-color: var(--highlight-hover-border);
    transform: translateY(-4px);
    box-shadow: 0 10px 24px var(--highlight-hover-shadow);
}

/* Ensino Afetivo (🎓) - Tema Azul */
.highlight-item:nth-child(1) {
    --highlight-bg: rgba(59, 130, 246, 0.08);
    --highlight-border: rgba(59, 130, 246, 0.45);
    --highlight-hover-bg: rgba(59, 130, 246, 0.15);
    --highlight-hover-border: rgba(59, 130, 246, 0.7);
    --highlight-shadow: rgba(59, 130, 246, 0.08);
    --highlight-hover-shadow: rgba(59, 130, 246, 0.18);
}

/* Espaço Seguro (🛡️) - Tema Verde/Teal (com borda azulzinha) */
.highlight-item:nth-child(2) {
    --highlight-bg: rgba(16, 185, 129, 0.08);
    --highlight-border: rgba(59, 130, 246, 0.45);
    --highlight-hover-bg: rgba(16, 185, 129, 0.15);
    --highlight-hover-border: rgba(59, 130, 246, 0.7);
    --highlight-shadow: rgba(16, 185, 129, 0.08);
    --highlight-hover-shadow: rgba(59, 130, 246, 0.18);
}

/* Criatividade (💡) - Tema Amarelo/Ouro (com borda azulzinha) */
.highlight-item:nth-child(3) {
    --highlight-bg: rgba(245, 158, 11, 0.08);
    --highlight-border: rgba(59, 130, 246, 0.45);
    --highlight-hover-bg: rgba(245, 158, 11, 0.15);
    --highlight-hover-border: rgba(59, 130, 246, 0.7);
    --highlight-shadow: rgba(245, 158, 11, 0.08);
    --highlight-hover-shadow: rgba(59, 130, 246, 0.18);
}

/* Overrides para Tema Escuro (Dark Mode) */
body.dark-theme .highlight-item:nth-child(1) {
    --highlight-bg: rgba(59, 130, 246, 0.15);
    --highlight-border: rgba(59, 130, 246, 0.45);
    --highlight-hover-bg: rgba(59, 130, 246, 0.22);
    --highlight-hover-border: rgba(59, 130, 246, 0.7);
    --highlight-shadow: rgba(0, 0, 0, 0.2);
    --highlight-hover-shadow: rgba(0, 0, 0, 0.35);
}

body.dark-theme .highlight-item:nth-child(2) {
    --highlight-bg: rgba(16, 185, 129, 0.15);
    --highlight-border: rgba(16, 185, 129, 0.45);
    --highlight-hover-bg: rgba(16, 185, 129, 0.22);
    --highlight-hover-border: rgba(16, 185, 129, 0.7);
    --highlight-shadow: rgba(0, 0, 0, 0.2);
    --highlight-hover-shadow: rgba(0, 0, 0, 0.35);
}

body.dark-theme .highlight-item:nth-child(3) {
    --highlight-bg: rgba(245, 158, 11, 0.15);
    --highlight-border: rgba(245, 158, 11, 0.45);
    --highlight-hover-bg: rgba(245, 158, 11, 0.22);
    --highlight-hover-border: rgba(245, 158, 11, 0.7);
    --highlight-shadow: rgba(0, 0, 0, 0.2);
    --highlight-hover-shadow: rgba(0, 0, 0, 0.35);
}

.highlight-item span:first-child {
    font-size: 24px;
}

/* --------------------------------------------------------------------------
   Seções Gerais
   -------------------------------------------------------------------------- */
section {
    margin-top: 60px;
    scroll-margin-top: 100px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--brand-primary);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   Galerias com Scroll Snap
   -------------------------------------------------------------------------- */
.scroll-gallery {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 24px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-gallery::-webkit-scrollbar {
    display: none;
}

.gallery-card {
    flex: 0 0 300px;
    scroll-snap-align: center;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Setinhas de navegação da galeria */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--text-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-arrow:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.gallery-arrow.left {
    left: -20px;
}

.gallery-arrow.right {
    right: -20px;
}

/* Em dispositivos móveis, escondemos as setas pois o usuário rola com o dedo nativamente */
@media (max-width: 768px) {
    .gallery-arrow {
        display: none;
    }
}

.gallery-card:hover {
    transform: translateY(-8px);
}

.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-card .content,
.gallery-card-content {
    padding: 20px;
}

.gallery-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.gallery-card p {
    color: var(--text-muted);
    font-size: 15px;
}

/* --------------------------------------------------------------------------
   Calendário
   -------------------------------------------------------------------------- */
.calendar-wrapper {
    padding: 32px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    font-family: 'Poppins', sans-serif;
    color: var(--brand-primary);
    font-size: 18px;
}

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

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
Rodapé
   -------------------------------------------------------------------------- */
footer {
    margin-top: 0;
    padding: 25px 20px 50px 20px;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.1));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    color: var(--text-muted);
}

footer h2 {
    font-size: 24px;
    color: var(--brand-primary);
    margin-bottom: 24px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-tagline {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 17px;
}

.footer-copyright {
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-main-card {
    padding: 40px 32px;
    margin: 32px 15px 40px 15px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(168, 18, 18, 0.08);
}

/* Mapa */
.map-card {
    width: 100%;
    margin: 0 auto;
    height: 320px;
    overflow: hidden;
    border-radius: var(--radius-md);
}

/* Grid de Info Institucional */
.footer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.footer-column {
    padding: 8px;
}

.footer-column h4 {
    font-size: 16px;
    color: var(--brand-primary);
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-family: 'Poppins', sans-serif;
}

.footer-column p,
.footer-text-muted {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.footer-link {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Redes Sociais */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    color: var(--brand-primary);
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-4px) scale(1.1);
    background: var(--brand-primary);
    color: white;
}

/* --------------------------------------------------------------------------
   Responsividade
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .cta-group {
        justify-content: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 24px;
        right: 24px;
        background: white;
        padding: 24px;
        border-radius: var(--radius-md);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }

    body.dark-theme .nav-links {
        background: #0a1930; /* Azul escuro vibrante (mais vivo que o cinza anterior) */
        border: 1px solid rgba(59, 130, 246, 0.3);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .highlight-item {
        justify-content: center;
    }

    .menu-dropdown-container {
        display: none !important;
    }

    .mobile-only-btn {
        display: block !important;
        margin-top: 12px;
        padding: 10px 16px;
        border-radius: 100px;
        background: rgba(0, 0, 0, 0.05);
        color: var(--text-main);
        text-align: left;
        border: none;
        font-family: 'Nunito', sans-serif;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        width: 100%;
    }

    body.dark-theme .mobile-only-btn {
        background: rgba(59, 130, 246, 0.15); /* Fundo azulado vivo */
        color: #60a5fa; /* Texto azul claro vivo */
        border: 1px solid rgba(59, 130, 246, 0.2);
    }

    /* Centralizar textos do rodapé no mobile */
    .footer-info-grid {
        text-align: center;
        grid-template-columns: 1fr;
    }
}

/* Ocultar botões mobile no desktop */
@media (min-width: 1025px) {
    .mobile-only-btn {
        display: none !important;
    }
}