/* ============================================================
   Horus Custom Header — Main Stylesheet
   Transparent glass header with golden border
   ============================================================ */

/* ── CSS Custom Properties ───────────────────────────────────────────────── */
:root {
    --horus-gold:          #C9A84C;
    --horus-gold-light:    #E8C96A;
    --horus-gold-dark:     #A07830;
    --horus-header-height: 72px;
    --horus-blur:          16px;
    --horus-border-radius: 50px;
    --horus-glass-bg:      rgba(10, 8, 5, 0.45);
    --horus-glass-border:  rgba(201, 168, 76, 0.55);
    --horus-text:          #ffffff;
    --horus-nav-active:    var(--horus-gold);
    --horus-transition:    0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --horus-z:             9999;
     scroll-padding-top: 92px !important;
}

/* ── Reset / Base ────────────────────────────────────────────────────────── */
.horus-header *,
.horus-header *::before,
.horus-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Header Shell ────────────────────────────────────────────────────────── */
.horus-header {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1400px;
    z-index: var(--horus-z);
    /* Smooth scroll-aware opacity handled in JS */
    transition: top var(--horus-transition), box-shadow var(--horus-transition);
}

/* ── Glass pill container ────────────────────────────────────────────────── */
.horus-header__inner {
    display: flex;
    align-items: center;
    gap: 0;
    height: var(--horus-header-height);
    padding: 0 20px 0 20px;
    background: var(--horus-glass-bg);
    backdrop-filter: blur(var(--horus-blur)) saturate(150%);
    -webkit-backdrop-filter: blur(var(--horus-blur)) saturate(150%);
    border: 1px solid var(--horus-glass-border);
    border-radius: var(--horus-border-radius);
    box-shadow:
        0 0 0 1px rgba(201, 168, 76, 0.15) inset,
        0 8px 32px rgba(0, 0, 0, 0.35),
        0 0 60px rgba(201, 168, 76, 0.06);
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.horus-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    outline-offset: 4px;
}

.horus-header__logo img {
    display: block;
    /* width / height set by inline CSS from settings */
    object-fit: contain;
    transition: opacity var(--horus-transition);
}

.horus-header__logo:hover img,
.horus-header__logo:focus-visible img {
    opacity: 0.85;
}

.horus-header__logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--horus-gold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.horus-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.horus-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.horus-nav__item {
    position: relative;
}

.horus-nav__link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--horus-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 24px;
    transition: color var(--horus-transition), background var(--horus-transition);
    white-space: nowrap;
}

.horus-nav__link:hover,
.horus-nav__link:focus-visible {
    color: var(--horus-gold-light);
    background: rgba(201, 168, 76, 0.08);
}

/* Active / current page */
.horus-nav__item--active > .horus-nav__link,
.horus-nav__link.current-menu-item,
.current-menu-item > .horus-nav__link {
    color: var(--horus-gold);
    font-weight: 600;
}

.horus-nav__item--active > .horus-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--horus-gold);
    border-radius: 2px;
}

.horus-nav__chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform var(--horus-transition);
}

.horus-nav__item--has-children:hover > .horus-nav__link .horus-nav__chevron,
.horus-nav__item--has-children:focus-within > .horus-nav__link .horus-nav__chevron {
    transform: rotate(180deg);
}

/* ── Dropdown ────────────────────────────────────────────────────────────── */
.horus-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    list-style: none;
    background: rgba(10, 8, 5, 0.88);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid var(--horus-glass-border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
        opacity var(--horus-transition),
        visibility var(--horus-transition),
        transform var(--horus-transition);
    pointer-events: none;
    z-index: 10;
}

[dir="rtl"] .horus-dropdown {
    left: auto;
    right: 0;
}

.horus-nav__item--has-children:hover > .horus-dropdown,
.horus-nav__item--has-children:focus-within > .horus-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.horus-dropdown .horus-nav__item { width: 100%; }

.horus-dropdown .horus-nav__link {
    font-size: 0.875rem;
    border-radius: 10px;
    padding: 9px 14px;
    width: 100%;
}

/* ── Right Actions Area ──────────────────────────────────────────────────── */
.horus-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 16px;
}

[dir="rtl"] .horus-header__actions {
    margin-left: 0;
    margin-right: auto;
    padding-left: 0;
    padding-right: 16px;
}

/* ── Shipment Button ─────────────────────────────────────────────────────── */
.horus-btn-shipment {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, var(--horus-gold) 0%, var(--horus-gold-dark) 100%);
    color: #1a1200;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid rgba(255, 220, 100, 0.4);
    box-shadow: 0 2px 12px rgba(201, 168, 76, 0.35);
    white-space: nowrap;
    transition:
        background var(--horus-transition),
        box-shadow var(--horus-transition),
        transform var(--horus-transition);
    will-change: transform;
}

.horus-btn-shipment svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: #1a1200;
}

.horus-btn-shipment:hover,
.horus-btn-shipment:focus-visible {
    background: linear-gradient(135deg, var(--horus-gold-light) 0%, var(--horus-gold) 100%);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.55);
    transform: translateY(-1px);
    color: #0a0800;
}

/* ── Language Switcher ───────────────────────────────────────────────────── */
.horus-lang-switcher {
    position: relative;
}

.horus-lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid rgba(201, 168, 76, 0.45);
    border-radius: 50px;
    padding: 7px 12px 7px 10px;
    color: var(--horus-gold-light);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: background var(--horus-transition), border-color var(--horus-transition);
}

