/* ==========================================================================
   AMG ACCOUNT PAGE — CONTAINER OVERFLOW FIX
   Purpose: Prevent horizontal overflow on the /account/ page,
   especially on mobile screens.
   ========================================================================== */


/* 1. Limit outer parent containers to 100% */
.site.grid-container,
.site-content,
.content-area,
.site-main,
.inside-article,
.entry-content {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}


/* 2. Keep the AMG Account page within its parent container */
.amg.amg-acct {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}


/* 3. Mobile-specific adjustments */
@media (max-width: 860px) {

    .site.grid-container.container.hfeed {
        max-width: 100vw !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden !important;
    }

    .site-content,
    .content-area,
    .site-main,
    .inside-article,
    .entry-content {
        max-width: 100vw !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        overflow-x: hidden !important;
    }

    /* Keep AMG Account within its available space */
    .amg.amg-acct {
        max-width: 100vw !important;
        width: 100% !important;
        padding: 12px 10px !important;
    }

    /* Prevent sidebar and main content from overflowing */
    .amg.amg-acct .amg-side,
    .amg.amg-acct .amg-main {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Allow horizontal scrolling inside the navigation */
    .amg.amg-acct .amg-nav {
        max-width: 100% !important;
        width: 100% !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
    }
}