/* ============================================================
   HEADER — same look and same height as before (92px desktop,
   80px phone), now with a glass bar, smooth dropdowns and a
   glass phone menu.
   SAVE AS: assetsv2/css/header-glass.css
   Load AFTER header.css (see the index.php lines in the notes).

   The glass sits on ::before and not on the header itself:
   an element with backdrop-filter stops its children from
   blurring the page behind them. This way the dropdowns blur
   the page too.
   ============================================================ */

:root {
    --hdr-ease: cubic-bezier(.32, .72, 0, 1);      /* smooth settle, no bounce */
    --hdr-gold: var(--secondary, #e2bd56);
    --hdr-mz: #C9A267;
}

/* ---------- bar ---------- */
#mainHeader.hdr {
    position: fixed !important;
    inset-inline: 0;
    top: 0;
    transform: none !important;
    z-index: 1000;
    background: none;
    border: 0;
    color: #fff;
}
#mainHeader.hdr::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(0, 0, 0, .46);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: background-color .5s var(--hdr-ease), border-color .5s ease, -webkit-backdrop-filter .5s ease, backdrop-filter .5s ease;
}
/* once you scroll: denser, brighter-blurred glass so text stays readable over any photo */
#mainHeader.hdr.is-scrolled::before {
    background: rgba(0, 0, 0, .70);
    -webkit-backdrop-filter: blur(26px) saturate(190%);
    backdrop-filter: blur(26px) saturate(190%);
    border-bottom-color: rgba(255, 255, 255, .13);
}
#mainHeader.hdr .hdr-in { text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
#mainHeader.hdr.is-scrolled .hdr-in { text-shadow: none; }

.hdr-in {
    display: flex;
    align-items: center;
    height: 84px;                      /* phone */
    padding-inline: 20px;
    margin-inline: auto;
}

/* ---------- entrance: the bar's parts settle in one after another, once per page load ---------- */
@keyframes hdrIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.hdr-in > * { animation: hdrIn .7s var(--hdr-ease) backwards; }
.hdr-in > :nth-child(2) { animation-delay: .05s; }
.hdr-in > :nth-child(3) { animation-delay: .10s; }
.hdr-in > :nth-child(4) { animation-delay: .16s; }
.hdr-in > :nth-child(5) { animation-delay: .22s; }

/* ---------- logo ---------- */
.hdr-logo { display: flex; align-items: center; flex: none; -webkit-tap-highlight-color: transparent; }
.hdr-logo img { width: 92px; height: auto; display: block; transition: transform .15s ease; }
.hdr-logo:active img { transform: scale(.96); }
.hdr-div { display: none; }

/* desktop-only parts are hidden on phones */
.hdr-main { display: none; }
.hdr-actions { display: none; }

/* ---------- phone / tablet menu button ---------- */
.hdr-burger {
    margin-inline-start: auto;
    width: 44px; height: 44px; margin-inline-end: -8px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 12px; background: none; color: #fff; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease, background-color .2s ease;
}
.hdr-burger:active { transform: scale(.9); background: rgba(255, 255, 255, .12); }
.hdr-burger svg { width: 28px; height: 28px; }

.hdr :focus-visible, .hm :focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }

/* ============================================================
   DESKTOP (1024px and up)
   ============================================================ */