.horus-lang-switcher__toggle svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke: var(--horus-gold);
}

.horus-lang-switcher__toggle:hover,
.horus-lang-switcher__toggle:focus-visible,
.horus-lang-switcher--open .horus-lang-switcher__toggle {
    background: rgba(201, 168, 76, 0.22);
    border-color: var(--horus-gold);
}

.horus-lang-switcher__current {
    min-width: 20px;
    text-align: center;
}

.horus-lang-switcher__dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 140px;
    list-style: none;
    background: rgba(10, 8, 5, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--horus-glass-border);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition:
        opacity var(--horus-transition),
        visibility var(--horus-transition),
        transform var(--horus-transition);
    pointer-events: none;
    z-index: 20;
}

[dir="rtl"] .horus-lang-switcher__dropdown {
    right: auto;
    left: 0;
}

.horus-lang-switcher--open .horus-lang-switcher__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.horus-lang-switcher__dropdown li { list-style: none; }

.horus-lang-switcher__dropdown a {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    color: var(--horus-text);
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 10px;
    transition: background var(--horus-transition), color var(--horus-transition);
}

.horus-lang-switcher__dropdown a:hover,
.horus-lang-switcher__dropdown .horus-lang--active a,
.horus-lang-switcher__dropdown a.horus-lang--active {
    background: rgba(201, 168, 76, 0.15);
    color: var(--horus-gold-light);
}

/* ── Hamburger (mobile) ──────────────────────────────────────────────────── */
.horus-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    transition: background var(--horus-transition);
}

[dir="rtl"] .horus-hamburger {
    margin-left: 0;
    margin-right: auto;
}

.horus-hamburger:hover {
    background: rgba(201, 168, 76, 0.2);
}

.horus-hamburger__bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--horus-gold);
    border-radius: 2px;
    transition: transform var(--horus-transition), opacity var(--horus-transition), width var(--horus-transition);
    transform-origin: center;
}

.horus-hamburger[aria-expanded="true"] .horus-hamburger__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.horus-hamburger[aria-expanded="true"] .horus-hamburger__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.horus-hamburger[aria-expanded="true"] .horus-hamburger__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile drawer ───────────────────────────────────────────────────────── */
.horus-mobile-menu {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px 20px;
    background: rgba(10, 8, 5, 0.92);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--horus-glass-border);
    border-radius: 24px;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity var(--horus-transition),
        padding var(--horus-transition);
}

.horus-mobile-menu.horus-mobile-menu--open {
    max-height: 600px;
    opacity: 1;
}

.horus-mobile-nav__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.horus-mobile-nav__list .menu-item > a {
    display: block;
    padding: 12px 16px;
    color: var(--horus-text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    transition: background var(--horus-transition), color var(--horus-transition);
}

.horus-mobile-nav__list .menu-item > a:hover,
.horus-mobile-nav__list .current-menu-item > a {
    background: rgba(201, 168, 76, 0.1);
    color: var(--horus-gold);
}

.horus-mobile-nav__list .sub-menu {
    list-style: none;
    padding-left: 16px;
    margin-top: 4px;
}

[dir="rtl"] .horus-mobile-nav__list .sub-menu {
    padding-left: 0;
    padding-right: 16px;
}

.horus-mobile-nav__list .sub-menu a {
    font-size: 0.9rem !important;
    color: rgba(255,255,255,0.75) !important;
}

.horus-btn-shipment--mobile {
    margin-top: 12px;
    align-self: flex-start;
}

.horus-mobile-menu .horus-lang-switcher {
    margin-top: 8px;
}

/* ── Body offset (so content doesn't hide under fixed header) ─────────────── */
body {
    padding-top: 0 !important; /* Theme padding handled below */
}

/* ── SPACER — only injects gap on non-home pages ─────────────────────────── */
.horus-header-spacer {
    height: calc(var(--horus-header-height) + 32px);
}

/* On the homepage we overlay the first section — no spacer needed */
.home .horus-header-spacer { display: none; }

/* ── Responsive Breakpoints ──────────────────────────────────────────────── */

/* Large screens — slightly compact nav */
@media (max-width: 1200px) {
    .horus-nav__link { padding: 8px 10px; }
}

/* Tablet / small laptop */
@media (max-width: 1024px) {
    :root { --horus-header-height: 64px; }

    .horus-header__nav,
    .horus-header__actions { display: none; }

    .horus-hamburger { display: flex; }

    .horus-mobile-menu { display: flex; }
}

/* Mobile */
@media (max-width: 640px) {
    :root { --horus-header-height: 60px; }

    .horus-header {
        top: 10px;
        width: calc(100% - 20px);
    }

    .horus-header__inner {
        padding: 0 14px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .horus-header {
        width: calc(100% - 12px);
        top: 6px;
    }
}

/* ── RTL overrides ───────────────────────────────────────────────────────── */
[dir="rtl"] .horus-nav__list { flex-direction: row-reverse; }
[dir="rtl"] .horus-dropdown  { left: auto; right: 0; }

/* ── Focus-visible outlines ──────────────────────────────────────────────── */
.horus-header a:focus-visible,
.horus-header button:focus-visible {
    outline: 2px solid var(--horus-gold);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Smooth scroll support ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .horus-header,
    .horus-header *,
    .horus-header *::before,
    .horus-header *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
