﻿/* ========== NL7ZA Header — single source: public/assets/css/header.css ========== */
.site-header {
    display: block;
    width: 100%;
    position: relative;
    z-index: 200;
    min-height: var(--header-shell-height-mobile, var(--header-mainbar-height, 60px));
}

@media (min-width: 1025px) {
    .site-header {
        min-height: var(--header-shell-height, calc(var(--header-topbar-height, 42px) + var(--header-mainbar-height, 60px)));
    }
}

.site-header--dual {
    background: transparent;
    --hdr-sky-light: #e0f2fe;
    --hdr-sky-soft: #bae6fd;
    --hdr-sky-mid: #38bdf8;
    --hdr-sky-brand: #0369a1;
    --hdr-sky-dark: #075985;
    --hdr-sky-deep: #0c4a6e;
    --hdr-sky-ink: #0a3d5c;
    --hdr-navy: #0c4a6e;
    --hdr-navy-hover: #0e5a82;
}

/* ===== Smart mainbar — fixed عند التمرير + إظهار عند الصعود ===== */
.site-header--sticky-enabled .header-sticky-pin {
    display: block;
    height: 0;
    pointer-events: none;
}

.site-header--sticky-enabled.is-mainbar-pinned .header-sticky-pin {
    height: var(--header-mainbar-height, 60px);
}

.site-header--sticky-enabled.is-mainbar-pinned .header-mainbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 220;
    transform: translate3d(0, 0, 0);
    transition:
        transform 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.32s ease;
    will-change: transform;
}

.site-header--sticky-enabled.is-mainbar-pinned.is-mainbar-hidden .header-mainbar {
    transform: translate3d(0, -105%, 0);
    pointer-events: none;
}

.site-header--sticky-enabled.is-mainbar-pinned .header-mainbar {
    box-shadow: 0 10px 36px rgba(3, 105, 161, 0.32);
}

.site-header--sticky-enabled.is-mainbar-pinned .header-mainbar-bg {
    background: rgba(0, 0, 0, 0.12);
}

.site-header--sticky-enabled.is-mainbar-pinned .header-edge {
    opacity: 1;
}

html.has-sticky-header {
    scroll-padding-top: calc(var(--header-scroll-offset, 0px) + 8px);
}

body.header-drawer-open .site-header--sticky-enabled.is-mainbar-pinned.is-mainbar-hidden .header-mainbar,
body.header-search-open .site-header--sticky-enabled.is-mainbar-pinned.is-mainbar-hidden .header-mainbar {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .site-header--sticky-enabled.is-mainbar-pinned .header-mainbar {
        transition: none;
    }
}

/* ===== TOP BAR ===== */
.header-topbar {
    position: relative;
    z-index: 3;
    min-height: var(--header-topbar-height, 42px);
    display: flex;
    align-items: center;
    background: var(--hdr-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.header-topbar-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: var(--header-topbar-height, 42px);
    padding: 7px 0;
}

.header-topbar-side {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-topbar-side--end {
    justify-content: flex-end;
}

.header-topbar-inner--no-news {
    grid-template-columns: auto auto;
    justify-content: space-between;
}

.header-topbar-inner:not(:has(.header-topbar-side--start)) {
    grid-template-columns: 1fr auto;
}

.header-topbar-inner:not(:has(.header-topbar-side--end)) {
    grid-template-columns: auto 1fr;
}

.header-topbar-inner:not(:has(.header-topbar-side--start)):not(:has(.header-topbar-side--end)) {
    grid-template-columns: 1fr;
}

.header-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 8px;
    border: 1.5px solid rgba(186, 230, 253, 0.28);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    color: #e0f2fe;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.header-date-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1.5px solid rgba(186, 230, 253, 0.3);
    color: #bae6fd;
    flex-shrink: 0;
}

/* Latest news strip — sky ticker */
.header-news-strip {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 220px;
    height: 38px;
    border: 1.5px solid var(--hdr-sky-mid);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 100%);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
    overflow: hidden;
}

.header-news-strip__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--hdr-sky-deep) 0%, var(--hdr-sky-dark) 50%, var(--hdr-sky-brand) 100%);
    color: #fff;
    border-inline-end: 1.5px solid rgba(186, 230, 253, 0.45);
    position: relative;
    z-index: 3;
}

.header-news-strip__live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28);
    flex-shrink: 0;
}

