/**
 * Core 1.6.32 — smartphone alignment + /vendere/ menu visibility.
 * Loaded only on Chi sono, Vendere, Guide and Valutazione casa.
 */

@media (max-width: 760px) {
    /*
     * The 1.6.1 desktop breakout uses 100vw + left:50% + -50vw.  That is useful
     * on wide constrained theme canvases, but on narrow viewports it can leave
     * the editorial canvas visually shifted by the theme/container gutters.
     * On phones the page already has the whole viewport available, so use the
     * normal document flow and explicit symmetric gutters instead.
     */
    body.gs-editorial-internal,
    body.gs-editorial-internal .wp-site-blocks,
    body.gs-editorial-internal .wp-block-post-content,
    body.gs-editorial-internal .entry-content {
        overflow-x: clip !important;
    }

    body.gs-editorial-internal .wp-block-post-content,
    body.gs-editorial-internal .entry-content {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.gs-editorial-about .gs-internal,
    body.gs-editorial-guides .gs-internal,
    body.gs-editorial-valuation .gs-valutazione-page {
        position: static !important;
        left: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* About + Guides: one symmetric phone gutter for every principal section. */
    body.gs-editorial-about .gs-about-hero,
    body.gs-editorial-about .gs-about-story,
    body.gs-editorial-about .gs-about-principles,
    body.gs-editorial-about .gs-about-territory,
    body.gs-editorial-about .gs-internal-cta,
    body.gs-editorial-guides .gs-guides-hero,
    body.gs-editorial-guides .gs-guide-featured,
    body.gs-editorial-guides .gs-guide-library,
    body.gs-editorial-guides .gs-guide-empty-state,
    body.gs-editorial-guides .gs-internal-cta {
        width: calc(100% - 28px) !important;
        max-width: none !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Valuation: cancel the desktop breakout and keep all blocks on one axis. */
    body.gs-editorial-valuation .gs-valutazione-page {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body.gs-editorial-valuation .gs-valutazione-hero,
    body.gs-editorial-valuation .gs-valutazione-process,
    body.gs-editorial-valuation .gs-valutazione-criteria,
    body.gs-editorial-valuation .gs-valutazione-transparency,
    body.gs-editorial-valuation .gs-valutazione-form-section,
    body.gs-editorial-valuation .gs-valutazione-faq,
    body.gs-editorial-valuation .gs-valutazione-final {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-sizing: border-box !important;
    }

    /*
     * /vendere/: on a phone the navigation control is more important than the
     * auxiliary "Parliamo" pill.  Give the header two columns so Menu always
     * occupies the top-right slot instead of being squeezed outside the row.
     */
    body.gs-editorial-sell .gs-site-header-inner {
        width: calc(100% - 24px) !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 12px !important;
    }

    body.gs-editorial-sell .gs-site-talk {
        display: none !important;
    }

    body.gs-editorial-sell .gs-site-mobile-nav {
        display: block !important;
        justify-self: end !important;
        position: relative !important;
        z-index: 80 !important;
    }

    body.gs-editorial-sell .gs-site-mobile-nav summary {
        min-width: 52px;
        min-height: 44px;
        padding: 0 4px !important;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        font-size: .62rem !important;
        letter-spacing: .14em;
    }

    body.gs-editorial-sell .gs-site-mobile-panel {
        right: 0 !important;
        left: auto !important;
        top: 44px !important;
        width: min(240px, calc(100vw - 28px)) !important;
    }
}

@media (max-width: 420px) {
    body.gs-editorial-about .gs-about-hero,
    body.gs-editorial-about .gs-about-story,
    body.gs-editorial-about .gs-about-principles,
    body.gs-editorial-about .gs-about-territory,
    body.gs-editorial-about .gs-internal-cta,
    body.gs-editorial-guides .gs-guides-hero,
    body.gs-editorial-guides .gs-guide-featured,
    body.gs-editorial-guides .gs-guide-library,
    body.gs-editorial-guides .gs-guide-empty-state,
    body.gs-editorial-guides .gs-internal-cta {
        width: calc(100% - 24px) !important;
    }

    body.gs-editorial-valuation .gs-valutazione-page {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}
