/* ==========================================================================
   jeddah24 v2 — header: strip · masthead · sticky nav (wave edge) · megas · chips
   ========================================================================== */

/* ---- strip ------------------------------------------------------------------ */
.jd-strip {
    position: relative;
    background: var(--jd-ink);
    color: #cfe2e7;
    font: 500 12.5px/1 var(--jd-font-ui);
}
.jd-strip::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(to left, var(--jd-sea) 0%, var(--jd-gold) 50%, var(--jd-sea) 100%);
    opacity: .9;
}
.jd-strip__in {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 40px;
}
.jd-strip__when {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    white-space: nowrap;
}
.jd-strip__city {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--jd-gold);
    font-weight: 700;
}
.jd-strip__clock {
    direction: ltr;
    font-variant-numeric: tabular-nums;
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, .09);
    padding: 5px 8px;
    border-radius: 7px;
    letter-spacing: .03em;
}
.jd-strip__dates {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #a9c3cb;
}
.jd-strip__dot {
    width: 5px; height: 5px;
    transform: rotate(45deg);
    background: var(--jd-gold);
}
.jd-strip__ticker {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-inline-start: 16px;
    border-inline-start: 1px solid rgba(255, 255, 255, .12);
}
.jd-strip__live {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--jd-coral);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
}
.jd-strip__live i {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: jd-pulse 1.8s infinite;
}
.jd-ticker__viewport {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 40px;
    display: flex;
    align-items: center;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 18px, #000 calc(100% - 42px), transparent 100%);
    mask-image: linear-gradient(to left, transparent 0, #000 18px, #000 calc(100% - 42px), transparent 100%);
}
.jd-ticker__track {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    white-space: nowrap;
    will-change: transform;
    padding-inline-start: 20px;
}
.jd-ticker__track a {
    position: relative;
    color: #eaf4f6;
    text-decoration: none;
    font-weight: 500;
}
.jd-ticker__track a::before {
    content: '';
    position: absolute;
    inset-inline-start: -23px;
    top: 50%;
    width: 6px; height: 6px;
    margin-top: -3px;
    transform: rotate(45deg);
    background: var(--jd-gold);
}
.jd-ticker__track a:hover { color: var(--jd-gold-2); }
.jd-ticker__ph {
    position: absolute;
    inset-inline-start: 0;
    color: #8fb0ba;
}
.jd-ticker__viewport:has(.jd-ticker__track a) .jd-ticker__ph { display: none; }

/* ---- masthead ------------------------------------------------------------------ */
.jd-mast {
    position: relative;
    z-index: 960;
    background: #fff;
    border-bottom: 1px solid var(--jd-line);
    overflow: clip;
}
.jd-mast::after {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 46%;
    background: var(--jd-lattice-ink) left center / 36px 36px;
    opacity: .065;
    -webkit-mask-image: linear-gradient(to right, #000 0%, transparent 92%);
    mask-image: linear-gradient(to right, #000 0%, transparent 92%);
    pointer-events: none;
}
.jd-mast__in {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 100px;
}
.jd-mast__brand { flex: none; display: block; line-height: 0; }
.jd-mast__logo { display: block; height: 70px !important; width: auto !important; }
.jd-mast__tag {
    margin: 0;
    padding-inline-start: 22px;
    border-inline-start: 3px solid var(--jd-gold);
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--jd-font-ui);
    line-height: 1.3;
}
.jd-mast__tag strong { font-size: 18px; font-weight: 800; color: var(--jd-ink); }
.jd-mast__tag span { font-size: 13.5px; font-weight: 500; color: var(--jd-muted); }
.jd-mast__search {
    margin: 0 !important;
    margin-inline-start: auto !important;
    display: flex;
    align-items: center;
    gap: 6px;
    width: min(380px, 34vw);
    height: 50px;
    padding-inline: 20px 6px;
    background: #fff;
    border: 1.5px solid var(--jd-line-2);
    border-radius: 999px;
    box-shadow: 0 6px 18px -14px rgba(10, 37, 51, .5);
    transition: border-color .2s, box-shadow .2s;
}
.jd-mast__search:focus-within { border-color: var(--jd-sea); box-shadow: 0 0 0 4px rgba(14, 105, 115, .14); }
.jd-v2 .jd-mast__search input[type="search"] {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    font: 500 14.5px/1 var(--jd-font-ui);
    color: var(--jd-text);
}
.jd-v2 .jd-mast__search button {
    flex: none;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0 !important;
    border: 0;
    border-radius: 50%;
    background: var(--jd-ink) !important;
    color: #fff !important;
    box-shadow: none !important;
    cursor: pointer;
}
.jd-v2 .jd-mast__search button:hover { background: var(--jd-sea) !important; }
.jd-mast__burger, .jd-mast__find { display: none; }

/* ---- sticky nav --------------------------------------------------------------- */
.jd-nav {
    position: sticky;
    top: 0;
    z-index: 950;
    background: var(--jd-ink);
    color: #fff;
}
body.admin-bar .jd-nav { top: 32px; }
.jd-nav__in {
    display: flex;
    align-items: center;
    gap: 4px;
    height: var(--jd-nav-h);
}
.jd-nav__mini {
    flex: none;
    display: flex;
    align-items: center;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width .28s ease, opacity .28s ease, margin .28s ease;
}
.jd-nav.is-stuck .jd-nav__mini { width: 86px; opacity: 1; margin-inline-end: 12px; }
.jd-nav__mini img { display: block; height: 38px !important; width: auto !important; max-width: none; }
.jd-nav__list {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: stretch;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}
.jd-nav__item { display: flex; margin: 0; }
.jd-v2 .jd-nav__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 15px !important;
    border: 0;
    border-radius: 0;
    background: none !important;
    box-shadow: none !important;
    color: #dbe9ed !important;
    font: 600 15px/1 var(--jd-font-ui);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s;
}
.jd-nav__link svg { flex: none; transition: transform .2s; }
.jd-nav__link::after {
    content: '';
    position: absolute;
    inset-inline: 13px;
    bottom: 10px;
    height: 6px;
    background: var(--jd-wave-gold) repeat-x center / 24px 6px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .2s, transform .2s;
}
.jd-nav__item:hover > .jd-nav__link,
.jd-nav__item:focus-within > .jd-nav__link,
.jd-nav__item.is-current > .jd-nav__link { color: #fff !important; }
.jd-nav__item:hover > .jd-nav__link::after,
.jd-nav__item:focus-within > .jd-nav__link::after,
.jd-nav__item.is-current > .jd-nav__link::after,
.jd-nav__item.is-open > .jd-nav__link::after { opacity: 1; transform: none; }
.jd-nav__item--more.is-open .jd-nav__more svg,
.jd-nav__item--more:hover .jd-nav__more svg { transform: rotate(180deg); }
.jd-v2 .jd-nav__search {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-inline-start: 8px;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: rgba(255, 255, 255, .06) !important;
    color: #fff !important;
    box-shadow: none !important;
    cursor: pointer;
}
.jd-v2 .jd-nav__search:hover { background: var(--jd-gold) !important; color: var(--jd-ink) !important; border-color: var(--jd-gold); }
.jd-nav__wave {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    width: 100%;
    height: 11px;
    z-index: 1;
    pointer-events: none;
}
.jd-nav__wave path { fill: var(--jd-ink); }
.jd-progress {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    z-index: 2;
    overflow: hidden;
}
.jd-progress i {
    display: block;
    height: 100%;
    background: linear-gradient(to left, var(--jd-gold), var(--jd-gold-2));
    transform: scaleX(0);
    transform-origin: right center;
}

/* ---- mega panels (anchored to the full-width nav, content in .jd-wrap) --------------- */
.jd-mega {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    z-index: 3;
    background: #fff;
    color: var(--jd-text);
    border-top: 3px solid var(--c, var(--jd-gold));
    box-shadow: var(--jd-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
}
.jd-nav__item--mega:hover > .jd-mega,
.jd-nav__item--mega:focus-within > .jd-mega,
.jd-nav__item--more.is-open > .jd-mega {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}
.jd-mega__in { padding-block: 24px 26px; }
.jd-mega__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.jd-mega__card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--jd-text) !important;
    text-decoration: none;
}
.jd-mega__img {
    display: block;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: var(--jd-mist);
    line-height: 0;
}
.jd-mega__img img { display: block; width: 100%; height: 100% !important; object-fit: cover; }
.jd-mega__t {
    font: 600 14.5px/1.6 var(--jd-font-ui);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.jd-mega__card:hover .jd-mega__t { color: var(--jd-sea); }
.jd-mega__all {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    font: 700 14px/1 var(--jd-font-ui);
    color: var(--jd-sea) !important;
    text-decoration: none;
}
.jd-mega__all:hover { color: var(--jd-gold-ink) !important; }
.jd-mega--more { border-top-color: var(--jd-gold); }
.jd-mega__cols {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}
.jd-mega__col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 3px solid var(--c);
    min-width: 0;
}
.jd-mega__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: 800 15px/1 var(--jd-font-ui);
    color: var(--jd-ink) !important;
    text-decoration: none;
}
.jd-mega__head:hover { color: var(--c) !important; }
.jd-mega__card--sm .jd-mega__t { font-size: 13.5px; }
.jd-mega__line {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-top: 9px;
    border-top: 1px dashed var(--jd-line-2);
    font: 500 13px/1.65 var(--jd-font-ui);
    color: var(--jd-text) !important;
    text-decoration: none;
}
.jd-mega__line:hover { color: var(--jd-sea) !important; }
.jd-mega__empty { margin: 0; color: var(--jd-muted); font: 500 13px var(--jd-font-ui); }

