/* ── Header chrome for single content pages (posts, industries, events, and
 * any other non-Page post type) ────────────────────────────────────────────
 *
 * Astra's global Primary Header background is intentionally transparent
 * (rgba(24,57,74,0)) so the homepage header can sit on top of its hero photo.
 * Every other single content page has no hero image behind the header, so
 * that same transparency makes the (white) logo/menu/topbar invisible.
 *
 * product-single.css already solves this for body.single-product. This file
 * generalizes the same treatment to any other single, non-Page post type via
 * body.single-post (WP core, post_type=post) and body.ast-custom-post-type
 * (Astra core, added whenever is_single() is true and post_type !== 'post') —
 * together these match exactly is_single(), i.e. every post type except
 * 'page' and 'attachment', automatically covering future post types too.
 * Pages and the front page are deliberately untouched.
 */

/* Top row: dark navy only while NOT in sticky-active state. */
body.single-post #ast-desktop-header .main-header-bar:not(.ast-sticky-active),
body.single-post #ast-desktop-header .ast-primary-header-bar:not(.ast-sticky-active),
body.single-post #ast-desktop-header .main-header-bar-wrap:not(.ast-sticky-active),
body.single-post #ast-mobile-header .main-header-bar:not(.ast-sticky-active),
body.single-post #ast-mobile-header .ast-primary-header-bar:not(.ast-sticky-active),
body.single-post #ast-mobile-header .main-header-bar-wrap:not(.ast-sticky-active),
body.ast-custom-post-type #ast-desktop-header .main-header-bar:not(.ast-sticky-active),
body.ast-custom-post-type #ast-desktop-header .ast-primary-header-bar:not(.ast-sticky-active),
body.ast-custom-post-type #ast-desktop-header .main-header-bar-wrap:not(.ast-sticky-active),
body.ast-custom-post-type #ast-mobile-header .main-header-bar:not(.ast-sticky-active),
body.ast-custom-post-type #ast-mobile-header .ast-primary-header-bar:not(.ast-sticky-active),
body.ast-custom-post-type #ast-mobile-header .main-header-bar-wrap:not(.ast-sticky-active) {
    background-color: #183a4b !important;
}

/* Mobile header search/menu-toggle icons: white on the dark top row */
body.single-post #ast-mobile-header .ast-mobile-header-content .astra-search-icon,
body.single-post #ast-mobile-header .ast-mobile-header-content .ast-icon,
body.single-post #ast-mobile-header .menu-toggle-close,
body.single-post #ast-mobile-header .menu-toggle-open,
body.ast-custom-post-type #ast-mobile-header .ast-mobile-header-content .astra-search-icon,
body.ast-custom-post-type #ast-mobile-header .ast-mobile-header-content .ast-icon,
body.ast-custom-post-type #ast-mobile-header .menu-toggle-close,
body.ast-custom-post-type #ast-mobile-header .menu-toggle-open {
    color: #fff !important;
    fill: #fff !important;
}

/* Nav row (below-header): always white, sticky or not.
 * Previously gated on :not(.ast-primary-sticky-header-active) — but Astra's
 * sticky JS removes that class a beat after scroll actually reaches the top,
 * so on the way back up this bar reappeared for ~300ms still "sticky" per
 * the DOM, fell through to Astra's own default (orange) background, then
 * visibly transitioned to white once the class caught up. Applying white
 * unconditionally removes the race — this bar is off-screen whenever
 * genuinely stuck-and-scrolled anyway, so there's no state where a
 * different color was ever actually wanted here. */
body.single-post #ast-desktop-header .ast-below-header-bar,
body.single-post #ast-fixed-header .ast-below-header-bar,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar,
body.ast-custom-post-type #ast-fixed-header .ast-below-header-bar {
    background-color: #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08) !important;
    display: block !important;
    border-bottom: none !important;
}

/* Logo: white logo on dark initial header; dark logo on white sticky header. */
body.single-post:not(.ast-primary-sticky-header-active) .site-header .site-logo-img .custom-logo-link,
body.ast-custom-post-type:not(.ast-primary-sticky-header-active) .site-header .site-logo-img .custom-logo-link { display: inline-flex !important; }
body.single-post:not(.ast-primary-sticky-header-active) .site-header .site-logo-img img.custom-logo,
body.ast-custom-post-type:not(.ast-primary-sticky-header-active) .site-header .site-logo-img img.custom-logo { display: block !important; }
body.single-post:not(.ast-primary-sticky-header-active) .site-header .site-logo-img .transparent-custom-logo,
body.ast-custom-post-type:not(.ast-primary-sticky-header-active) .site-header .site-logo-img .transparent-custom-logo { display: inline-flex !important; }
body.single-post:not(.ast-primary-sticky-header-active) .site-header .site-logo-img .sticky-custom-logo,
body.ast-custom-post-type:not(.ast-primary-sticky-header-active) .site-header .site-logo-img .sticky-custom-logo { display: none !important; }

