/* =================================================================== */
/* ARQUIVO DE ESTILO PRINCIPAL - COLÉGIO OBJETIVO CAUCAIA DO ALTO      */
/* VERSÃO FINAL AUDITADA 4.1 - CORREÇÃO DE POSICIONAMENTO DO MENU      */
/* =================================================================== */

/* ---------------------------------- */
/* 1. CONFIGURAÇÕES GLOBAIS E VARIÁVEIS
/* ---------------------------------- */
:root {
    --primary-color: #1b3b83;
    --background-color: #f8f9fa;
    --accent-light: #d6e0ef;
    --accent-medium: #889aca;
    --accent-dark: #7182a9;
    --text-color: #343a40;
    --white-color: #FFFFFF;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --whatsapp-color: #25d366;
    --whatsapp-hover: #128c7e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

/* CORREÇÃO CRÍTICA: Trava o corpo da página de forma robusta quando o menu está aberto */
body.mobile-menu-open {
    position: fixed;
    left: 0;
    right: 0;
    /* A propriedade 'top' é definida dinamicamente via JavaScript para manter a posição da rolagem */
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
    scroll-margin-top: 100px;
}

.section h2 {
    font-family: var(--font-title);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.bg-alternate {
    background-color: var(--white-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(27, 59, 131, 0.4);
    border-radius: 5px;
}


/* ---------------------------------- */
/* 2. CABEÇALHO E NAVEGAÇÃO
/* ---------------------------------- */
.navbar {
    background: var(--white-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 1rem 2rem;
}

.navbar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo img {
    height: 110px;
    transition: height 0.4s ease;
}

.navbar.scrolled .logo img {
    height: 80px;
}

.navbar .logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 0.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
    padding: 10px 15px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-links a:hover {
    color: var(--white-color);
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-links a::after {
    display: none;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 2001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 4px 0;
    transition: all 0.4s ease-in-out;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ---------------------------------- */
/* 3. BOTÕES E ELEMENTOS DE UI
/* ---------------------------------- */
.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-dark));
    color: var(--white-color);
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.4s ease;
    box-shadow: 0 4px 10px rgba(27, 59, 131, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(27, 59, 131, 0.5);
}

.btn-secondary {
    background-color: var(--white-color);
    color: var(--primary-color);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background-color: var(--background-color);
    transform: scale(1.05);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background-color: var(--whatsapp-color);
    color: var(--white-color);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    background-color: var(--whatsapp-hover);
}

/* ---------------------------------- */
/* 4. SEÇÕES PRINCIPAIS
/* ---------------------------------- */

/* HERO SECTION */
.hero {
    margin-top: 0;
    height: 100vh;
    background: var(--background-color);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    background-color: transparent;
    text-align: left;
    z-index: 10;
    grid-column: 1 / 2;
    padding-left: calc((100vw - 1100px) / 2);
    padding-right: 2rem;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    color: var(--primary-color);
}

.hero p {
    font-size: 1.4rem;
    max-width: 500px;
    color: var(--text-color);
    margin: 1.5rem 0 2rem 0;
}

.hero-background-shape {
    grid-column: 2 / 3;
    height: 100%;
    background-image: linear-gradient(45deg, var(--primary-color), var(--accent-dark)), url('imagens/midias/ALE_1779 EDITADO.jpg');
    background-blend-mode: overlay;
    background-size: cover;
    background-position: center;
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
}

/* SOBRE NÓS */
#about .about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
    position: relative;
}

#about .about-content img {
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transform: translateX(-50px);
    z-index: 5;
    position: relative;
}

#about .about-content h3 {
    font-family: var(--font-title);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

/* NÍVEIS DE ENSINO (CARDS 3D) */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.level-card {
    background: var(--white-color);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--accent-light);
    border-radius: 10px;
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.level-card:hover {
    transform: perspective(1200px) rotateY(var(--rotateY, 0)) rotateX(var(--rotateX, 0)) translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(113, 130, 169, 0.4);
}

.level-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 10px;
    background: radial-gradient(circle at 50% 50%, var(--accent-light), transparent 80%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    transform: scale(0.8);
}

.level-card:hover::before {
    opacity: 0.7;
    transform: scale(1);
}

.level-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.level-card:hover i {
    color: var(--accent-dark);
}

.level-card h3 {
    font-family: var(--font-title);
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* DIFERENCIAIS */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.feature-item {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    padding: 2rem;
    border-radius: 10px;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item h4 {
    font-family: var(--font-title);
    margin-bottom: 0.5rem;
}

/* GALERIA */
.gallery-filters {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gallery-filters button {
    background: transparent;
    border: 2px solid var(--accent-light);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.gallery-filters button:hover, .gallery-filters button.active {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(27, 59, 131, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-grid .gallery-item {
    transition: transform 0.4s ease, opacity 0.4s ease;
    cursor: pointer;
    overflow: hidden;
    display: block;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-grid .gallery-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    color: var(--white-color);
    background-color: rgba(27, 59, 131, 0.7);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: all 0.4s ease;
}

.gallery-grid .gallery-item:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-grid .gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-grid .gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-grid .gallery-item.hidden {
    transform: scale(0.8);
    opacity: 0;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0;
    overflow: hidden;
}

/* CONTATO */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3, .contact-form h3 {
    font-family: var(--font-title);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 15px;
    width: 20px;
    text-align: center;
    margin-top: 4px;
}

.map-container {
    margin-top: 2rem;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--accent-light);
}

.contact-form .input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--accent-light);
    background-color: var(--white-color);
    border-radius: 8px;
    font-family: var(--font-body);
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 1rem;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(27, 59, 131, 0.15);
}

.contact-form textarea {
    resize: vertical;
    height: 150px;
}

.contact-form .input-group label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: #999;
    pointer-events: none;
    transition: all 0.2s ease;
    background-color: var(--white-color);
    padding: 0 5px;
}

.contact-form input:focus + label,
.contact-form input:not(:placeholder-shown) + label,
.contact-form textarea:focus + label,
.contact-form textarea:not(:placeholder-shown) + label {
    top: -0.7rem;
    left: 0.8rem;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.contact-form button {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 1rem 2rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
    font-size: 1.1rem;
}

.contact-form button:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* LINHA DO TEMPO */
.timeline-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent-light), var(--accent-medium));
}

.timeline-item {
    padding: 1rem 3rem;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-content {
    padding: 1.5rem;
    background: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    position: relative;
    border-left: 5px solid var(--primary-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 28px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--background-color);
    border: 5px solid var(--primary-color);
    z-index: 1;
    transition: transform 0.3s ease;
}

.timeline-item:hover::before {
    transform: scale(1.2);
}

.timeline-item:nth-child(odd)::before { right: -10.5px; }
.timeline-item:nth-child(even)::before { left: -9.5px; }

.timeline-content h4 {
    font-family: var(--font-title);
    color: var(--primary-color);
    font-size: 1.3rem;
}

.timeline-year {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* ANIMAÇÕES DE ENTRADA */
.fade-in-child {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible .fade-in-child {
    opacity: 1;
    transform: translateY(0);
}

.section.visible .fade-in-child:nth-child(1) { transition-delay: 0.1s; }
.section.visible .fade-in-child:nth-child(2) { transition-delay: 0.2s; }
.section.visible .fade-in-child:nth-child(3) { transition-delay: 0.3s; }
.section.visible .fade-in-child:nth-child(4) { transition-delay: 0.4s; }

.timeline-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}
.section.visible .timeline-item { opacity: 1; transform: translateY(0); }
.section.visible .timeline-item:nth-child(1) { transition-delay: 0.2s; }
.section.visible .timeline-item:nth-child(2) { transition-delay: 0.4s; }
.section.visible .timeline-item:nth-child(3) { transition-delay: 0.6s; }
.section.visible .timeline-item:nth-child(4) { transition-delay: 0.8s; }


/* ---------------------------------- */
/* 5. PÁGINA DE IMAGENS E RODAPÉ
/* ---------------------------------- */
.parallax-header {
    padding-top: 120px; 
    height: 400px;
    background-image: url('imagens/header-parallax.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    text-align: center;
}

.parallax-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(27, 59, 131, 0.6);
}

.parallax-title {
    z-index: 1;
    font-family: var(--font-title);
    font-size: 3rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.content-area {
    padding: 4rem 0;
    background-color: var(--white-color);
}

footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

/* ---------------------------------- */
/* 6. MODAL DE FEEDBACK
/* ---------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-icon i {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
}

.modal-content.success .modal-icon i { color: #28a745; }
.modal-content.error .modal-icon i { color: #dc3545; }

.modal-content h2 {
    font-family: var(--font-title);
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.modal-close-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.7rem 1.8rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.modal-close-btn:hover {
    background-color: var(--accent-dark);
    transform: scale(1.05);
}

/* ---------------------------------- */
/* 7. RESPONSIVIDADE (MEDIA QUERIES)
/* ---------------------------------- */
@media(max-width: 992px) {
    #about .about-content {
        gap: 2rem;
    }
    #about .about-content img {
        transform: translateX(0);
    }
}

@media(max-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .section h2 {
        font-size: 2.2rem;
    }
    
    .parallax-title {
        font-size: 2.2rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh; /* Garante que cubra a altura total da tela do dispositivo */
        background-color: rgba(27, 59, 131, 0.9);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        clip-path: circle(0px at calc(100% - 45px) 55px);
        transition: all 0.5s ease-in-out;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .nav-links.active {
        clip-path: circle(150% at calc(100% - 45px) 55px);
    }

    .nav-links li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }
    
    .nav-links.active li:nth-child(1) { transition-delay: 0.20s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.30s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.35s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.40s; }

    .nav-links a {
        font-size: 1.8rem;
        color: var(--white-color);
        padding: 15px 25px;
    }
    
    .nav-links a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(0) scale(1.05);
    }
    
    .navbar .btn-primary {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        height: auto;
        padding: 8rem 0 5rem 0;
        text-align: center;
    }
    .hero-content {
        grid-row: 2;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        text-align: center;
    }
     .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-background-shape {
        grid-column: 1 / 2;
        grid-row: 1;
        height: 300px;
        clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
    }

    #about .about-content {
       grid-template-columns: 1fr;
    }
    #about .about-content img {
       margin-bottom: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .timeline-container::before { left: 20px; }
    .timeline-item, .timeline-item:nth-child(even) {
        width: 100%;
        left: 0;
        padding-left: 50px;
        padding-right: 15px;
    }
    .timeline-item:nth-child(odd)::before, .timeline-item:nth-child(even)::before {
        left: 10px;
    }
}
