/**
 * Travel Search Safe v1.5 regression fixes.
 *
 * Scope is deliberately narrow:
 * - mobile only (<= 768px)
 * - WordPress single-post pages only
 * - header presentation only
 *
 * Existing search, sliders, tour cards, forms, content and desktop layout are
 * not touched here.
 */

@media (max-width: 768px) {
    /*
     * The parent responsive theme can place its decorative purple pattern on
     * either the header itself or its inner container.  v1.4 only neutralised
     * the outer header, which is why the pattern could remain visible.
     * Remove only image layers while preserving the existing base header colour.
     */
    body.single-post main > header,
    body.single-post main > header::before,
    body.single-post main > header::after,
    body.single-post main > header > .cont,
    body.single-post main > header > .cont::before,
    body.single-post main > header > .cont::after,
    body.single-post main > header .rg-top-header,
    body.single-post main > header .rg-top-header::before,
    body.single-post main > header .rg-top-header::after {
        background-image: none !important;
    }

    /*
     * Remove only the unused vertical space below the mobile header controls.
     * The logo, search button and hamburger remain at their existing sizes and
     * positions.  This prevents a large purple strip from sitting between the
     * controls and the single-tour hero image.
     */
    body.single-post main > header {
        height: auto !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    body.single-post main > header > .cont {
        height: 84px !important;
        min-height: 84px !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        box-sizing: border-box !important;
        align-items: center !important;
    }

    body.single-post main > header .logo,
    body.single-post main > header .rg-top-header {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Keep the existing hero layout; only make sure no legacy gap remains. */
    body.single-post .big-ban-post {
        margin-top: 0 !important;
    }
}

/*
 * v1.6 confirmed source of the mobile purple hero shade.
 * The parent theme paints Mask group (16).png on .big-ban-post::before.
 * Disable that decorative layer only on mobile; desktop remains unchanged.
 */
@media (max-width: 768px) {
    body.single-post section.big-ban-post::before {
        content: none !important;
        display: none !important;
        background-image: none !important;
    }
}
