/* ——— Floating glass header ——— */
:root {
    --club-header-h: 76px;
    --club-header-gap: 12px;
    --club-header-space: calc(var(--club-header-h) + var(--club-header-gap) * 2);
    --club-ink: #17171a;
    --club-ink-soft: #737578;
    --club-ink-muted: #737578;
    --club-gold: #c3a435;
    --club-gold-deep: #b89b30;
    --club-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.club-public-body {
    padding-top: var(--club-header-space);
}

.club-header {
    position: fixed;
    top: var(--club-header-gap);
    right: 0;
    left: 0;
    z-index: 990;
    padding-inline: clamp(12px, 2.4vw, 32px);
    pointer-events: none;
    transition: top 0.5s var(--club-ease);
}

.club-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.4vw, 20px);
    max-width: min(100%, 1400px);
    min-height: var(--club-header-h);
    height: var(--club-header-h);
    margin-inline: auto;
    padding-inline: clamp(10px, 1.8vw, 18px) clamp(12px, 2vw, 20px);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(115, 117, 120, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 12px 36px -22px rgba(23, 23, 26, 0.18),
        0 1px 0 rgba(255, 255, 255, 0.6);
    pointer-events: auto;
    transition: background-color 0.5s var(--club-ease), box-shadow 0.5s var(--club-ease);
}

.club-header__bar::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline: 20px;
    height: 3px;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(
        90deg,
        var(--club-green, #4cae51) 0%,
        var(--club-blue, #32a1d9) 50%,
        var(--club-purple, #aa2868) 100%
    );
    opacity: 0.85;
    pointer-events: none;
}

.club-header__bar::after {
    content: "";
    position: absolute;
    inset-inline: 24px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(to left, rgba(115, 117, 120, 0.12), transparent 80%);
    pointer-events: none;
}

.club-header.is-scrolled {
    top: 10px;
}

.club-header.is-scrolled .club-header__bar {
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 16px 40px -20px rgba(23, 23, 26, 0.14),
        0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Brand */
.club-header__brand {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.club-header__mark {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(115, 117, 120, 0.12), 0 6px 16px -8px rgba(23, 23, 26, 0.2);
    transition: box-shadow 0.5s var(--club-ease), transform 0.5s var(--club-ease);
}

.club-header__brand:hover .club-header__mark,
.club-header__brand:focus-visible .club-header__mark {
    transform: scale(1.05);
    box-shadow:
        0 0 0 1px rgba(50, 161, 217, 0.45),
        0 0 0 8px rgba(50, 161, 217, 0.12),
        0 12px 34px -6px rgba(50, 161, 217, 0.35);
}

.club-header__logo {
    display: block;
    width: 52px;
    height: 52px;
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
}

.club-header__mark-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--club-ink);
}

.club-header__brand-name {
    display: none;
    max-width: 11rem;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--club-ink);
}

/* Navigation */
.club-nav {
    position: relative;
    display: none;
    flex: 1 1 auto;
    align-self: stretch;
    align-items: center;
    justify-content: stretch;
    min-width: 0;
}

.club-nav__list {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.club-nav__item {
    position: relative;
}

.club-header .club-nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: var(--club-ink-soft);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.club-nav__link::after {
    content: "";
    position: absolute;
    right: 14px;
    left: 14px;
    bottom: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--club-blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s var(--club-ease);
}

.club-header .club-nav__link:hover,
.club-header .club-nav__link:focus-visible,
.club-nav__item.is-open > .club-nav__link {
    color: var(--club-ink);
}

.club-nav__link:hover::after,
.club-nav__link:focus-visible::after,
.club-nav__item.is-open > .club-nav__link::after {
    transform: scaleX(1);
}

.club-header .club-nav__link:focus-visible {
    outline: 2px solid rgba(50, 161, 217, 0.45);
    outline-offset: 2px;
}

.club-header .club-nav__link.is-active {
    color: var(--club-ink);
    font-weight: 600;
    background: rgba(50, 161, 217, 0.1);
    box-shadow: inset 0 0 0 1px rgba(50, 161, 217, 0.22);
}

.club-nav__icon {
    flex-shrink: 0;
    color: var(--club-ink-muted);
    transition: color 0.3s ease, transform 0.45s var(--club-ease);
}

.club-nav__link:hover .club-nav__icon,
.club-nav__link.is-active .club-nav__icon,
.club-nav__item.is-open > .club-nav__link .club-nav__icon {
    color: var(--club-blue);
}

.club-nav__link:hover .club-nav__icon {
    transform: translateY(-1px);
}

.club-nav__chevron {
    flex-shrink: 0;
    color: var(--club-ink-muted);
    transition: transform 0.45s var(--club-ease);
}

.club-nav__item--has-menu:hover > .club-nav__link .club-nav__chevron,
.club-nav__item.is-open > .club-nav__link .club-nav__chevron {
    transform: rotate(180deg);
}

.club-nav__dot {
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--club-blue);
    box-shadow: 0 0 0 3px rgba(50, 161, 217, 0.18);
    opacity: 0;
    transform: translateX(var(--dot-x, 0));
    transition: transform 0.55s var(--club-ease), opacity 0.3s ease;
    pointer-events: none;
}

.club-nav.has-dot .club-nav__dot {
    opacity: 1;
}

/* Dropdown */
.club-nav__menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 5;
    min-width: 236px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(23, 23, 26, 0.94);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 56px -20px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -10px);
    transition:
        opacity 0.35s ease,
        transform 0.45s var(--club-ease),
        visibility 0s linear 0.45s;
}

