/* BV Header — mobile-first */

:root {
    --bv-header-height: 64px;
    --bv-header-height-desktop: 72px;
    --bv-navy: #1a2744;
    --bv-text: #ffffff;
    --bv-text-muted: rgba(255,255,255,0.78);
    --bv-drawer-bg: #ffffff;
    --bv-ease: 0.22s ease;
    --bv-scroll-ease: 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ────────────────────────────────────────────────── */
.bv-header *,
.bv-header *::before,
.bv-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Wrapper ──────────────────────────────────────────────── */
.bv-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
    background: transparent;
    box-shadow: none;
    transition:
        background var(--bv-scroll-ease),
        box-shadow  var(--bv-scroll-ease);
}

.bv-header--scrolled {
    background: #000000;
    box-shadow: 0 2px 28px rgba(0,0,0,0.55);
}

/* ── Filter subbar (mobile only) ─────────────────────────── */
.bv-subbar {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: #f2f2f2;
}

.filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    font-family: inherit;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--bv-navy);
    background: #ffffff;
    border: 1px solid rgba(26,39,68,0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--bv-ease), border-color var(--bv-ease);
}

.filter-trigger:hover {
    background: #e8e8e8;
    border-color: rgba(26,39,68,0.3);
}

.filter-trigger svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ── Inner — always on top of drawer & dropdowns ─────────── */
.bv-header__inner {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--bv-header-height);
    padding: 0 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Left block ───────────────────────────────────────────── */
.bv-header__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Admin icon */
.bv-header__admin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    text-decoration: none;
    color: #ffffff;
    transition: background var(--bv-ease);
}

.bv-header__admin-icon:hover {
    background: rgba(255,255,255,0.2);
    color: #ffffff;
}

.bv-header__admin-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

/* Logo */
.bv-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.bv-header__logo img {
    height: 20px;
    width: auto;
    display: block;
}

.bv-header__logo .bv-logo--desktop { display: none; }

/* ── Desktop top bar (hidden on mobile) ───────────────────── */
.bv-topbar {
    display: none;
}

/* ── Desktop nav ──────────────────────────────────────────── */
.bv-header__nav {
    display: none;
}

.bv-header__nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.1rem;
}

/* Shared style for links AND dropdown buttons */
.bv-header__nav ul li a,
.bv-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 0.95rem;
    font-family: inherit;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--bv-text-muted);
    text-decoration: none;
    border-radius: 6px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--bv-ease), background var(--bv-ease);
}

.bv-header__nav ul li a:hover,
.bv-nav-btn:hover,
.bv-nav-btn[aria-expanded="true"] {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
}

/* ── Chevron ──────────────────────────────────────────────── */
.bv-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform var(--bv-ease);
}

.bv-nav-btn[aria-expanded="true"] .bv-chevron {
    transform: rotate(180deg);
}

/* ── Desktop dropdown panels ──────────────────────────────── */
.bv-dropdown {
    display: none; /* only activated on desktop */
}

/* ── Mobile right block ───────────────────────────────────── */
.bv-header__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 3;
}

/* WhatsApp circle icon */
.bv-header__whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
    transition: background var(--bv-ease), transform var(--bv-ease);
}

.bv-header__whatsapp:hover {
    background: #1db954;
    transform: scale(1.07);
}

.bv-header__whatsapp svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Phone CTA button */
.bv-header__phone-cta {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: 50px;
    background: #ffffff;
    color: var(--bv-navy);
    font-family: inherit;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--bv-ease), color var(--bv-ease);
}

.bv-header__phone-cta:hover {
    background: #f0f0f0;
    color: var(--bv-navy);
}

.bv-header--scrolled .bv-header__phone-cta {
    background: #ffffff;
    color: var(--bv-navy);
}

/* ── Mobile hamburger ─────────────────────────────────────── */
.bv-header__burger {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    border-radius: 6px;
    flex-shrink: 0;
    transition: background var(--bv-ease);
}

.bv-header__burger:hover {
    background: rgba(255,255,255,0.1);
}

/* White bars by default */
.bv-header__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transform-origin: center;
    transition:
        transform   var(--bv-ease),
        opacity     var(--bv-ease),
        background  var(--bv-scroll-ease);
}

/* Dark bars when drawer is open (white bg) */
.bv-header--open .bv-header__burger span {
    background: var(--bv-navy);
}