/* Sticky state: show the transparent-logo link and swap img to the dark, properly-sized version. */
body.single-post.ast-primary-sticky-header-active .ast-sticky-active .site-logo-img .transparent-custom-logo,
body.ast-custom-post-type.ast-primary-sticky-header-active .ast-sticky-active .site-logo-img .transparent-custom-logo {
    display: inline-flex !important;
}
body.single-post.ast-primary-sticky-header-active .ast-sticky-active .site-logo-img .transparent-custom-logo img.custom-logo,
body.ast-custom-post-type.ast-primary-sticky-header-active .ast-sticky-active .site-logo-img .transparent-custom-logo img.custom-logo {
    content: url('/wp-content/uploads/2024/05/tavoron-logo.webp') !important;
    height: 30px !important;
    max-height: 30px !important;
    max-width: none !important;
    width: auto !important;
}

/* Search icon: stays dark in both static and sticky states (sits on a white box either way) */
body.single-post #ast-desktop-header .ast-search-menu-icon a,
body.single-post #ast-desktop-header .ast-search-menu-icon svg,
body.single-post #ast-fixed-header .ast-search-menu-icon a,
body.single-post #ast-fixed-header .ast-search-menu-icon svg,
body.ast-custom-post-type #ast-desktop-header .ast-search-menu-icon a,
body.ast-custom-post-type #ast-desktop-header .ast-search-menu-icon svg,
body.ast-custom-post-type #ast-fixed-header .ast-search-menu-icon a,
body.ast-custom-post-type #ast-fixed-header .ast-search-menu-icon svg {
    color: #111827 !important;
    fill: #111827 !important;
}

/* Search input — white box, dark text/placeholder (Astra's transparent-header text-color is white, wrong for this solid field) */
body.single-post #ast-desktop-header .ast-search-menu-icon .search-field,
body.single-post #ast-desktop-header .ast-search-menu-icon input[type="search"],
body.single-post #ast-fixed-header .ast-search-menu-icon .search-field,
body.single-post #ast-fixed-header .ast-search-menu-icon input[type="search"],
body.ast-custom-post-type #ast-desktop-header .ast-search-menu-icon .search-field,
body.ast-custom-post-type #ast-desktop-header .ast-search-menu-icon input[type="search"],
body.ast-custom-post-type #ast-fixed-header .ast-search-menu-icon .search-field,
body.ast-custom-post-type #ast-fixed-header .ast-search-menu-icon input[type="search"] {
    background: #fff !important;
    color: #111827 !important;
    border-color: rgba(255,255,255,0.3) !important;
}
body.single-post #ast-desktop-header .ast-search-menu-icon .search-field::placeholder,
body.single-post #ast-desktop-header .ast-search-menu-icon input[type="search"]::placeholder,
body.single-post #ast-fixed-header .ast-search-menu-icon .search-field::placeholder,
body.single-post #ast-fixed-header .ast-search-menu-icon input[type="search"]::placeholder,
body.ast-custom-post-type #ast-desktop-header .ast-search-menu-icon .search-field::placeholder,
body.ast-custom-post-type #ast-desktop-header .ast-search-menu-icon input[type="search"]::placeholder,
body.ast-custom-post-type #ast-fixed-header .ast-search-menu-icon .search-field::placeholder,
body.ast-custom-post-type #ast-fixed-header .ast-search-menu-icon input[type="search"]::placeholder {
    color: #9ca3af !important;
}

/* Nav links: dark navy, yellow on hover */
body.single-post #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link,
body.single-post #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link .menu-text,
body.single-post #ast-fixed-header .ast-below-header-bar .menu-item > a,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link .menu-text,
body.ast-custom-post-type #ast-fixed-header .ast-below-header-bar .menu-item > a {
    color: #183a4b !important;
}

/* Neutralize Astra's own "active menu" color (yellow) on the ancestor item — yellow stays a hover-only cue */
body.single-post #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item.current-menu-ancestor > .menu-link,
body.single-post #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item.current-menu-ancestor > .menu-link .menu-text,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item.current-menu-ancestor > .menu-link,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item.current-menu-ancestor > .menu-link .menu-text {
    color: #183a4b !important;
    background: transparent !important;
}
body.single-post #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link:hover,
body.single-post #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link:hover .menu-text,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link:hover,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .main-header-menu > .menu-item > .menu-link:hover .menu-text {
    color: #f6be00 !important;
}

/* Submenu dropdown */
body.single-post #ast-desktop-header .ast-below-header-bar .sub-menu,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .sub-menu {
    background-color: #fff !important;
    box-shadow: none !important;
}
body.single-post #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link,
body.single-post #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link .menu-text,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link .menu-text {
    color: #183a4b !important;
}
body.single-post #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link:hover,
body.single-post #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link:hover .menu-text,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link:hover,
body.ast-custom-post-type #ast-desktop-header .ast-below-header-bar .sub-menu .menu-link:hover .menu-text {
    color: #f6be00 !important;
    background-color: #f8f9fa !important;
}

