/* =========================
   RESET EVERYTHING THAT LIMITS HEIGHT
   ========================= */
.site-header,
.custom-header,
.custom-header-media {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

/* =========================
   REMOVE BACKGROUND IMAGE SYSTEM
   ========================= */
.custom-header {
    background: none !important;
}

/* =========================
   FIX HEADER MEDIA WRAPPER
   ========================= */
.custom-header-media {
    position: relative !important;

    /* ✅ NO vw → prevents horizontal scroll */
    padding: 0;
    box-sizing: border-box;

    /* ✅ TRUE CENTERING */
    display: flex !important;
    justify-content: center !important;
}

/* =========================
   FORCE IMAGE TO BE NORMAL RESPONSIVE IMAGE
   ========================= */
.custom-header-media img {
    position: relative !important;
    display: block !important;

    width: 100% !important;
    max-width: 1100px;  
/* adjust this to taste */

    height: auto !important;
    max-height: none !important;
}

/* =========================
   REMOVE THEME ABSOLUTE POSITIONING (CAUSE OF STRIP BUG)
   ========================= */
.custom-header-media img.wp-custom-header-image {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

/* =========================
   KEEP MENU WORKING
   ========================= */
.navigation-top {
    position: relative;
    z-index: 1000;
}

.menu-toggle {
    position: relative;
    z-index: 1001;
}

/* =========================
   FIX LOGO
   ========================= */
.custom-logo-link img,
.site-branding img {
    width: auto !important;
    height: auto !important;
    max-height: 100%;
}

/* =========================
   HIDE EMPTY SITE BRANDING (TITLE/TAGLINE/LOGO)
   ========================= */
.site-branding img,
.site-branding .site-title,
.site-branding .site-description {
    display: none !important;
}

.site-branding {
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* =========================
   REMOVE ANY REMAINING INNER-PAGE GAP BELOW HEADER
   ========================= */
body:not(.home) .site-header,
body:not(.home) .custom-header,
body:not(.home) .custom-header-media,
body:not(.home) .site-content .wrap:first-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

/* Remove pseudo-elements that sometimes add space */
body:not(.home) .site-header::after,
body:not(.home) .site-header::before,
body:not(.home) .custom-header-media::after,
body:not(.home) .custom-header-media::before {
    display: none !important;
}

/* =========================
   ENSURE SITE-CONTENT STARTS IMMEDIATELY BELOW HEADER
   ========================= */
.site-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.site-content .wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* =========================
   OPTIONAL MOBILE TWEAK
   ========================= */
@media (max-width: 600px) {
    .custom-header-media img {
        width: 94% !important; /* slight breathing room */
    }
}