/* → X */
.bv-header--open .bv-header__burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.bv-header--open .bv-header__burger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.bv-header--open .bv-header__burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile full-screen drawer ────────────────────────────── */
.bv-header__drawer {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: var(--bv-drawer-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: calc(var(--bv-header-height) + 1.5rem);
    padding-bottom: 2rem;
    overflow-y: auto;

    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
        opacity   0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 959px) {
    .bv-header--open {
        border-bottom: 1px solid rgba(26,39,68,0.12);
    }
}

.bv-header--open .bv-header__drawer {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.bv-header__drawer > ul {
    list-style: none;
    width: 100%;
    max-width: 480px;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: #7e7e7e 1px solid;
}

.bv-header__drawer > ul li + li {
    border-top: 1px solid rgba(26,39,68,0.08);
}

/* Plain nav links in drawer */
.bv-header__drawer > ul li a {
    display: block;
    padding: 0.65rem 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(26,39,68,0.55);
    text-decoration: none;
    border-radius: 8px;
    letter-spacing: -0.01em;
    transition: color var(--bv-ease), background var(--bv-ease);
}

.bv-header__drawer > ul li a:hover {
    color: var(--bv-navy);
    background: rgba(26,39,68,0.04);
}

/* Dropdown trigger button in drawer */
.bv-drawer-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 0.5rem;
    font-family: inherit;
    font-size: 1.4rem;
    font-weight: 600;
    color: rgba(26,39,68,0.55);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: -0.01em;
    text-align: left;
    transition: color var(--bv-ease), background var(--bv-ease);
}

.bv-drawer-btn:hover,
.bv-drawer-btn[aria-expanded="true"] {
    color: var(--bv-navy);
    background: rgba(26,39,68,0.04);
}

.bv-drawer-btn[aria-expanded="true"] .bv-chevron {
    transform: rotate(180deg);
}

.bv-chevron--lg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: transform var(--bv-ease);
}

/* Accordion panel */
.bv-drawer-accordion {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 0.5rem;
}

.bv-drawer-accordion.bv-accordion--open {
    max-height: 800px;
}

.bv-drawer-accordion ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    padding: 0.35rem 0 0.75rem;
    gap: 0;
}

.bv-drawer-accordion ul li a {
    display: block;
    padding: 0.4rem 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(26,39,68,0.5);
    text-decoration: none;
    border-radius: 6px;
    transition: color var(--bv-ease), background var(--bv-ease);
}

.bv-drawer-accordion ul li a:hover {
    color: var(--bv-navy);
    background: rgba(26,39,68,0.04);
}

/* Admin link at bottom of drawer */
.bv-header__drawer-admin {
    margin-top: 1.5rem;
}

.bv-header__drawer-admin a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(26,39,68,0.35);
    text-decoration: none;
    transition: color var(--bv-ease);
}

.bv-header__drawer-admin a:hover {
    color: rgba(26,39,68,0.65);
}

.bv-header__drawer-admin svg {
    width: 15px;
    height: 15px;
}

/* ── Desktop ──────────────────────────────────────────────── */
@media (min-width: 960px) {

    .bv-topbar {
        display: none;
    }

    .bv-header--scrolled .bv-topbar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 0.75rem;
        padding: 0.5rem 2.5rem;
        background: #ffffff;
    }

    .bv-subbar {
        display: none;
    }

    .bv-header__inner {
        height: var(--bv-header-height-desktop);
        padding: 0 2.5rem;
        max-width: 100%; /* dropdown panels span full width */
    }

    .bv-header__logo img {
        height: 25px;
    }

    .bv-header__logo .bv-logo--mobile  { display: none; }
    .bv-header__logo .bv-logo--desktop { display: block; }

    .bv-header__nav {
        display: flex;
        align-items: center;
    }

    .bv-header__right {
        display: none;
    }

    .bv-header__drawer {
        display: none !important;
    }

    /* ── Dropdown panels ────────────────────────────────── */
    .bv-dropdown {
        display: block;
        position: absolute;
        top: 100%;
        left: 50%;
        width: 1100px;
        max-width: calc(100vw - 4rem);
        z-index: 2;
        background: #ffffff;
        border-top: 1px solid rgba(0,0,0,0.07);
        box-shadow: 0 16px 48px rgba(0,0,0,0.12);

        visibility: hidden;
        opacity: 0;
        transform: translateX(-50%) translateY(-6px);
        pointer-events: none;
        transition:
            opacity    0.22s ease,
            transform  0.22s ease,
            visibility 0s linear 0.22s;
    }

    .bv-dropdown.bv-dropdown--open {
        visibility: visible;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        pointer-events: all;
        transition:
            opacity    0.22s ease,
            transform  0.22s ease,
            visibility 0s linear 0s;
    }

    .bv-dropdown__inner {
        padding: 2rem 2.5rem 2.5rem;
        max-height: 80vh;
        overflow-y: auto;
    }

    /* 5-column grid; titles in the same row are naturally aligned */
    .bv-dropdown__grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1.75rem 1.25rem;
        align-items: start;
    }

    .bv-dropdown__col {
        display: flex;
        flex-direction: column;
    }

    .bv-dropdown__col-title {
        margin-bottom: 0.6rem;
    }

    .bv-dropdown__col-title a {
        font-size: 1.2rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--bv-navy);
        text-decoration: none;
        transition: color var(--bv-ease);
    }

    .bv-dropdown__col-title a::after {
        content: ' »';
        font-weight: 400;
        opacity: 0.45;
    }

    .bv-dropdown__col-title a:hover {
        color: #c9a84c;
    }

    .bv-dropdown__col-items {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.05rem;
    }

    .bv-dropdown__col-items li a {
        display: block;
        font-size: 1.2rem;
        font-weight: 400;
        color: rgba(26,39,68,0.6);
        text-decoration: none;
        padding: 0.22rem 0;
        transition: color var(--bv-ease);
    }

    .bv-dropdown__col-items li a:hover {
        color: var(--bv-navy);
    }
}