.club-nav__menu::before {
    content: "";
    position: absolute;
    right: 0;
    left: 0;
    top: -16px;
    height: 16px;
}

.club-nav__item--has-menu:hover > .club-nav__menu,
.club-nav__item--has-menu:focus-within:not(.is-dismissed) > .club-nav__menu,
.club-nav__item.is-open > .club-nav__menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

.club-nav__menu-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.club-nav__menu-list li {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.4s var(--club-ease);
}

.club-nav__item--has-menu:hover .club-nav__menu-list li,
.club-nav__item--has-menu:focus-within:not(.is-dismissed) .club-nav__menu-list li,
.club-nav__item.is-open .club-nav__menu-list li {
    opacity: 1;
    transform: none;
    transition-delay: calc(var(--i, 0) * 45ms + 60ms);
}

.club-header .club-nav__menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.club-header .club-nav__menu-link::after {
    content: "";
    position: absolute;
    right: 14px;
    bottom: 8px;
    left: 14px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--club-blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s var(--club-ease);
}

.club-header .club-nav__menu-link:hover,
.club-header .club-nav__menu-link:focus-visible {
    color: #fff;
    background: rgba(50, 161, 217, 0.15);
    outline: none;
}

.club-header .club-nav__menu-link:hover::after,
.club-header .club-nav__menu-link:focus-visible::after {
    transform: scaleX(1);
}

.club-header .club-nav__menu-link.is-active {
    color: #fff;
}

.club-header .club-nav__menu-link.is-active::after {
    transform: scaleX(1);
}

.club-nav__menu-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.3);
    transition: transform 0.45s var(--club-ease), color 0.3s ease;
}

.club-nav__menu-link:hover .club-nav__menu-arrow,
.club-nav__menu-link:focus-visible .club-nav__menu-arrow {
    color: var(--club-blue);
    transform: translateX(-3px);
}

/* Actions (mobile menu toggle) */
.club-header__actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    margin-inline-start: auto;
}

@media (min-width: 1200px) {
    .club-header__actions {
        display: none;
    }
}

/* Burger (keeps the theme's .burger-icon hook for the mobile drawer) */
.club-header .club-header__burger {
    position: relative;
    top: auto;
    right: auto;
    z-index: auto;
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: rgba(50, 161, 217, 0.08);
    box-shadow: inset 0 0 0 1px rgba(50, 161, 217, 0.15);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.club-header .club-header__burger:hover {
    background: rgba(50, 161, 217, 0.14);
    box-shadow: inset 0 0 0 1px rgba(50, 161, 217, 0.28);
}

.club-header .club-header__burger > span {
    left: 12px;
    width: 20px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--club-ink);
    transition: transform 0.35s var(--club-ease), opacity 0.2s ease;
}

.club-header .club-header__burger > span::before,
.club-header .club-header__burger > span::after {
    display: none;
}

.club-header .club-header__burger > span.burger-icon-top {
    top: 15px;
}

.club-header .club-header__burger > span.burger-icon-mid {
    top: 21px;
}

.club-header .club-header__burger > span.burger-icon-bottom {
    top: auto;
    bottom: 15px;
}

.club-header .club-header__burger.burger-close > span.burger-icon-mid {
    top: 21px;
    transform: rotate(45deg);
}

.club-header .club-header__burger.burger-close > span.burger-icon-bottom {
    bottom: 21.5px;
    transform: rotate(-45deg);
}

/* Breakpoints — desktop: RTL → الشعار في العمود الأول (يمين الشاشة) */
@media (min-width: 1200px) {
    .club-header__bar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        column-gap: clamp(12px, 2vw, 28px);
    }

    .club-header__brand {
        grid-column: 1;
        grid-row: 1;
        justify-self: end;
    }

    .club-nav {
        grid-column: 2;
        grid-row: 1;
        display: flex;
    }

    .club-header__actions {
        display: none;
    }

    .club-nav__list {
        justify-content: space-evenly;
        gap: clamp(4px, 0.65vw, 10px);
        padding-inline: clamp(4px, 1vw, 16px);
    }

    .club-header__brand-name {
        display: block;
        max-width: 11rem;
        font-size: 13px;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    /* بدون أيقونات على الشاشات المتوسطة — نص أوضح وأوسع */
    .club-nav__icon {
        display: none;
    }

    .club-header .club-nav__link {
        padding: 0 9px;
        font-size: 13px;
    }
}

@media (min-width: 1400px) {
    .club-nav__icon {
        display: block;
    }

    .club-header .club-nav__link {
        padding: 0 12px;
        font-size: 14px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .club-header__brand-name {
        display: block;
    }
}

@media (max-width: 1199.98px) {
    .club-header .club-header__burger {
        display: block;
    }
}

@media (max-width: 575.98px) {
    :root {
        --club-header-h: 72px;
        --club-header-gap: 10px;
    }

    .club-header__bar {
        border-radius: 18px;
    }

    .club-header__mark {
        width: 58px;
        height: 58px;
    }

    .club-header__logo {
        width: 46px;
        height: 46px;
        max-width: 46px;
        max-height: 46px;
    }

    .club-header__mark-text {
        font-size: 22px;
    }

    .club-header__brand-name {
        max-width: 7.5rem;
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .club-header *,
    .club-header *::before,
    .club-header *::after {
        animation: none !important;
        transition: none !important;
    }
}
