/* =============================================================================
 * Blue Horse Pictures — Header redesign (self-contained)
 * =============================================================================
 * Namespaced under .bhp-hdr so nothing here collides with the legacy
 * .header-wrap / .navbar styles in style.css. The old <header class="header-wrap">
 * is replaced by <header class="bhp-hdr">.
 *
 * Keeps the sticky hook compatible: main.js toggles .sticky on .header-wrap on
 * scroll — this file ALSO listens for .bhp-hdr.bhp-sticky (added by the inline
 * script in header.php) so behaviour is self-contained and doesn't depend on
 * the old JS. Brand navy #000059, gold accent #d4a95a.
 * ============================================================================= */

.bhp-hdr {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 90, 0.08);
    font-family: "Open Sans", sans-serif;
    transition: box-shadow 0.25s ease, padding 0.25s ease;
}
.bhp-hdr.bhp-sticky {
    box-shadow: 0 6px 24px rgba(0, 0, 60, 0.12);
}

.bhp-hdr-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 104px;
    transition: min-height 0.25s ease;
}
.bhp-hdr.bhp-sticky .bhp-hdr-inner { min-height: 84px; }

/* ---- Logo ----------------------------------------------------------------- */
.bhp-hdr-logo { display: inline-flex; align-items: center; flex: 0 0 auto; order: 1; margin-right: auto; }
.bhp-hdr-logo img {
    height: 88px;
    width: auto;
    transition: height 0.25s ease;
}
.bhp-hdr.bhp-sticky .bhp-hdr-logo img { height: 70px; }

/* nav + phone cluster sit on the RIGHT; logo on the LEFT (via margin-right:auto on logo) */
.bhp-nav-wrap { order: 2; }
.bhp-hdr-right { order: 3; }
.bhp-burger { order: 4; }

/* ---- Primary nav ---------------------------------------------------------- */
.bhp-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.bhp-nav > li { position: relative; }
.bhp-nav > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    color: #1a1a2e;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.18s ease, background 0.18s ease;
    white-space: nowrap;
}
.bhp-nav > li > a:hover,
.bhp-nav > li.bhp-active > a { color: #000059; background: rgba(0, 0, 89, 0.06); }
.bhp-nav > li > a .bhp-caret {
    font-size: 18px;
    transition: transform 0.2s ease;
    margin-top: 1px;
}
.bhp-nav > li.bhp-has-dropdown:hover > a .bhp-caret { transform: rotate(180deg); }

/* ---- Dropdown ------------------------------------------------------------- */
.bhp-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 60, 0.08);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 50, 0.16);
    padding: 8px;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 100;
}
.bhp-nav > li.bhp-has-dropdown:hover > .bhp-dropdown,
.bhp-nav > li.bhp-has-dropdown:focus-within > .bhp-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* little gold top edge on the dropdown */
.bhp-dropdown::before {
    content: '';
    position: absolute;
    top: -1px; left: 16px; right: 16px;
    height: 2px;
    background: #d4a95a;
    border-radius: 2px;
}
.bhp-dropdown li a {
    display: block;
    padding: 10px 14px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}
.bhp-dropdown li a:hover {
    color: #000059;
    background: rgba(0, 0, 89, 0.06);
    padding-left: 18px;
}

/* ---- Right cluster: phone box --------------------------------------------- */
.bhp-hdr-right { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }

.bhp-phone-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #000059;
    background-image: linear-gradient(135deg, #000572 0%, #000042 100%);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 80, 0.25);
}
.bhp-phone-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 80, 0.35);
    color: #fff;
}
.bhp-phone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 20px;
    flex: 0 0 auto;
}
.bhp-phone-num { font-size: 16px; font-weight: 700; color: #fff; white-space: nowrap; }

/* ---- Header social icons (mobile hamburger panel only) -------------------- */
.bhp-hdr-social {
    display: none; /* hidden on desktop; shown inside the mobile panel */
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---- Hamburger (mobile) --------------------------------------------------- */
.bhp-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    font-size: 28px;
    color: #000059;
    line-height: 1;
}

/* ===========================================================================
 *  RESPONSIVE
 * =========================================================================== */
@media (max-width: 1100px) {
    .bhp-nav > li > a { padding: 12px 12px; font-size: 14px; }
}

@media (max-width: 991px) {
    .bhp-burger { display: inline-flex; }

    /* nav becomes a slide-in panel */
    .bhp-nav-wrap {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        max-width: 85vw;
        height: 100vh;
        background: #ffffff;
        box-shadow: -8px 0 30px rgba(0, 0, 50, 0.2);
        padding: 24px 20px;
        overflow-y: auto;
        transition: right 0.3s ease;
        z-index: 1100;
        display: block;
    }
    .bhp-nav-wrap.bhp-open { right: 0; }

    .bhp-nav-close {
        display: flex;
        justify-content: flex-end;
        font-size: 28px;
        color: #000059;
        cursor: pointer;
        margin-bottom: 12px;
    }

    .bhp-nav { flex-direction: column; align-items: stretch; gap: 2px; }
    .bhp-nav > li > a { justify-content: space-between; padding: 14px 12px; font-size: 15px; border-radius: 8px; }

    /* dropdowns become accordions */
    .bhp-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 12px;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .bhp-dropdown::before { display: none; }
    .bhp-nav > li.bhp-mobile-open > .bhp-dropdown { max-height: 600px; }
    .bhp-nav > li.bhp-has-dropdown > a .bhp-caret { transition: transform 0.25s ease; }
    .bhp-nav > li.bhp-mobile-open > a .bhp-caret { transform: rotate(180deg); }

    /* phone box: full width inside the panel, below the nav */
    .bhp-hdr-right { display: contents; }
    .bhp-phone-box {
        display: none; /* hidden in the top bar on mobile; shown inside panel */
    }
    .bhp-nav-wrap .bhp-phone-box {
        display: inline-flex;
        margin-top: 20px;
        width: 100%;
        justify-content: center;
    }

    /* Social icons row — shown under the phone number in the mobile panel */
    .bhp-hdr-social {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        margin-top: 22px;
        padding-top: 22px;
        border-top: 1px solid rgba(0, 0, 60, 0.1);
    }
    .bhp-hdr-social a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: rgba(0, 0, 89, 0.06);
        border: 1px solid rgba(0, 0, 89, 0.12);
        color: #000059;
        font-size: 19px;
        text-decoration: none;
        transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
    }
    .bhp-hdr-social a:hover {
        background: #000059;
        color: #ffffff;
        transform: translateY(-2px);
    }

    /* dim backdrop */
    .bhp-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 30, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 1050;
    }
    .bhp-nav-backdrop.bhp-open { opacity: 1; visibility: visible; }
}

@media (min-width: 992px) {
    .bhp-nav-close { display: none; }
    .bhp-nav-wrap { display: flex !important; align-items: center; }
}

@media (max-width: 480px) {
    .bhp-hdr-logo img { height: 44px; }
    .bhp-hdr-inner { min-height: 72px; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .bhp-hdr, .bhp-hdr-inner, .bhp-hdr-logo img,
    .bhp-dropdown, .bhp-phone-box, .bhp-nav-wrap { transition: none; }
}