/* ---- mobile desk chips ---------------------------------------------------------- */
.jd-chips { display: none; }

@media (max-width: 1199.98px) {
    .jd-v2 .jd-nav__link { padding: 0 11px !important; font-size: 14px; }
    .jd-mast__tag span { display: none; }
}

@media (max-width: 1023.98px) {
    .jd-strip__dates { display: none; }
    .jd-strip__in { gap: 12px; min-height: 36px; }
    .jd-ticker__viewport { height: 36px; }
    .jd-strip__ticker { padding-inline-start: 12px; }

    .jd-mast { position: sticky; top: 0; }
    body.admin-bar .jd-mast { top: 46px; }
    .jd-mast::after { width: 100%; opacity: .05; }
    .jd-mast__in { min-height: 64px; justify-content: space-between; gap: 8px; }
    .jd-mast__tag, .jd-mast__search { display: none; }
    .jd-mast__brand { position: absolute; left: 50%; transform: translateX(-50%); }
    .jd-mast__logo { height: 46px !important; }
    .jd-v2 .jd-mast__burger,
    .jd-v2 .jd-mast__find {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0 !important;
        border: 1px solid var(--jd-line-2);
        border-radius: 13px;
        background: #fff !important;
        color: var(--jd-ink) !important;
        box-shadow: none !important;
        cursor: pointer;
    }
    .jd-v2 .jd-mast__burger { background: var(--jd-ink) !important; border-color: var(--jd-ink); color: #fff !important; }
    .jd-mast__burger svg, .jd-mast__find svg { flex: none; }

    .jd-nav { display: none; }

    .jd-chips {
        display: block;
        background: #fff;
        border-bottom: 1px solid var(--jd-line);
    }
    .jd-chips__track {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 16px;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    .jd-chips__track::-webkit-scrollbar { display: none; }
    .jd-chip {
        flex: none;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        height: 36px;
        padding: 0 14px;
        border-radius: 999px;
        background: var(--jd-mist);
        color: var(--jd-ink) !important;
        font: 600 13.5px/1 var(--jd-font-ui);
        text-decoration: none;
        white-space: nowrap;
        scroll-snap-align: center;
    }
    .jd-chip::before {
        content: '';
        width: 8px; height: 8px;
        border-radius: 50%;
        background: var(--c, var(--jd-gold));
    }
    .jd-chip.is-current { background: var(--jd-ink); color: #fff !important; }
}

@media (max-width: 600px) {
    body.admin-bar .jd-mast { top: 0; }
    .jd-strip__city { display: none; }
    .jd-strip__live { padding: 5px 9px; }
}
