/**
 * Layout responsivo Afetto — PC (1200+), notebook (768–1199), celular (<768).
 */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
}

.afetto-page-shell {
    box-sizing: border-box;
    width: min(var(--afetto-shell-max, 1200px), 100%);
    margin-inline: auto;
    padding: clamp(0.75rem, 2.5vw, 1.5rem)
             clamp(0.75rem, 3vw, 1rem)
             clamp(1.5rem, 4vw, 2.5rem);
    padding-left: max(clamp(0.75rem, 3vw, 1rem), env(safe-area-inset-left));
    padding-right: max(clamp(0.75rem, 3vw, 1rem), env(safe-area-inset-right));
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-start;
}

.hero-actions .btn {
    white-space: nowrap;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .afetto-page-shell {
        --afetto-shell-max: 100%;
    }

    .hero-actions .btn,
    .hero-actions form .btn {
        font-size: 0.875rem;
    }
}

/* Notebook + celular: telas abaixo de monitor largo */
@media (max-width: 1199.98px) {
    .afetto-top-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .afetto-top-actions .btn,
    .afetto-top-actions form {
        flex: 0 1 auto;
    }

    .afetto-hero-stack {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .table-responsive,
    .grade-scroll-wrap {
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 767.98px) {
    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn,
    .hero-actions form {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
    }

    .hero-actions form {
        display: flex;
    }

    .hero-actions form .btn {
        width: 100%;
    }

    .shell-card {
        border-radius: 18px;
    }

    .shell-card .card-body {
        padding: 1rem !important;
    }

    .hero-band {
        border-radius: 18px;
        padding: 1rem 1rem 1.15rem;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .responsive-stack-table th,
    .responsive-stack-table td {
        white-space: normal;
        font-size: 0.85rem;
        vertical-align: middle;
    }

    .accordion-button {
        font-size: 0.95rem;
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-actions .btn,
    .hero-actions form {
        flex: 1 1 100%;
    }

    .pagamentos-tabs {
        flex-direction: column;
        align-items: stretch;
        border-bottom: 0;
        gap: 0.35rem;
    }

    .pagamentos-tabs .tab-btn {
        border-bottom: 0;
        border-radius: 12px;
        background: #f1f5f9;
        margin-bottom: 0;
        text-align: center;
    }

    .pagamentos-tabs .tab-btn.active {
        background: var(--afetto-teal-soft);
    }

    .pagamentos-tabs .tab-sep {
        display: none;
    }

    .whatsapp-suporte__texto {
        display: none;
    }

    .whatsapp-suporte__btn {
        padding: 0.75rem;
        border-radius: 50%;
    }
}

@media (min-width: 1200px) {
    .afetto-page-shell {
        --afetto-shell-max: 1440px;
    }
}