@media (min-width: 1024px) {
    .hdr-in { height: 96px; padding: 8px 20px; align-items: stretch; }
    .hdr-burger { display: none; }

    .hdr-logo { align-items: flex-start; }
    .hdr-logo img { width: 108px; }
    .hdr-logo.is-mz img { width: 132px; }
    .hdr-div { display: block; flex: none; width: 1px; height: 80px; margin-inline: 20px; background: #fff; align-self: flex-start; }

    /* date + time / venue on top, menu underneath */
    .hdr-main { display: flex; flex-direction: column; justify-content: space-between; flex: 1; min-width: 0; height: 80px; align-self: flex-start; }
    .hdr-info { font-size: 14px; line-height: 21px; text-transform: uppercase; color: #fff; }
    .hdr-info div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .hdr-nav { display: flex; align-items: flex-end; gap: clamp(8px, 1.25vw, 16px); min-width: 0; }
    .nav-item { position: relative; }
    .nav-link {
        position: relative;
        display: inline-flex; align-items: center; gap: 4px;
        height: 20px; padding: 0; border: 0; background: none;
        color: #fff;
        font: inherit; font-size: clamp(12.5px, 1.25vw, 16px); font-weight: 500; line-height: 20px;
        text-transform: uppercase; white-space: nowrap; cursor: pointer; text-decoration: none;
        transition: color .3s ease, transform .12s ease;
    }
    .nav-link::after { content: ""; position: absolute; inset: -8px -6px; }           /* bigger hit area, no visual change */
    .nav-link:hover, .nav-item.is-open > .nav-link, .nav-item:focus-within > .nav-link { color: var(--hdr-gold); }
    .nav-link:active { transform: scale(.97); }
    .nav-link.is-hl { color: var(--hdr-mz); }
    .nav-link.is-hl:hover, .nav-item.is-open > .nav-link.is-hl { color: #d9b67c; }
    .nav-link svg { width: 1em; height: 1em; flex: none; color: rgba(255, 255, 255, .7); transition: transform .3s var(--hdr-ease); }
    .nav-item:hover > .nav-link svg,
    .nav-item.is-open > .nav-link svg { transform: rotate(180deg); }

    /* dropdown: same dark panel as before, now glass that grows out of its button */
    #mainHeader .dropdown {
        position: absolute;
        top: calc(100% + 8px);
        inset-inline-start: 0;
        left: auto; right: auto;
        min-width: 180px;
        padding: 12px;
        border: 0;
        border-radius: 8px;
        background: rgba(0, 0, 0, .82);
        -webkit-backdrop-filter: blur(20px) saturate(150%);
        backdrop-filter: blur(20px) saturate(150%);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 16px 40px rgba(0, 0, 0, .5);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(.95) translateY(-6px);
        transform-origin: top left;
        transition: opacity .2s ease, transform .35s var(--hdr-ease), visibility 0s linear .35s;
        z-index: 50;
    }
    html[dir="rtl"] #mainHeader .dropdown { transform-origin: top right; }
    #mainHeader .dropdown::before { content: ""; position: absolute; inset-inline: 0; top: -12px; height: 12px; }   /* keeps it open while the pointer travels */

    #mainHeader .nav-item:hover > .dropdown,
    #mainHeader .nav-item.is-open > .dropdown,
    #mainHeader .nav-item:focus-within > .dropdown {
        opacity: 1; visibility: visible; pointer-events: auto; transform: none;
        transition: opacity .2s ease, transform .35s var(--hdr-ease), visibility 0s;
    }
    /* the links fade up one after another when the panel opens */
    .dropdown a { opacity: 0; transform: translateY(5px); transition: opacity .3s ease, transform .4s var(--hdr-ease), color .15s ease; }
    #mainHeader .nav-item:hover > .dropdown a,
    #mainHeader .nav-item.is-open > .dropdown a,
    #mainHeader .nav-item:focus-within > .dropdown a { opacity: 1; transform: none; transition-delay: calc(var(--k, 0) * 40ms + 70ms), calc(var(--k, 0) * 40ms + 70ms), 0s; }
    .dropdown a {
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 8px 0;
        color: #fff; font-size: 16px; line-height: 24px; text-decoration: none; text-transform: none;
    }
    .dropdown a:hover { color: var(--hdr-gold); }
    #mainHeader .dropdown a:active { transform: scale(.97); transition-delay: 0s; }
    .dropdown a svg { width: 12px; height: 12px; opacity: .5; flex: none; }

    /* buttons — same look as before */
    .hdr-actions { display: flex; align-items: center; gap: 12px; flex: none; align-self: center; margin-inline-start: 20px; }
    .hdr-lang, .hdr-cta, .hdr-back {
        display: inline-flex; align-items: center; justify-content: center; gap: 8px;
        height: 40px; white-space: nowrap; text-decoration: none; cursor: pointer;
        font: inherit; font-size: 14px; line-height: 1;
        -webkit-tap-highlight-color: transparent;
        transition: transform .12s ease, background-color .2s ease, border-color .2s ease, filter .15s ease;
    }
    .hdr-lang { padding: 0 16px; border: 1px solid rgba(255, 255, 255, .20); border-radius: 6px; background: none; color: #fff; }
    .hdr-lang:hover { border-color: rgba(255, 255, 255, .40); }
    .hdr-cta { padding: 0 20px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: rgba(255, 255, 255, .10); color: rgba(255, 255, 255, .90); font-weight: 500; }
    .hdr-cta:hover { background: rgba(255, 255, 255, .20); }
    .hdr-cta--mz { border: 0; background: var(--hdr-mz); color: #1E2F4D; font-weight: 600; }
    .hdr-cta--mz:hover { background: #d9b67c; }
    .hdr-lang:active, .hdr-cta:active, .hdr-back:active { transform: scale(.96); }
    .hdr-cta.is-soon { padding: 0 16px; background: rgba(255, 237, 213, .10); border-color: rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .50); cursor: not-allowed; }
    .hdr-cta.is-soon:active { transform: none; }
    .hdr-cta--mz.is-soon { background: rgba(201, 162, 103, .20); border: 1px solid rgba(201, 162, 103, .20); color: rgba(201, 162, 103, .70); }
    .hdr-soon { font-size: 8px; text-transform: uppercase; line-height: 1; padding: 2px 6px; border-radius: 999px; background: rgba(234, 179, 8, .15); color: var(--hdr-gold); }
    .hdr-cta--mz.is-soon .hdr-soon { background: rgba(30, 47, 77, .50); color: rgba(201, 162, 103, .80); }
    .hdr-back { background: #fff; border-radius: 6px; padding: 0; overflow: hidden; }
    .hdr-back img { height: 40px; width: auto; display: block; border: 1px solid rgba(255, 255, 255, .20); border-radius: 6px; }
}

/* Mirzaamiyat pages carry an extra logo button, so the menu text scales down a little earlier */
@media (min-width: 1024px) {
    /* Mirzaamiyat page: live bar is 79px tall (120x62 logo) */
    .hdr--mz .hdr-in { height: 84px; }
    .hdr--mz .hdr-div { height: 68px; }
    .hdr--mz .hdr-main { height: 68px; }
    .hdr--mz .nav-link { font-size: clamp(12px, 1.1vw, 16px); }
    .hdr--mz .hdr-nav { gap: clamp(8px, 1vw, 16px); }
}

/* a little tighter between 1024 and 1279px so everything still fits */
@media (min-width: 1024px) and (max-width: 1279px) {
    .hdr-in { padding-inline: 14px; }
    .hdr-div { margin-inline: 14px; }
    .hdr-info { font-size: 12.5px; }
    .hdr-actions { gap: 8px; margin-inline-start: 12px; }
    .hdr-lang { padding: 0 11px; }
    .hdr-cta, .hdr-cta.is-soon { padding: 0 12px; font-size: 13px; }
    .hdr-back img { height: 36px; }
    .hdr-back { height: 36px; }
}
@media (min-width: 1024px) and (max-width: 1099px) {
    .hdr-actions .hdr-back { display: none; }   /* Mirzaamiyat pages: the small "Mirzaam" logo button lives in the phone menu at this width */
}

/* ============================================================
   PHONE / TABLET MENU SHEET
   ============================================================ */
html.hm-lock, html.hm-lock body { overflow: hidden; }

.hm {
    --hm-x: 100%;
    position: fixed; inset: 0; z-index: 1001;
    overflow-y: auto; overscroll-behavior: contain;
    background: rgba(0, 0, 0, .90);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    backdrop-filter: blur(24px) saturate(140%);
    transform: translateX(var(--hm-x));
    visibility: hidden;
    transition: transform .5s var(--hdr-ease), visibility 0s linear .5s;
    touch-action: pan-y;
}
html[dir="rtl"] .hm { --hm-x: -100%; }
.hm.is-open { transform: none; visibility: visible; transition: transform .5s var(--hdr-ease), visibility 0s; }
.hm.is-dragging { transition: none; }

.hm-in { min-height: 100%; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
.hm-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .10); }
.hm-top img { width: 88px; height: auto; display: block; }
.hm-close {
    width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: rgba(255, 255, 255, .8); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: transform .12s ease, background-color .2s ease; -webkit-tap-highlight-color: transparent;
}
.hm-close:hover { color: #fff; }
.hm-close:active { transform: scale(.9); background: rgba(255, 255, 255, .12); }
.hm-close svg { width: 20px; height: 20px; }

.hm-list { flex: 1; display: flex; flex-direction: column; }
.hm-item { border-bottom: 1px solid rgba(255, 255, 255, .10); padding-bottom: 4px; opacity: 0; transform: translateY(10px); transition: opacity .35s ease, transform .5s var(--hdr-ease); }
.hm.is-open .hm-item { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 50ms + 140ms); }
.hm-row {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 14px 0; border: 0; background: none;
    color: #fff; font: inherit; font-size: 14px; font-weight: 400; line-height: 1.5; text-align: start; text-decoration: none; text-transform: uppercase;
    cursor: pointer; -webkit-tap-highlight-color: transparent;
    transition: color .15s ease, transform .12s ease;
}
.hm-row:active { color: var(--hdr-gold); transform: scale(.985); }
.hm-row.is-hl { color: var(--hdr-mz); }
.hm-row svg { width: 16px; height: 16px; color: rgba(255, 255, 255, .5); transition: transform .35s var(--hdr-ease); flex: none; }
.hm-row[aria-expanded="true"] svg { transform: rotate(180deg); }

.hm-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--hdr-ease); }
.hm-sub > div { overflow: hidden; padding-inline-start: 12px; }
.hm-row[aria-expanded="true"] + .hm-sub { grid-template-rows: 1fr; }
.hm-sub a { display: block; padding: 10px 0; color: rgba(255, 255, 255, .55); font-size: 14px; font-weight: 400; text-decoration: none; transition: color .15s ease; -webkit-tap-highlight-color: transparent; }
.hm-sub a:active, .hm-sub a:hover { color: var(--hdr-mz); }

.hm-foot { display: grid; gap: 12px; }
.hm-foot:first-of-type { padding-top: 24px; margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .10); }
.hm-foot.is-two { grid-template-columns: 1fr 1fr; }
.hm-foot .hdr-lang, .hm-foot .hdr-cta, .hm-foot .hdr-back {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    height: 48px; font: inherit; text-decoration: none; cursor: pointer;
    transition: transform .12s ease, background-color .2s ease;
}
.hm-foot .hdr-lang { border: 1px solid rgba(255, 255, 255, .20); border-radius: 8px; background: rgba(255, 255, 255, .10); color: #fff; font-size: 16px; font-weight: 400; }
.hm-foot .hdr-cta { border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: rgba(255, 255, 255, .10); color: rgba(255, 255, 255, .9); font-size: 13px; font-weight: 400; }
.hm-foot .hdr-cta--mz { height: 44px; border: 0; background: var(--hdr-mz); color: #1E2F4D; font-weight: 600; }
.hm-foot .hdr-cta.is-soon { background: rgba(255, 237, 213, .10); border-color: rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .5); cursor: not-allowed; }
.hm-foot .hdr-cta--mz.is-soon { background: rgba(201, 162, 103, .20); border: 1px solid rgba(201, 162, 103, .20); color: rgba(201, 162, 103, .7); }
.hm-foot .hdr-back { background: #fff; border: 1px solid rgba(201, 162, 103, .30); border-radius: 8px; }
.hm-foot .hdr-back img { height: 40px; width: auto; display: block; }
.hm-foot .hdr-lang:active, .hm-foot .hdr-cta:active, .hm-foot .hdr-back:active { transform: scale(.97); }
.hm-foot .hdr-soon { font-size: 8px; text-transform: uppercase; line-height: 1; padding: 2px 6px; border-radius: 999px; background: rgba(234, 179, 8, .15); color: var(--hdr-gold); }

/* ============================================================
   ACCESSIBILITY FALLBACKS
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .hdr-in > * { animation: none; }
    #mainHeader.hdr::before { transition: none; }
    .dropdown a, #mainHeader .nav-item:hover > .dropdown a, #mainHeader .nav-item.is-open > .dropdown a, #mainHeader .nav-item:focus-within > .dropdown a { opacity: 1; transform: none; transition: none; }
    #mainHeader .dropdown { transform: none; transition: opacity .15s ease, visibility 0s linear .15s; }
    #mainHeader .nav-item:hover > .dropdown, #mainHeader .nav-item.is-open > .dropdown, #mainHeader .nav-item:focus-within > .dropdown { transition: opacity .15s ease, visibility 0s; }
    .hm { transform: none; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s; }
    .hm.is-open { opacity: 1; transition: opacity .2s ease, visibility 0s; }
    .hm-item { transform: none; transition: opacity .2s ease; }
    .hm-sub { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
    #mainHeader.hdr::before, #mainHeader.hdr.is-scrolled::before { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
    #mainHeader .dropdown { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
    .hm { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
    #mainHeader.hdr::before { background: #000; border-bottom-color: rgba(255, 255, 255, .5); }
    #mainHeader .dropdown { background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #mainHeader.hdr::before { background: rgba(0, 0, 0, .95); }
    #mainHeader .dropdown { background: rgba(0, 0, 0, .97); }
    .hm { background: rgba(0, 0, 0, .98); }
}
@media print { #mainHeader, .hm { display: none !important; } }

/* ============================================================
   HOME POLISH — assetsv2/css/home-polish.css
   Readability and touch size only. No colours, layouts or
   content change. Loaded from viewsv2/home.php.
   ============================================================ */

/* footer links: same look, bigger touch area (44px comfortable) */
footer ul a,
footer .footer-link {
    display: inline-block;
    padding-block: 10px;
    margin-block: -10px;
}
footer ul.space-y-3 > li + li { margin-top: .5rem; }

/* footer bottom line + small headings: readable on phones */
footer h4.text-\[10px\] { font-size: 11px; }
footer .py-6.text-\[10px\] { font-size: 11px; }

/* icon-only round buttons (slider arrows, close): at least 44px target */
#categories-nav-controls button,
#insights-scroll-track ~ button { min-width: 44px; min-height: 44px; }

/* the text on category cards sits on photos: stronger shadow keeps it readable */
#categories-hybrid-section .category-slider-card span,
#categories-hybrid-section .category-slider-card h3 { text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }

/* ---------- shimmer while photos load ----------
   Every photo (images that fill their frame) carries a soft moving
   highlight behind it. Once the picture arrives it paints over the
   shimmer, so nothing needs to be switched off. Logos and the phone
   screens are not affected. */
@keyframes hp-shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }
img.object-cover,
img.object-contain.hp-photo {
    background-color: #111;
    background-image: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .09) 48%, rgba(255, 255, 255, .15) 52%, transparent 70%);
    background-size: 220% 100%;
    background-repeat: no-repeat;
    animation: hp-shimmer 1.6s linear 5;   /* about 8 s, then it rests: keeps phones cool */
}
/* not yet loaded: hide the broken-image icon / alt text so only the shimmer shows */
img.object-cover:not([src]) { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
    img.object-cover, img.object-contain.hp-photo { animation: none; background-image: none; }
}

/* ---------- chatbot robot (Rive Bot) ----------
   The artwork has a light panel behind the robot. The mask melts the panel into the
   black section so it reads as a soft spotlight instead of a pasted box. Added by
   main.js only when the animation has the head-follow controls. */
#app-bot-canvas.bot-spot {
    -webkit-mask-image: radial-gradient(ellipse 58% 54% at 50% 52%, #000 34%, transparent 74%);
            mask-image: radial-gradient(ellipse 58% 54% at 50% 52%, #000 34%, transparent 74%);
}

