/* =====================================================================
   ESTÚDIO 3DR - Ajustes de Responsividade (Mobile & Tablet)
   =================================================================== */

@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }

    /* Oculta o menu por padrão em dispositivos móveis */
    header .container nav {
        display: none !important;
    }

    /* Menu colado exatamente abaixo do cabeçalho */
    header .container nav.active {
        display: flex !important;
        flex-direction: column !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        justify-content: flex-start !important;
        align-items: center !important;
        background-color: #070d1a !important;
        padding: 1.5rem 0 !important;
        gap: 1.2rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
        z-index: 1000 !important;
    }

    /* Botões com a linha curta, exata no tamanho do texto */
    header .container nav.active a {
        display: block !important;
        width: fit-content !important;
        padding: 0 0 0.4rem 0 !important;
        margin: 0 !important;
        font-size: 1.3rem !important;
        font-weight: 500 !important;
        text-align: center !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    header .container nav.active a:last-child {
        border-bottom: none !important;
    }
}

@media (max-width: 768px) {
    /* ==========================================================
       AJUSTE DO CARROSSEL PRINCIPAL NO MOBILE (Sem sobras)
       ========================================================== */
    .carousel, .hero-carousel, .banner-carousel, section.hero {
        min-height: 280px !important;
        max-height: 350px !important;
        height: 600px !important;
        overflow: hidden !important;
    }

    .carousel img, .hero-carousel img, .banner-carousel img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* ==========================================================
       AJUSTE CIRÚRGICO DAS IMAGENS DOS BLOCOS EM ZIGUEZAGUE
       ========================================================== */
    .bloco-zigzag-wrapper, .row, .grid-secao, .feature-block, .content-grid, section .container > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        grid-template-columns: 1fr !important;
    }

    .bloco-zigzag-wrapper > div, .row > div, .content-grid > div, .grid-secao > div {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Remove min-height fixo dos containers de imagem para eliminar as faixas pretas */
    .bloco-zigzag-wrapper div[style*="min-height"], 
    div[style*="min-height: 450px"] {
        min-height: auto !important;
        height: auto !important;
        background: transparent !important;
    }

    /* Faz a imagem assumir uma proporção limpa e fluida no mobile sem sobras */
    .bloco-zigzag-wrapper img, 
    section img {
        width: 100% !important;
        height: auto !important;
        max-height: 280px !important;
        object-fit: cover !important;
        display: block !important;
    }

    /* Anula o alinhamento à direita herdado do desktop no bloco de desenvolvimento */
    div[style*="align-items: flex-end"], div[style*="text-align: right"] {
        align-items: center !important;
        text-align: center !important;
    }

    /* Centralização estrita de títulos, subtítulos e parágrafos */
    section h1, section h2, section h3, section h4, section p, .section-title, .lead-text {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* ==========================================================
       CENTRALIZAÇÃO ABSOLUTA DOS BOTÕES DE AÇÃO
       ========================================================== */
    .btn-primary, a.btn-primary, button.btn-primary, .cta-btn, [class*="btn"] {
        display: inline-block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
        float: none !important;
    }

    .bloco-zigzag-wrapper div div > div:has(.btn-primary), 
    .bloco-zigzag-wrapper div div > div:has(a) {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    /* ==========================================================
       CENTRALIZAÇÃO COMPLETA DO RODAPÉ
       ========================================================== */
    footer {
        text-align: center !important;
    }

    footer div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    footer ul {
        padding: 0 !important;
        list-style: none !important;
    }

    footer li {
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Classes de controle de visibilidade para o layout responsivo */
@media (min-width: 993px) {
    .d-none-desktop {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .d-none-mobile {
        display: none !important;
    }
}