/* ==========================================================================
   BookMyCelebrity — Site header v2 (scoped with the "bmh-" prefix)
   Desktop (>=992px): fixed, 140px tall at the top of the page (pages are already
   padded for that), shrinks to a compact bar on scroll.
   Mobile  (<992px): fixed 64px bar + an in-flow spacer of the same height.
   ========================================================================== */
:root {
    --bmh-orange: #FF6A00;
    --bmh-orange-2: #E65425;
    --bmh-navy: #0E0B2B;
    --bmh-ink: #1E1B4B;
    --bmh-muted: #5F5B76;
    --bmh-line: #ECE8F5;
    --bmh-grad: linear-gradient(120deg, #FF6A00 0%, #FF3D6E 100%);
    --bmh-top-h: 40px;
    --bmh-main-h: 100px;
    --bmh-main-h-scrolled: 72px;
    --bmh-mobile-h: 64px;
    /* Space a page needs at the top to clear the fixed header (mobile uses an in-flow spacer) */
    --bmh-offset: 140px;
}
@media (max-width: 991px) { :root { --bmh-offset: 0px; } }

.bmh {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1050;
    font-family: 'Lato', sans-serif;
    color: var(--bmh-ink);
}
.bmh a { text-decoration: none; }
.bmh-container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---------- Utility bar ---------- */
.bmh-top {
    height: var(--bmh-top-h);
    background: var(--bmh-navy);
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    overflow: hidden;
    transition: height .3s ease;
}
.bmh-top .bmh-container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.bmh-top-tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.bmh-top-tag i { color: #FFB547; font-size: 11px; }
.bmh-top-links { display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.bmh-top-links a { color: rgba(255, 255, 255, .85); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; transition: color .2s ease; }
.bmh-top-links a:hover { color: #fff; }
.bmh-top-links i { color: var(--bmh-orange); font-size: 12px; }
.bmh-top-social { display: flex; gap: 6px; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .15); }
.bmh-top-social a { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: rgba(255, 255, 255, .75); }
.bmh-top-social a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.bmh-top-social i { color: inherit; }

/* ---------- Main bar ---------- */
.bmh-main {
    height: var(--bmh-main-h);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: height .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.bmh-main .bmh-container { height: 100%; display: flex; align-items: center; gap: 28px; }
.bmh-logo { flex-shrink: 0; display: inline-flex; align-items: center; }
.bmh-logo img { height: 46px; width: auto; transition: height .3s ease; }

.bmh.is-scrolled .bmh-top { height: 0; }
.bmh.is-scrolled .bmh-main { height: var(--bmh-main-h-scrolled); box-shadow: 0 10px 30px -18px rgba(14, 11, 43, .35); border-color: var(--bmh-line); }
.bmh.is-scrolled .bmh-logo img { height: 38px; }

/* ---------- Desktop nav ---------- */
.bmh-nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; padding: 0; list-style: none; height: 100%; }
.bmh-nav > li { height: 100%; display: flex; align-items: center; }
.bmh-nav-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 16px; border-radius: 12px; border: 0; background: none;
    font-family: 'Encode Sans', 'Lato', sans-serif; font-size: 15.5px; font-weight: 700; color: var(--bmh-ink);
    cursor: pointer; position: relative; transition: color .2s ease, background .2s ease; white-space: nowrap;
}
.bmh-nav-link:hover, .bmh-nav-link[aria-expanded="true"] { color: var(--bmh-orange-2); background: rgba(255, 106, 0, .07); }
.bmh-nav-link.is-active { color: var(--bmh-orange-2); }
.bmh-nav-link.is-active::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--bmh-grad);
}
.bmh-nav-link .bmh-caret { font-size: 10px; transition: transform .25s ease; color: #9894B0; }
.bmh-nav-link[aria-expanded="true"] .bmh-caret { transform: rotate(180deg); color: var(--bmh-orange-2); }

/* ---------- Actions ---------- */
.bmh-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bmh-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 20px; border-radius: 14px; border: 0;
    font-weight: 800; font-size: 14.5px; white-space: nowrap; cursor: pointer;
    transition: transform .2s ease, box-shadow .25s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.bmh-btn--ghost { background: #fff; color: var(--bmh-ink); border: 1.5px solid var(--bmh-line); }
.bmh-btn--ghost:hover { border-color: var(--bmh-ink); color: var(--bmh-ink); }
.bmh-btn--outline { background: rgba(255, 106, 0, .06); color: var(--bmh-orange-2); border: 1.5px solid rgba(255, 106, 0, .45); }
.bmh-btn--outline:hover { background: rgba(255, 106, 0, .12); color: var(--bmh-orange-2); border-color: var(--bmh-orange); }
.bmh-btn--primary { background: var(--bmh-grad); color: #fff; box-shadow: 0 10px 24px -10px rgba(255, 80, 40, .7); }
.bmh-btn--primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(255, 80, 40, .8); }
.bmh.is-scrolled .bmh-btn { height: 42px; }

/* Account dropdown */
.bmh-account { position: relative; }
.bmh-account-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; height: 46px;
    border-radius: 999px; border: 1.5px solid var(--bmh-line); background: #fff; cursor: pointer; color: var(--bmh-ink);
}
.bmh-account-btn:hover { border-color: #CFCAE3; }
.bmh-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--bmh-grad); color: #fff; font-weight: 800; font-size: 13px; }
.bmh-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bmh-account-name { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.bmh-account-name strong { font-size: 14px; font-weight: 800; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmh-account-name small { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--bmh-muted); }

.bmh-pop {
    position: absolute; top: calc(100% + 12px); right: 0; min-width: 250px;
    background: #fff; border-radius: 18px; border: 1px solid var(--bmh-line);
    box-shadow: 0 30px 60px -20px rgba(14, 11, 43, .35);
    padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 5;
}
.bmh-account.is-open .bmh-pop { opacity: 1; visibility: visible; transform: none; }
.bmh-pop-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--bmh-line); margin-bottom: 6px; }
.bmh-pop-head strong { display: block; font-size: 15px; }
.bmh-pop-head span { display: block; font-size: 12px; color: var(--bmh-muted); word-break: break-all; }
.bmh-pop a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--bmh-ink); font-weight: 700; font-size: 14px; }
.bmh-pop a i { width: 18px; text-align: center; color: #9894B0; }
.bmh-pop a:hover { background: #F7F5FC; color: var(--bmh-orange-2); }
.bmh-pop a:hover i { color: var(--bmh-orange-2); }
.bmh-pop a.is-danger, .bmh-pop a.is-danger i { color: #DC2626; }
.bmh-pop a.is-danger:hover { background: #FEF2F2; }

/* ---------- Mega menu ---------- */
.bmh-mega {
    position: absolute; left: 0; right: 0; top: 100%;
    padding-top: 0;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.bmh-mega.is-open { opacity: 1; visibility: visible; transform: none; }
.bmh-mega-panel {
    max-width: 1272px; margin: 0 auto; background: #fff; border-radius: 0 0 26px 26px;
    border: 1px solid var(--bmh-line); border-top: 0;
    box-shadow: 0 40px 80px -30px rgba(14, 11, 43, .4);
    display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 28px;
}
.bmh-mega-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.bmh-mega-head .bmh-mega-title { font-family: 'Encode Sans', sans-serif; font-size: 20px; font-weight: 800; margin: 0; color: var(--bmh-ink); }
.bmh-mega-head p { margin: 2px 0 0; font-size: 14px; color: var(--bmh-muted); }
.bmh-mega-all { font-weight: 800; font-size: 14px; color: var(--bmh-orange-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bmh-mega-all:hover { color: var(--bmh-ink); }
.bmh-mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.bmh-cat {
    position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3.3;
    background: #1E1B4B; isolation: isolate;
}
.bmh-cat-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s ease; z-index: -2; }
.bmh-cat::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(14, 11, 43, .9) 0%, rgba(14, 11, 43, .2) 55%, transparent 80%); }
.bmh-cat:hover .bmh-cat-img { transform: scale(1.07); }
.bmh-cat span {
    position: absolute; left: 12px; right: 12px; bottom: 10px;
    display: flex; align-items: center; justify-content: space-between; gap: 6px;
    color: #fff; font-weight: 800; font-size: 13.5px; line-height: 1.2;
}
.bmh-cat span i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); font-size: 10px; flex-shrink: 0; transition: background .2s ease; color: #fff; }
.bmh-cat:hover span i { background: var(--bmh-orange); }

.bmh-mega-promo {
    border-radius: 20px; padding: 24px; color: #fff; position: relative; overflow: hidden; isolation: isolate;
    background: var(--bmh-ink); display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
}
.bmh-mega-promo::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(260px 200px at 100% 0%, rgba(255, 106, 0, .55), transparent 70%), radial-gradient(240px 200px at 0% 100%, rgba(255, 61, 110, .35), transparent 70%); }
.bmh-mega-promo small { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #FFB547; }
.bmh-mega-promo .bmh-mega-promo-title { font-family: 'Encode Sans', sans-serif; color: #fff; font-size: 21px; font-weight: 800; line-height: 1.2; margin: 8px 0; }
.bmh-mega-promo p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .75); }
.bmh-mega-promo ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.bmh-mega-promo ul i { color: #4ADE80; margin-right: 6px; }
.bmh-mega-promo .bmh-btn { width: 100%; }

/* ---------- Mobile bar ---------- */
.bmh-mobile-actions { display: none; }
.bmh-icon-btn {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    border: 1.5px solid var(--bmh-line); background: #fff; color: var(--bmh-ink); font-size: 17px; position: relative; cursor: pointer; padding: 0;
}
.bmh-icon-btn:hover { border-color: #CFCAE3; color: var(--bmh-ink); }
.bmh-icon-btn .bmh-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 2px #fff; }
.bmh-burger span { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; position: relative; }
.bmh-burger span::before, .bmh-burger span::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.bmh-burger span::before { top: -6px; }
.bmh-burger span::after { top: 6px; width: 12px; }
.bmh-mpill { height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; box-shadow: none; }
.bmh-spacer { display: none; }

/* ---------- Drawer ---------- */
.bmh-overlay {
    position: fixed; inset: 0; z-index: 1060; background: rgba(14, 11, 43, .55);
    backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
}
.bmh-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1070;
    width: min(400px, 88vw); background: #fff;
    display: flex; flex-direction: column;
    transform: translateX(100%); visibility: hidden;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .35s;
    box-shadow: -30px 0 60px -20px rgba(14, 11, 43, .4);
    font-family: 'Lato', sans-serif; color: var(--bmh-ink);
}
.bmh-drawer a { text-decoration: none; }
html.bmh-drawer-open { overflow: hidden; }
html.bmh-drawer-open .bmh-overlay { opacity: 1; visibility: visible; }
html.bmh-drawer-open .bmh-drawer { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s; }

.bmh-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--bmh-line); }
.bmh-drawer-head img { height: 36px; width: auto; }
.bmh-drawer-body { flex: 1; overflow-y: auto; padding: 18px; -webkit-overflow-scrolling: touch; }

.bmh-drawer-user { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: #F7F5FC; margin-bottom: 16px; }
.bmh-drawer-user strong { display: block; font-size: 15px; }
.bmh-drawer-user span { display: block; font-size: 12px; color: var(--bmh-muted); }

.bmh-drawer-cta { width: 100%; height: 52px; font-size: 15px; margin-bottom: 18px; }

.bmh-dnav { list-style: none; padding: 0; margin: 0 0 18px; }
.bmh-dnav > li { border-bottom: 1px solid var(--bmh-line); }
.bmh-dnav-link {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 4px;
    background: none; border: 0; text-align: left; cursor: pointer;
    font-family: 'Encode Sans', sans-serif; font-size: 16px; font-weight: 800; color: var(--bmh-ink);
}
.bmh-dnav-link > i:first-child { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 106, 0, .09); color: var(--bmh-orange-2); font-size: 14px; flex-shrink: 0; }
.bmh-dnav-link .bmh-caret { margin-left: auto; font-size: 12px; color: #9894B0; transition: transform .25s ease; }
.bmh-dnav-link[aria-expanded="true"] .bmh-caret { transform: rotate(180deg); }
.bmh-dnav-link.is-active { color: var(--bmh-orange-2); }
.bmh-dcats { display: none; padding: 2px 0 16px; }
.bmh-dcats.is-open { display: block; }
.bmh-dcats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bmh-dcat { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--bmh-line); color: var(--bmh-ink); font-size: 13px; font-weight: 700; line-height: 1.2; }
.bmh-dcat:hover { border-color: var(--bmh-orange); color: var(--bmh-orange-2); }
.bmh-dcat-img { width: 34px; height: 34px; border-radius: 9px; background-size: cover; background-position: center; flex-shrink: 0; background-color: #EEE; }
.bmh-dcats-all { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 800; font-size: 14px; color: var(--bmh-orange-2); }

.bmh-dsection-title { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #9894B0; margin: 6px 0 10px; }
.bmh-dlinks { display: grid; gap: 6px; margin-bottom: 18px; }
.bmh-dlinks a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: #F7F5FC; color: var(--bmh-ink); font-weight: 700; font-size: 14.5px; }
.bmh-dlinks a i { width: 18px; text-align: center; color: var(--bmh-orange-2); }
.bmh-dlinks a.is-danger { background: #FEF2F2; color: #DC2626; }
.bmh-dlinks a.is-danger i { color: #DC2626; }
.bmh-dlogin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.bmh-dlogin .bmh-btn { width: 100%; }

.bmh-drawer-foot { padding: 14px 18px; border-top: 1px solid var(--bmh-line); display: flex; gap: 10px; }
.bmh-drawer-foot a { flex: 1; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 14px; }
.bmh-drawer-foot .bmh-call { background: var(--bmh-ink); color: #fff; }
.bmh-drawer-foot .bmh-mail { background: #F7F5FC; color: var(--bmh-ink); }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Laptop widths: tighter spacing so Login + Register + Post fit beside the menu */
@media (max-width: 1365px) {
    .bmh-main .bmh-container { gap: 18px; }
    .bmh-nav { gap: 2px; }
    .bmh-nav-link { padding: 10px 12px; }
    .bmh-actions .bmh-btn { padding: 0 16px; }
}

@media (max-width: 1199px) {
    .bmh-main .bmh-container { gap: 16px; }
    .bmh-nav-link { padding: 10px 11px; font-size: 15px; }
    .bmh-actions .bmh-btn { padding: 0 16px; font-size: 14px; }
    .bmh-top-tag { display: none; }
    .bmh-top .bmh-container { justify-content: flex-end; }
    .bmh-mega-panel { grid-template-columns: 1fr 260px; }
    .bmh-mega-grid { grid-template-columns: repeat(4, 1fr); }
    .bmh-mega-grid .bmh-cat:nth-child(n+9) { display: none; }
    .bmh-account-name { display: none; }
    .bmh-actions { gap: 8px; }
    .bmh-logo img { height: 40px; }
    .bmh-nav-link { padding: 10px 9px; font-size: 14.5px; }
    .bmh-actions .bmh-btn { padding: 0 13px; font-size: 13.5px; height: 42px; }
    .bmh-actions .bmh-btn--primary i { display: none; }
}
@media (max-width: 1099px) and (min-width: 992px) {
    .bmh-main .bmh-container { padding: 0 16px; gap: 10px; }
    .bmh-logo img { height: 34px; }
    .bmh-nav-link { padding: 8px 7px; font-size: 14px; }
    .bmh-actions .bmh-btn { padding: 0 11px; font-size: 13px; }
    .bmh-account-btn { padding: 4px; }
}

@media (max-width: 991px) {
    .bmh-top, .bmh-nav, .bmh-actions, .bmh-mega { display: none !important; }
    .bmh-main, .bmh.is-scrolled .bmh-main { height: var(--bmh-mobile-h); }
    .bmh-main .bmh-container { padding: 0 16px; gap: 12px; }
    .bmh-logo img, .bmh.is-scrolled .bmh-logo img { height: 36px; }
    .bmh-mobile-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
    .bmh-spacer { display: block; height: var(--bmh-mobile-h); }
    .bmh.is-scrolled .bmh-main { box-shadow: 0 8px 24px -16px rgba(14, 11, 43, .4); border-color: var(--bmh-line); }
}

@media (max-width: 420px) {
    .bmh-main .bmh-container { gap: 8px; }
    .bmh-logo img, .bmh.is-scrolled .bmh-logo img { height: 32px; }
    .bmh-mobile-actions { gap: 6px; }
    .bmh-mpill { padding: 0 12px; font-size: 13.5px; }
    .bmh-icon-btn { width: 40px; height: 40px; }
}
/* Very narrow phones: Login lives in the drawer, Register stays visible */
@media (max-width: 374px) {
    .bmh-mpill--login { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .bmh *, .bmh-drawer, .bmh-overlay { transition: none !important; }
}
