/* Commercial Property's authored photo retained a desktop crop offset on phones.
 * Repair only this image/frame at the mobile breakpoint; keep desktop intact. */
@media (max-width: 767px) {
    body.page.page-id-198.afg-site-core #tve_editor
        > .thrv-columns:first-child [data-css="tve-u-18f8147f444"],
    body.page.page-id-198.afg-site-core #tve_editor
        > .thrv-columns:first-child [data-css="tve-u-18f8147f444"] > .tve_image_frame {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        height: auto !important;
    }
    body.page.page-id-198.afg-site-core #tve_editor
        > .thrv-columns:first-child img[data-css="tve-u-190c56d5325"] {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* News archive: same full-width navy title band as standard service headers. */
body.blog.tve-theme-10279 #theme-top-section > .section-background {
    background: #1d3148 !important;
}
body.blog.tve-theme-10279 #theme-top-section > .section-content {
    box-sizing: border-box;
    width: calc(100% - 40px) !important;
    max-width: 1200px !important;
    min-height: 275px !important;
    margin: 0 auto !important;
    padding: 80px 20px !important;
    display: flex;
    align-items: center;
}
body.blog.tve-theme-10279 #theme-top-section [data-css="tve-u-17ae878b467"],
body.blog.tve-theme-10279 #theme-top-section [data-css="tve-u-17ae878b1b1"],
body.blog.tve-theme-10279 #theme-top-section [data-css="tve-u-17ae8785dd9"] {
    width: 100% !important;
    flex-basis: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Old news-only search stays stored for rollback, but is no longer presented. */
body.blog.tve-theme-10279 #theme-top-section [data-css="tve-u-17ae8785e03"] {
    display: none !important;
}
body.blog.tve-theme-10279 #theme-top-section h1 {
    color: #fff !important;
    font-family: Raleway-SemiBold, sans-serif !important;
    font-size: clamp(38px, 5vw, 50px) !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
body.blog.tve-theme-10279 #theme-top-section h1::before,
body.blog.tve-theme-10279 #theme-top-section h1::after {
    display: none !important;
}

/* Native primary-menu search, shared by desktop and the existing mobile panel. */
body.afg-site-core #menu-header-menu > .afg-menu-search {
    display: inline-flex;
    vertical-align: middle;
    margin: 0 0 0 18px;
    padding: 0;
    width: 220px;
    max-width: 100%;
}
body.afg-site-core .afg-menu-search form {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
}
body.afg-site-core .afg-menu-search input[type="search"] {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #65778a;
    border-radius: 4px 0 0 4px;
    background: #fff;
    color: #1d3148;
    font: 14px/1.4 sans-serif;
}
body.afg-site-core .afg-menu-search button {
    box-sizing: border-box;
    flex: 0 0 auto;
    height: 40px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #1d3148;
    border-radius: 0 4px 4px 0;
    background: #1d3148;
    color: #fff;
    font: 600 14px/1.4 sans-serif;
    cursor: pointer;
}
body.afg-site-core .afg-menu-search input:focus-visible,
body.afg-site-core .afg-menu-search button:focus-visible {
    outline: 3px solid #1da44c;
    outline-offset: 2px;
}
@media (max-width: 991px) {
    body.afg-site-core #menu-header-menu > .afg-menu-search {
        display: flex;
        width: 100%;
        margin: 20px 0;
    }
}

/*
 * Structural width is independent of artwork. Limit this to the leading header
 * shortcode in the three verified Page templates, not Staff or popup banners.
 * CSS only: no builder DOM or saved content is changed.
 */
body.page.afg-site-core:is(.tve-theme-10468, .tve-theme-10884, .tve-theme-11454)
    #theme-content-section > .section-content > .thrv-content-box > .tve-cb
    > .thrv_text_element:first-child > .team-bio-banner {
    box-sizing: border-box;
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    overflow: hidden;
}

/*
 * Two individually verified custom heroes: expand their outer presentation box,
 * retaining the existing text/photo columns within a centred content row.
 * Do not add a photograph, recolour text or hide imagery on image-less pages.
 */
body.page.afg-site-core.tve-theme-10395:is(.page-id-900134, .page-id-11938)
    #tve_editor > .thrv_wrapper.thrv-columns:first-child {
    box-sizing: border-box;
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: 0 !important;
}

body.page.afg-site-core.tve-theme-10395:is(.page-id-900134, .page-id-11938)
    #tve_editor > .thrv_wrapper.thrv-columns:first-child > .tcb-flex-row {
    box-sizing: border-box;
    width: calc(100% - 40px) !important;
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (max-width: 767px) {
    /* The old custom row used negative margins to compensate column gutters
     * (200px on Private Client). Clear only that first-level compensation when
     * centring the row; leave nested CTA columns and their spacing untouched. */
    body.page.afg-site-core.tve-theme-10395:is(.page-id-900134, .page-id-11938)
        #tve_editor > .thrv_wrapper.thrv-columns:first-child
        > .tcb-flex-row > .tcb-flex-col {
        box-sizing: border-box;
        padding-left: 0 !important;
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 100% !important;
    }
}