.header-news-strip__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(125, 211, 252, 0.35);
    color: #7dd3fc;
}

.header-news-strip__icon .header-icon {
    width: 12px;
    height: 12px;
}

.header-news-strip__label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.header-news-strip__viewport {
    flex: 1 1 auto;
    min-width: 140px;
    overflow: hidden;
    position: relative;
    display: block;
    direction: ltr;
    background: #fff;
}

.header-news-strip__viewport::before,
.header-news-strip__viewport::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22px;
    z-index: 2;
    pointer-events: none;
}

.header-news-strip__viewport::before {
    left: 0;
    background: linear-gradient(to right, #fff 15%, transparent);
}

.header-news-strip__viewport::after {
    right: 0;
    background: linear-gradient(to left, #f0f9ff 15%, transparent);
}

.header-news-strip__track {
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 38px;
    gap: 0;
    direction: ltr;
}

.header-news-strip__track--animate {
    animation: header-news-ticker var(--ticker-duration, 60s) linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .header-news-strip__track--animate {
        animation: none;
    }
}

.header-news-strip__viewport:hover .header-news-strip__track--animate {
    animation-play-state: paused;
}

@keyframes header-news-ticker {
    0% { transform: translate3d(calc(-1 * var(--ticker-shift, 50%)), 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

.header-news-strip__group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
}

.header-news-strip__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px;
    color: var(--hdr-sky-deep);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    border-inline-end: 1px solid var(--hdr-sky-soft);
    height: 38px;
    flex-shrink: 0;
    direction: rtl;
}

.header-news-strip__link:last-child {
    border-inline-end: none;
}

.header-news-strip__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0284c7;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.header-news-strip__link:hover {
    color: #0284c7;
}

.header-news-strip__link:hover .header-news-strip__dot {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

@media (prefers-reduced-motion: reduce) {
    .header-news-strip__track--animate {
        animation: none;
    }

    .header-news-strip__track {
        flex-wrap: wrap;
        width: 100%;
        padding: 0 10px;
    }

    .header-news-strip__group[aria-hidden="true"] {
        display: none;
    }

    .header-news-strip {
        height: auto;
        min-height: 38px;
    }

    .header-news-strip__link {
        height: auto;
        padding: 8px 12px;
        white-space: normal;
    }
}

.header-social {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(186, 230, 253, 0.28);
    border-radius: 12px;
    box-shadow: none;
}

.header-follow-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
    font-weight: 800;
    font-size: 11px;
    border: 1.5px solid rgba(186, 230, 253, 0.25);
    white-space: nowrap;
}

.header-social-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #bae6fd;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(186, 230, 253, 0.25);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-social-link:hover {
    color: #fff;
    background: #0284c7;
    border-color: #0284c7;
}

.header-social-link--facebook:hover { background: #1877f2; }
.header-social-link--twitter:hover { background: #0f172a; }
.header-social-link--telegram:hover { background: #0088cc; }
.header-social-link--instagram:hover { background: linear-gradient(45deg, #f09433, #dc2743); }
.header-social-link--youtube:hover { background: #ff0000; }

/* ===== MAIN BAR — unified dark sky / navy ===== */
.header-mainbar {
    position: relative;
    z-index: 2;
    padding: 0;
    margin: 0;
    background: var(--hdr-navy);
    box-shadow: 0 4px 20px rgba(7, 47, 73, 0.35);
    overflow: visible;
}

.header-mainbar::before,
.header-mainbar::after {
    display: none;
}

.header-mainbar-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: transparent;
}

.header-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--header-mainbar-height, 60px);
    min-height: var(--header-mainbar-height, 60px);
    padding-block: 8px;
}

.header-row-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-logo-shell {
    padding: 7px 16px;
    background: var(--hdr-navy);
    border: 1.5px solid rgba(186, 230, 253, 0.22);
    border-radius: 14px;
    box-shadow: none;
}

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-weight: 900;
    font-size: 20px;
    padding: 0;
}

.header-logo-img {
    width: auto;
    height: var(--header-logo-max-height, 38px);
    max-width: var(--header-logo-max-width, 200px);
    max-height: min(var(--header-logo-max-height, 38px), calc(var(--header-mainbar-height, 60px) - 22px));
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.header-logo-text {
    color: #e0f2fe;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* Navigation — pill links on dark band */
.header-nav {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.header-nav-viewport {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.header-nav--mega {
    overflow: visible;
}

.header-nav--mega .header-nav-list {
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    width: auto;
    max-width: 100%;
    gap: 4px 6px;
    padding: 2px 4px;
}

.header-nav-item {
    position: relative;
    flex-shrink: 0;
}

.header-nav-item.has-mega > .header-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-nav-caret {
    flex-shrink: 0;
    opacity: 0.75;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-nav-item.has-mega:hover > .header-nav-link .header-nav-caret,
.header-nav-item.has-mega.is-open > .header-nav-link .header-nav-caret {
    transform: rotate(180deg);
    opacity: 1;
}

.header-nav-mega {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    padding: 8px;
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(12, 74, 110, 0.96) 100%);
    border: 1px solid rgba(125, 211, 252, 0.35);
    box-shadow:
        0 18px 40px rgba(2, 6, 23, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.98);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
}

.header-nav-item.has-mega:hover > .header-nav-mega,
.header-nav-item.has-mega:focus-within > .header-nav-mega,
.header-nav-item.has-mega.is-open > .header-nav-mega {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.header-nav-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.header-nav-mega-link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(224, 242, 254, 0.95);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.header-nav-mega-link:hover,
.header-nav-mega-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateX(-2px);
}

.header-nav-scroll-group {
    display: none;
    align-items: center;
    flex-shrink: 0;
    padding: 3px;
    border-radius: 13px;
    background:
        linear-gradient(145deg, rgba(56, 189, 248, 0.18) 0%, rgba(14, 165, 233, 0.06) 100%);
    border: 1px solid rgba(125, 211, 252, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 4px 18px rgba(2, 132, 199, 0.18);
    gap: 0;
}

.header-nav.has-overflow .header-nav-scroll-group {
    display: flex;
}

.header-nav-scroll-divider {
    width: 1px;
    height: 20px;
    background: linear-gradient(180deg, transparent, rgba(186, 230, 253, 0.45), transparent);
    flex-shrink: 0;
}

.header-nav-scroll {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #e0f2fe;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.header-nav-scroll:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    transform: scale(1.06);
}

.header-nav-scroll:active:not(:disabled) {
    transform: scale(0.96);
}

.header-nav-scroll:disabled {
    opacity: 0.32;
    cursor: default;
    transform: none;
}

.header-nav-scroll:focus-visible {
    outline: 2px solid rgba(125, 211, 252, 0.85);
    outline-offset: 2px;
}

.header-nav-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.header-nav-fade--start {
    right: 0;
    background: linear-gradient(to left, var(--hdr-navy), transparent);
}

.header-nav-fade--end {
    left: 0;
    background: linear-gradient(to right, var(--hdr-navy), transparent);
}

.header-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 6px;
    margin: 0;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.header-nav--mega .header-nav-list {
    overflow: visible;
}

.header-nav-list li {
    flex-shrink: 0;
}

.header-nav-link {
    display: block;
    position: relative;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    color: rgba(224, 242, 254, 0.95);
    text-decoration: none;
}

.header-nav-link span {
    display: block;
    padding: 0 16px;
    height: 38px;
    line-height: 38px;
    border-radius: 11px;
    border: 1px solid rgba(186, 230, 253, 0.28);
    background: rgba(255, 255, 255, 0.07);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-nav-link::after {
    display: none;
}

.header-nav-link:hover,
.header-nav-link.active {
    color: var(--hdr-sky-deep);
}

.header-nav-link:hover span,
.header-nav-link.active span {
    background: linear-gradient(180deg, #ffffff 0%, var(--hdr-sky-light) 100%);
    border-color: var(--hdr-sky-soft);
    color: var(--hdr-sky-deep);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.22);
}

.header-nav--gradient,
.header-nav--pills {
    align-self: center;
    margin: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.18);
    padding: 4px;
}

.header-nav--gradient .header-nav-link span,
.header-nav--pills .header-nav-link span {
    height: 36px;
    line-height: 36px;
    border-radius: 10px;
}

/* Action buttons */
.header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.header-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border: 1.5px solid rgba(186, 230, 253, 0.28);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.1);
    color: #e0f2fe;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    padding: 0;
    cursor: pointer;
}

.header-action-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(125, 211, 252, 0.55);
    color: #fff;
}

.header-icon {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.header-action-btn svg,
.header-social-link svg,
.header-drawer-close svg,
.header-search-close svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.header-icon-sun { display: none; }
html.site-dark .header-icon-moon { display: none; }
html.site-dark .header-icon-sun { display: block; }

/* Dark mode — header surfaces */
html.site-dark .header-topbar {
    background: #0a3d5c;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

html.site-dark .header-mainbar {
    background: #0a3d5c;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

html.site-dark .header-mainbar::before,
html.site-dark .header-mainbar::after {
    display: none;
}

html.site-dark .header-mainbar-bg {
    background: transparent;
}

html.site-dark .header-date-chip {
    background: rgba(15, 23, 42, 0.75);
    border-color: #334155;
    color: #cbd5e1;
}

html.site-dark .header-news-strip {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #0369a1;
}

html.site-dark .header-news-strip__viewport {
    background: #0f172a;
}

html.site-dark .header-news-strip__viewport::before {
    background: linear-gradient(to right, #0f172a 15%, transparent);
}

html.site-dark .header-news-strip__viewport::after {
    background: linear-gradient(to left, #1e293b 15%, transparent);
}

html.site-dark .header-news-strip__link {
    color: #e0f2fe;
    border-inline-end-color: #334155;
}

html.site-dark .header-social {
    background: rgba(15, 23, 42, 0.85);
    border-color: #334155;
}

html.site-dark .header-follow-chip {
    color: #94a3b8;
}

html.site-dark .header-social-link {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #7dd3fc;
}

html.site-dark .header-logo-shell {
    background: #0a3d5c;
    border-color: rgba(186, 230, 253, 0.18);
}

html.site-dark .header-logo-text {
    color: #7dd3fc;
}

html.site-dark .header-nav--gradient,
html.site-dark .header-nav--pills {
    background: rgba(15, 23, 42, 0.45);
    border-color: #334155;
}

html.site-dark .header-nav-link {
    color: #e0f2fe;
}

html.site-dark .header-nav-link span {
    border-color: rgba(51, 65, 85, 0.85);
    background: rgba(15, 23, 42, 0.55);
}

html.site-dark .header-nav-link:hover span,
html.site-dark .header-nav-link.active span {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-color: #0284c7;
    color: #7dd3fc;
}

html.site-dark .header-nav-mega {
    background: linear-gradient(165deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.97) 100%);
    border-color: rgba(56, 189, 248, 0.28);
}

html.site-dark .header-nav-mega-link:hover,
html.site-dark .header-nav-mega-link.active {
    background: rgba(56, 189, 248, 0.14);
    color: #e0f2fe;
}

html.site-dark .header-action-btn {
    background: rgba(15, 23, 42, 0.82);
    border-color: #334155;
    color: #7dd3fc;
}

html.site-dark .header-action-btn:hover {
    background: #1e293b;
    border-color: #0284c7;
    color: #bae6fd;
}

html.site-dark .header-nav-scroll-group {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.14) 0%, rgba(15, 23, 42, 0.55) 100%);
    border-color: rgba(51, 65, 85, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.25);
}

html.site-dark .header-nav-scroll:hover:not(:disabled) {
    background: rgba(30, 41, 59, 0.85);
    color: #bae6fd;
}

html.site-dark .header-nav-fade--end {
    background: linear-gradient(to right, #0a3d5c, transparent);
}

html.site-dark .header-nav-fade--start {
    background: linear-gradient(to left, #0a3d5c, transparent);
}

.header-menu-btn {
    display: flex;
}

@media (min-width: 1025px) {
    .header-action-btn--search {
        order: 0;
    }

    .header-action-btn--theme {
        order: 1;
    }

    .header-action-btn--menu {
        order: 2;
    }
}

.header-edge {
    height: 3px;
    background: #1484b8;
    opacity: 0.85;
}

/* Search overlay */
.header-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(10, 22, 40, 0.88);
    backdrop-filter: blur(10px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 20px;
    pointer-events: none;
}

.header-search-overlay.is-open {
    display: flex;
    pointer-events: auto;
}

.header-search-panel {
    width: 100%;
    max-width: min(640px, var(--max-width, 1280px));
    background: var(--color-bg);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid var(--color-border);
}

.header-search-overlay.is-open .header-search-panel {
    animation: headerPanelIn 0.2s ease;
}

@keyframes headerPanelIn {
    from { transform: translateY(-8px); opacity: 0.9; }
    to { transform: translateY(0); opacity: 1; }
}

.header-search-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: var(--color-bg-alt);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-search-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    color: var(--header-mainbar-bg, #0a1628);
}

.header-search-field-wrap {
    display: flex;
    gap: 10px;
}

.header-search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 16px;
    background: var(--color-bg-alt);
    color: var(--color-text);
    transition: var(--transition);
}

.header-search-input:focus {
    outline: none;
    border-color: var(--header-nav-accent, #38bdf8);
    background: #fff;
}

.header-search-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 22px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}

.header-search-submit .header-icon { width: 16px; height: 16px; }

/* Mobile drawer — layered premium panel */
.header-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 18, 32, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 300;
    display: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.header-mobile-backdrop.is-open {
    display: block;
    pointer-events: auto;
    opacity: 1;
}

.header-mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(340px, 92vw);
    height: 100vh;
    height: 100dvh;
    z-index: 400;
    display: none;
    flex-direction: column;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(105%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.header-mobile-drawer.is-open {
    display: flex;
    pointer-events: auto;
    transform: translateX(0);
}

.header-drawer-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(165deg, #0c4a6e 0%, #0f172a 42%, #1e293b 100%);
    overflow: hidden;
}

.header-drawer-bg__layer {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.header-drawer-bg__layer--1 {
    width: 280px;
    height: 280px;
    top: -80px;
    left: -60px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.35) 0%, transparent 68%);
}

.header-drawer-bg__layer--2 {
    width: 220px;
    height: 220px;
    bottom: 18%;
    right: -70px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.28) 0%, transparent 70%);
}

.header-drawer-bg__layer--3 {
    inset: 12px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.header-drawer-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.header-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-drawer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header-drawer-logo {
    max-height: 36px;
    max-width: min(180px, 100%);
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.header-drawer-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-drawer-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.18s ease, transform 0.18s ease;
}

.header-drawer-close:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.04);
}

.header-drawer-search {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    margin: 0 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-drawer-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
}

.header-drawer-search button {
    width: 42px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.header-drawer-nav {
    flex: 1;
    padding: 14px 12px 8px;
}

.header-drawer-nav-label {
    margin: 0 8px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(186, 230, 253, 0.85);
}

.header-drawer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.header-drawer-item {
    animation: headerDrawerItemIn 0.35s ease both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

@keyframes headerDrawerItemIn {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.header-drawer-link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.header-drawer-link:hover,
.header-drawer-link.active {
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(125, 211, 252, 0.45);
    color: #fff;
    transform: translateX(-3px);
}

.header-drawer-link__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(56, 189, 248, 0.12));
    color: #7dd3fc;
    flex-shrink: 0;
}

.header-drawer-link.active .header-drawer-link__icon {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #fff;
}

.header-drawer-link__text {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    min-width: 0;
}

.header-drawer-link__arrow {
    color: rgba(186, 230, 253, 0.7);
    flex-shrink: 0;
    transition: transform 0.18s ease, color 0.18s ease;
}

.header-drawer-link:hover .header-drawer-link__arrow,
.header-drawer-link.active .header-drawer-link__arrow {
    color: #fff;
    transform: translateX(-3px);
}

.header-drawer-tools {
    padding: 4px 12px 10px;
}

.header-drawer-theme {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.header-drawer-theme:hover,
.header-drawer-theme:focus-visible {
    background: rgba(14, 165, 233, 0.16);
    border-color: rgba(125, 211, 252, 0.42);
    transform: translateX(-2px);
    outline: none;
}

.header-drawer-theme__icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(56, 189, 248, 0.12));
    color: #7dd3fc;
    flex-shrink: 0;
}

.header-drawer-theme__copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.header-drawer-theme__title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
}

.header-drawer-theme__hint {
    font-size: 12px;
    font-weight: 600;
    color: rgba(186, 230, 253, 0.78);
    line-height: 1.35;
}

.header-drawer-theme__switch {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.header-drawer-theme__knob {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(180deg, #fff 0%, #e2e8f0 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
    transition: transform 0.22s ease, background 0.22s ease;
}

html.site-dark .header-drawer-theme__switch {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border-color: rgba(125, 211, 252, 0.55);
}

html.site-dark .header-drawer-theme__knob {
    transform: translateX(-20px);
    background: linear-gradient(180deg, #fff 0%, #dbeafe 100%);
}

.header-drawer-social {
    padding: 16px 18px 22px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.35);
}

.header-drawer-social .header-follow-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(186, 230, 253, 0.85);
    font-size: 12px;
    font-weight: 700;
}

body.header-drawer-open,
body.header-search-open {
    overflow: hidden;
}

html.site-dark .header-search-panel {
    background: var(--color-bg);
}

html.site-dark .header-drawer-search input {
    background: rgba(255, 255, 255, 0.92);
}

html.site-dark .header-search-input {
    background: var(--color-bg-alt);
    color: #f1f5f9;
}

html.site-dark .header-search-input:focus {
    background: #1e293b;
}

/* ===== Mobile category strip (below mainbar, tablet & phone only) ===== */
.header-mobile-cats {
    display: none;
}

.header-mobile-cats__rail {
    position: relative;
    border-top: 1px solid rgba(186, 230, 253, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%),
        linear-gradient(90deg, var(--hdr-navy, #0c4a6e) 0%, #0a2744 50%, var(--hdr-navy, #0c4a6e) 100%);
    box-shadow: inset 0 1px 0 rgba(186, 230, 253, 0.08);
}

.header-mobile-cats__rail::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--color-primary, #0ea5e9) 18%,
        #38bdf8 50%,
        var(--color-primary, #0ea5e9) 82%,
        transparent 100%
    );
    opacity: 0.85;
    pointer-events: none;
}

.header-mobile-cats__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.header-mobile-cats__viewport::-webkit-scrollbar {
    display: none;
}

.header-mobile-cats__list {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 14px 8px;
    list-style: none;
    min-width: min-content;
}

.header-mobile-cats__item {
    flex: 0 0 auto;
    scroll-snap-align: center;
}

.header-mobile-cats__pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(186, 230, 253, 0.22);
    background: rgba(255, 255, 255, 0.07);
    color: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.header-mobile-cats__pill-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #bae6fd;
    flex-shrink: 0;
}

.header-mobile-cats__pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
    flex-shrink: 0;
    opacity: 0.75;
}

.header-mobile-cats__pill-text {
    max-width: 9.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-mobile-cats__pill:hover,
.header-mobile-cats__pill:focus-visible {
    color: #fff;
    border-color: rgba(125, 211, 252, 0.55);
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.header-mobile-cats__pill.is-active {
    color: #fff;
    border-color: rgba(186, 230, 253, 0.65);
    background: linear-gradient(135deg, var(--color-primary, #0ea5e9) 0%, #0284c7 100%);
    box-shadow:
        0 4px 14px rgba(14, 165, 233, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.header-mobile-cats__pill.is-active .header-mobile-cats__pill-mark {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.header-mobile-cats__pill.is-active .header-mobile-cats__pill-dot {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
    opacity: 1;
}

.header-mobile-cats__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.header-mobile-cats__fade--start {
    inset-inline-start: 0;
    background: linear-gradient(to left, transparent, rgba(10, 39, 68, 0.95));
}

.header-mobile-cats__fade--end {
    inset-inline-end: 0;
    background: linear-gradient(to right, transparent, rgba(10, 39, 68, 0.95));
}

.header-mobile-cats.has-overflow .header-mobile-cats__fade--start,
.header-mobile-cats.has-overflow .header-mobile-cats__fade--end {
    opacity: 1;
}

.header-mobile-cats.is-at-start .header-mobile-cats__fade--start,
.header-mobile-cats.is-at-end .header-mobile-cats__fade--end {
    opacity: 0;
}

html.site-dark .header-mobile-cats__rail {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%),
        linear-gradient(90deg, #0b1220 0%, #111827 50%, #0b1220 100%);
    border-top-color: rgba(148, 163, 184, 0.16);
}

html.site-dark .header-mobile-cats__pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
}

html.site-dark .header-mobile-cats__pill.is-active {
    color: #fff;
}

html.site-dark .header-mobile-cats__fade--end {
    background: linear-gradient(to right, transparent, rgba(11, 18, 32, 0.96));
}

html.site-dark .header-mobile-cats__fade--start {
    background: linear-gradient(to left, transparent, rgba(11, 18, 32, 0.96));
}

/* Responsive — tablet & mobile */
@media (max-width: 1024px) {
    .header-topbar--desktop,
    .header-news-strip {
        display: none !important;
    }

    .header-nav {
        display: none;
    }

    .header-mobile-cats {
        display: block;
        width: 100vw;
        max-width: 100vw;
        margin-inline: calc(50% - 50vw);
    }

    .header-mobile-cats__rail {
        border-top: none;
    }

    .header-mobile-cats__rail::before {
        inset-inline: unset;
        left: 0;
        right: 0;
        width: 100%;
        height: 3px;
        opacity: 1;
        border-radius: 0;
    }

    html.has-sticky-header {
        scroll-padding-top: calc(var(--header-mainbar-height, 54px) + var(--header-mobile-cats-height, 42px) + 8px);
    }

    .site-header--sticky-enabled.is-mainbar-pinned .header-sticky-pin {
        height: calc(var(--header-mainbar-height, 54px) + var(--header-mobile-cats-height, 42px));
    }

    .header-menu-btn {
        display: flex;
    }

    .header-mainbar {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
        background: var(--hdr-navy);
        overflow: visible;
    }

    .header-mainbar::before,
    .header-mainbar::after {
        display: none;
    }

    .header-mainbar-bg {
        background: transparent;
    }

    .header-row {
        --header-mainbar-height: 54px;
        height: 54px;
        min-height: 54px;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 0;
    }

    .header-mainbar > .container.header-row {
        padding-inline: 5px;
    }

    /* اللوجو يمين (بداية RTL) */
    .header-row-logo {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 122px);
        justify-content: flex-start;
        order: 1;
    }

    .header-logo-shell {
        padding: 6px 10px;
    }

    .header-logo-img {
        max-height: 36px;
        max-width: min(180px, 100%);
    }

    .header-logo-text {
        font-size: 18px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }

    /* البحث + القائمة يسار — مجموعة متوازنة */
    .header-mobile-toolbar {
        flex-shrink: 0;
        order: 2;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0;
        border-radius: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .header-action-btn--theme {
        display: none;
    }

    .header-action-btn {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        border-radius: 12px;
        border-color: rgba(255, 255, 255, 0.16);
        background: rgba(255, 255, 255, 0.08);
    }

    .header-action-btn--search {
        order: 1;
    }

    .header-action-btn--menu {
        order: 2;
        margin-left: 10px;
        background: rgba(14, 165, 233, 0.22);
        border-color: rgba(56, 189, 248, 0.45);
    }

    .header-action-btn--menu:hover,
    .header-action-btn--menu:focus-visible {
        background: rgba(14, 165, 233, 0.38);
        border-color: rgba(125, 211, 252, 0.65);
    }

    .header-action-btn .header-icon,
    .header-action-btn svg {
        width: 22px;
        height: 22px;
    }

    .site-header--sticky-enabled.is-mainbar-pinned .header-mainbar {
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
    }
}

@media (min-width: 1025px) {
    .header-nav-link {
        font-size: 12px;
    }

    .header-nav-link span {
        padding: 0 12px;
    }

    .header-nav--gradient .header-nav-link span,
    .header-nav--pills .header-nav-link span {
        height: 34px;
        line-height: 34px;
    }
}

@media (min-width: 1025px) and (max-width: 1320px) {
    .header-follow-chip {
        display: none;
    }

    .header-date-chip {
        padding-inline: 10px;
        font-size: 11px;
    }

    .header-news-strip__link {
        padding-inline: 16px;
    }
}

@media (max-width: 640px) {
    .header-row {
        --header-mainbar-height: 52px;
        height: 52px;
        min-height: 52px;
        gap: 8px;
    }

    .header-mobile-cats__list {
        padding-inline: 10px;
        gap: 7px;
    }

    .header-mobile-cats__pill {
        min-height: 32px;
        padding: 5px 12px;
        font-size: 11px;
    }

    .header-mobile-cats__pill-text {
        max-width: 7.5rem;
    }

    .header-row-logo {
        max-width: calc(100% - 116px);
    }

    .header-logo-img {
        max-height: 32px;
    }

    .header-mobile-toolbar {
        gap: 10px;
    }

    .header-action-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        border-radius: 11px;
    }

    .header-action-btn .header-icon,
    .header-action-btn svg {
        width: 21px;
        height: 21px;
    }
}

@media (max-width: 380px) {
    .header-row-logo {
        max-width: calc(100% - 108px);
    }

    .header-action-btn {
        width: 42px;
        height: 42px;
        min-width: 42px;
        min-height: 42px;
    }
}
