/* ================================================================
   RESPONSIVIDADE EXCLUSIVA: PÁGINA HISTÓRIA (CBA)
   ================================================================ */

@media (max-width: 1024px) {
    .history-grid {
        gap: 40px;
    }

    .history-text h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {

    /* 1. Ajuste de Respiro Lateral (Container) */
    .container {
        padding-left: 25px;
        padding-right: 25px;
    }

    .nav-menu {
        position: fixed;
        right: -120%;
        top: 0;
        width: 100vw;
        /* Ocupa toda a largura */
        height: 100vh;
        /* Ocupa toda a altura */
        background: var(--deep-green);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 999;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-menu.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
        cursor: pointer;
        z-index: 1001;
    }

    .bar {
        display: block;
        width: 28px;
        height: 3px;
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
        background-color: var(--white);
    }

    #mobile-menu.active .bar:nth-child(2) {
        opacity: 0;
    }

    #mobile-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--accent-gold);
    }

    #mobile-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--accent-gold);
    }

    /* 2. Hero Section - História */
    .sobre-hero {
        padding-top: 120px;
        /* Menor para mobile */
        height: 100vh;
        /* Reduz altura para não cansar o scroll */
        min-height: 400px;
    }

    .sobre-hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .sobre-hero p {
        font-size: 1rem;
    }

    /* 3. Missão, Visão e Valores (Cards) */
    .mvv-grid {
        grid-template-columns: 1fr;
        /* Um card por linha */
        gap: 20px;
    }

    .mvv-card {
        padding: 30px 20px;
    }

    /* 4. Conteúdo Histórico (Stacking) */
    .history-grid {
        grid-template-columns: 1fr !important;
        /* Força uma coluna */
        gap: 30px;
        text-align: center;
    }

    /* Inverte a ordem em blocos específicos se necessário para a foto vir antes */
    .history-modern:nth-of-type(even) .history-grid {
        display: flex;
        flex-direction: column-reverse;
    }

    .history-text h2 {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    .history-text p {
        text-align: justify;
        /* Melhora a leitura de textos longos */
    }

    .image-frame {
        height: 280px;
    }

    /* Remove o efeito decorativo (borda dourada atrás) que pode vazar a tela no mobile */
    .image-frame::after {
        display: none;
    }

    /* 5. TIMELINE OTIMIZADA (O PONTO CRÍTICO) */
    .timeline-line {
        display: none;
        /* Remove a linha central que divide a tela */
    }

    .timeline-container {
        padding-left: 15px;
    }

    .timeline-item {
        width: 100% !important;
        /* Ocupa a largura toda */
        margin-left: 0 !important;
        margin-bottom: 40px;
        padding: 0 0 0 30px !important;
        /* Espaço para a linha lateral */
        text-align: left !important;
        /* Alinha tudo à esquerda */
        border-left: 2px solid var(--accent-gold);
        /* Cria a linha do tempo lateral */
    }

    .timeline-dot {
        left: -9px !important;
        /* Alinha a bolinha exatamente em cima da linha lateral */
        top: 10px;
        right: auto !important;
    }

    .timeline-content h3 {
        font-size: 1.5rem;
    }

    .timeline-item.highlight .timeline-content h3 {
        font-size: 1.8rem;
    }

    /* 6. Listas e Rodapé */
    .history-text ul li {
        text-align: left;
        font-size: 0.9rem;
    }

    /* --- 7. FOOTER --- */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .brand-column p {
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .sobre-hero h1 {
        font-size: 1.8rem;
    }

    .history-text h2 {
        font-size: 1.5rem;
    }
}