/* ============================================================
   CORREÇÕES DEFINITIVAS — prevalece sobre styles.css
   ============================================================ */

html,
body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ---- Menu mobile: sem left negativo (causa scroll lateral) ---- */
@media (max-width: 768px) {
    .nav-menu {
        display: flex !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        height: calc(100dvh - 60px);
        margin: 0;
        padding: 20px;
        flex-direction: column;
        align-items: center;
        background: rgba(0, 0, 0, 0.97);
        backdrop-filter: blur(10px);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        visibility: hidden;
        pointer-events: none;
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }
}

/* ---- Seções: sem overflow lateral ---- */
section,
.footer,
.navbar,
.hero,
.servicos,
.depoimentos,
.faq,
.contato,
.sobre,
.historia,
.metodo {
    max-width: 100vw !important;
    overflow-x: clip !important;
}

/* Ancoragem suave sem padding gigante nos títulos */
section[id] {
    scroll-margin-top: 80px;
}

.section-header {
    padding-top: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-bottom: 2rem;
    max-width: 100%;
    overflow: hidden;
}

/* Espaçamento equilibrado entre seções */
.servicos,
.depoimentos,
.faq,
.historia,
.metodo,
.sobre,
.contato {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}

.section-header h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    max-width: 100%;
    word-break: break-word;
}

.section-header p {
    font-size: clamp(0.95rem, 3vw, 1.2rem);
    max-width: 100%;
}

/* ---- Grids responsivos ---- */
.servicos-grid,
.depoimentos-grid,
.sobre-grid,
.historia-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .servicos-grid,
    .depoimentos-grid,
    .sobre-grid,
    .historia-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
}

/* ---- Cards de planos: estrutura simples, sem flip 3D ---- */
.servico-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 1.5rem;
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    text-align: center;
    transform: none !important;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    perspective: none !important;
}

.servico-card:hover {
    transform: none !important;
}

.servico-card.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(255, 0, 102, 0.3);
}

.servico-card .card-background,
.servico-card .card-inner,
.servico-card .card-back {
    display: none !important;
}

.servico-card .card-front {
    display: contents;
}

.servico-card .card-badge {
    margin-bottom: 1rem;
}

.servico-card .preco {
    margin-bottom: 0.75rem;
}

.servico-card .planos-lista {
    width: 100%;
    max-width: 260px;
    margin: 0.5rem auto 1rem;
    text-align: left;
}

.servico-card .btn-plano,
.servico-card .btn-secondary {
    position: relative;
    z-index: 5;
    display: inline-block;
    margin-top: auto;
    pointer-events: auto;
    transform: none !important;
    text-decoration: none;
    color: var(--light);
}

.servico-card .btn-plano:active,
.servico-card .btn-secondary:active {
    transform: none !important;
}

@media (max-width: 768px) {
    .servico-card {
        width: 100% !important;
        max-width: 100% !important;
        min-height: auto !important;
        height: auto !important;
    }
}

/* ---- Ícones do rodapé: lado a lado ---- */
.footer-contact-icons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 1rem !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 1rem auto !important;
}

.footer-contact-icons .social-link {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer-contact-icons .social-icon {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    min-width: 32px !important;
    object-fit: contain;
    display: block;
}

.footer-contact-icons .social-icon-phone {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 0.85rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .footer-contact-icons {
        gap: 0.75rem !important;
    }

    .footer-contact-icons .social-icon,
    .footer-contact-icons .social-icon-phone {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
    }
}

/* ---- Formulário sem estourar largura ---- */
.contato-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .contato-form {
        max-width: 100%;
        margin: 0;
    }
}

/* ---- Desativa animações AOS que causam offset lateral ---- */
[data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* ---- Logos: tamanho controlado (desktop e mobile) ---- */
.nav-logo {
    height: 45px !important;
    width: auto !important;
    max-width: 120px !important;
    object-fit: contain;
    position: static !important;
}

.metodo-logo {
    width: 100px !important;
    max-width: 100px !important;
    height: auto !important;
    display: block;
    margin: 0 auto 1.25rem;
    position: static !important;
    object-fit: contain;
}

.footer-logo {
    width: 100px !important;
    max-width: 100px !important;
    height: auto !important;
    object-fit: contain;
}

/* Mobile: menos espaço vazio entre seções */
@media (max-width: 768px) {
    .servicos,
    .depoimentos,
    .faq,
    .historia,
    .metodo,
    .sobre,
    .contato {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .section-header {
        padding-top: 0 !important;
        margin-bottom: 1.25rem !important;
    }

    .section-header h2 {
        margin-bottom: 0.5rem;
    }

    .metodo-logo {
        width: 70px !important;
        max-width: 70px !important;
        margin-bottom: 1rem;
    }

    .metodo-text {
        padding: 1.5rem !important;
    }

    .historia-container,
    .sobre-grid {
        gap: 1.25rem !important;
    }
}

/* ---- Barra de créditos do desenvolvedor ---- */
.dev-credits {
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.85rem 1rem;
}

.dev-credits-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.25rem;
    text-align: center;
}

.dev-credits-text {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

.dev-credits-text strong {
    color: var(--light);
    font-weight: 600;
}

.dev-credits-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.dev-credits-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dev-credits-links a:hover {
    transform: translateY(-2px);
    opacity: 0.85;
}

.dev-credits-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

@media (max-width: 768px) {
    .dev-credits {
        padding: 0.75rem 1rem;
    }

    .dev-credits-text {
        font-size: 0.8rem;
    }

    .dev-credits-icon {
        width: 24px;
        height: 24px;
    }
}
