/* HAKIM Theme — Layout Styles */

/* ==========================================================================
   Header
   ========================================================================== */

.hk-header {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    /* Above the page-level overlay tier — the .hk-hamburger close-button is
     * a child of this header. If the header sits below the .hk-nav__overlay
     * dimmer, the overlay intercepts pointer events and the hamburger can't
     * close the open mobile nav. (Regression caught by
     * tests/functional/mobile/navigation.spec.ts "nav can be closed".)
     * The hamburger's own `calc(var(--hk-z-overlay) + 2)` is RELATIVE to
     * its parent's stacking context — so this needs to win against page
     * overlays at the parent level. */
    z-index: calc(var(--hk-z-overlay) + 3);
    transition: background 500ms ease, box-shadow 500ms ease, border-color 500ms ease, opacity 1400ms cubic-bezier(0.16, 1, 0.3, 1), transform 1400ms cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid rgba(200, 169, 110, 0.08);
}

/* Hidden on first load — JS reveals it */
.hk-header--intro {
    opacity: 0;
    transform: translateY(-20px);
}

.hk-header--intro .hk-nav__list > li {
    opacity: 0;
    transform: translateY(-8px);
}

.hk-header.is-scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(27, 42, 74, 0.04);
    border-bottom-color: rgba(200, 169, 110, 0.12);
}

.hk-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    padding-bottom: 10px;
}

.hk-header__logo {
    flex-shrink: 0;
    order: -1; /* logo always first / left */
}

.hk-header__logo img {
    max-height: 64px;
    width: auto;
    transition: opacity 300ms ease;
}

/* Mobile home link — hidden on desktop, shown on mobile left side */
.hk-header__home {
    display: none;
}

/* Actions group (search + hamburger) */
.hk-header__actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Nav fills space between logo and search/hamburger */
.hk-nav {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    margin-inline-start: var(--hk-space-md);
}

/* Nav panel logo — hidden everywhere except inside the mobile slide-in panel */
.hk-nav__logo {
    display: none;
}

.hk-main {
    padding-top: 85px;
}

/* Front page: hero goes under header, no creme gap */
body.home .hk-main {
    padding-top: 0;
}
body.home {
    background-color: var(--hk-parchment);
}
/* No gold border on header over hero video */
body.home .hk-header {
    border-bottom: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.hk-nav__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.hk-nav__list > li {
    position: relative;
}

/* Elegant gold line dividers between nav items */
.hk-nav__list > li + li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 18px;
    background: linear-gradient(to bottom, transparent, var(--hk-gold), transparent);
    opacity: 0.5;
}

.hk-nav__list a {
    display: block;
    padding: 8px 18px;
    font-family: var(--hk-font-body);
    font-size: 13px;                /* Spec B1.1 — was 15px hotfix; reverted now that uppercase + tracking restore mass */
    font-weight: 400;
    letter-spacing: 0.14em;         /* Spec B1.1 — was 0.02em hotfix; back to original */
    text-transform: uppercase;      /* Spec B1.1 — restored from PR-4 strip */
    color: var(--hk-heading);
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: color 400ms ease;
    position: relative;
}

/* Elegant underline on hover — grows from center */
.hk-nav__list > li > a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--hk-gold);
    transition: width 400ms ease, left 400ms ease;
}
.hk-nav__list > li > a:hover::after {
    width: 60%;
    left: 20%;
}

/* Dropdown parent links pointing to # should not look clickable */
.hk-nav__list > .menu-item-has-children > a[href="#"] {
    cursor: default;
}

.hk-nav__list a:hover {
    color: var(--hk-gold);
}

.hk-nav__list .current-menu-item > a,
.hk-nav__list .current-menu-ancestor > a {
    color: var(--hk-gold);
}
.hk-nav__list .current-menu-item > a::after,
.hk-nav__list .current-menu-ancestor > a::after {
    width: 60%;
    left: 20%;
}

/* Dropdown sub-menu */
.hk-nav__list .sub-menu {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    min-width: 220px;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--hk-transition);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: var(--hk-z-dropdown);
}

.hk-nav__list > li:hover > .sub-menu,
.hk-nav__list > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hk-nav__list .sub-menu a {
    text-transform: none;
    font-size: 14px;
    padding: 8px 18px;
    color: var(--hk-heading);
    letter-spacing: 0;
}

.hk-nav__list .sub-menu a:hover {
    color: var(--hk-gold);
    background: rgba(200, 169, 110, 0.1);
}

/* ==========================================================================
   Search Toggle & Overlay
   ========================================================================== */

.hk-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-inline-end: 4px;
    color: var(--hk-heading);
    transition: color 300ms ease;
    min-width: 44px;
    min-height: 44px;
}

.hk-search-toggle:hover {
    color: var(--hk-gold);
}

/* On mobile (collapsed nav), use gold color like hamburger */
body.hk-nav-collapsed .hk-search-toggle {
    color: var(--hk-gold);
}

@media (max-width: 768px) {
    .hk-search-toggle {
        color: var(--hk-gold);
    }
}

/* Dark mode toggle */
.hk-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    margin-inline-end: 4px;
    color: var(--hk-gold);
    transition: color 300ms ease, opacity 300ms ease;
}

.hk-theme-toggle:hover {
    color: var(--hk-gold-light);
}

.hk-theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Search overlay — full-width drop-down panel */
.hk-search-overlay {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    z-index: var(--hk-z-modal);
    background: rgba(27, 42, 74, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 400ms ease, visibility 400ms;
}

.hk-search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.hk-search-overlay__inner {
    width: 90%;
    max-width: 640px;
    position: relative;
}

.hk-search-overlay__form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(200, 169, 110, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 300ms ease;
}

.hk-search-overlay__form:focus-within {
    border-color: var(--hk-gold);
}

.hk-search-overlay__input {
    flex: 1;
    background: none;
    border: none;
    padding: 18px 24px;
    font-family: var(--hk-font-body);
    font-size: 18px;
    color: var(--hk-white);
    letter-spacing: 0.02em;
}
.hk-search-overlay__input:focus-visible {
    outline: 2px solid var(--hk-gold);
    outline-offset: -2px;
    border-radius: 2px;
}

.hk-search-overlay__input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hk-search-overlay__submit {
    background: none;
    border: none;
    color: var(--hk-gold);
    padding: 18px 20px;
    cursor: pointer;
    transition: color 300ms ease;
}

.hk-search-overlay__submit:hover {
    color: var(--hk-gold-light);
}

.hk-search-overlay__close {
    position: absolute;
    top: -60px;
    inset-inline-end: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 36px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 300ms ease;
}

.hk-search-overlay__close:hover {
    color: var(--hk-white);
}

/* ==========================================================================
   Hamburger Button
   ========================================================================== */

.hk-hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    /* Hamburger sits above the mobile nav panel so it remains tappable as the close affordance. */
    z-index: calc(var(--hk-z-overlay) + 2);
    position: relative;
}

.hk-hamburger:focus:not(:focus-visible) {
    outline: none;
}

.hk-hamburger span {
    display: block;
    height: 2px;
    width: 20px;
    background: var(--hk-navy);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 3 bars: top at 0, middle at 7px, bottom at 14px — spaced via margin */
.hk-hamburger span + span {
    margin-top: 5px;
}

/* X: top bar moves down 7px to center, bottom bar moves up 7px to center */
.hk-hamburger.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hk-hamburger.is-active span:nth-child(2) {
    opacity: 0;
}

.hk-hamburger.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay — hidden on desktop */
.hk-nav__overlay { display: none; }

/* ==========================================================================
   Footer
   ========================================================================== */

.hk-footer {
    background: var(--hk-footer-bg);
    color: var(--hk-parchment-dark);
    padding: 0 0 0;
    position: relative;
}

/* Rub el Hizb ornamental divider */
.hk-footer__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0 0;
    color: var(--hk-gold);
}

.hk-footer__divider-line {
    flex: 1;
    height: 1px;
    background: rgba(200, 169, 110, 0.25);
}

.hk-footer__divider-line--left {
    mask-image: linear-gradient(to right, transparent, white 30%);
    -webkit-mask-image: linear-gradient(to right, transparent, white 30%);
}

.hk-footer__divider-line--right {
    mask-image: linear-gradient(to left, transparent, white 30%);
    -webkit-mask-image: linear-gradient(to left, transparent, white 30%);
}

.hk-footer__divider-ornament {
    width: 50px;
    height: 20px;
    flex-shrink: 0;
    margin: 0 16px;
    opacity: 0.45;
}

.hk-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--hk-gap);
    padding-top: 48px;
}

.hk-footer h3 {
    color: var(--hk-gold);
    font-family: var(--hk-font-body);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.14em;         /* Spec B1.1 — added back */
    text-transform: uppercase;      /* Spec B1.1 — restored from PR-4 strip */
    margin-bottom: 1.2rem;
}

.hk-footer__desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(247, 244, 238, 0.7);
    margin-bottom: 1.2rem;
}

.hk-footer__contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hk-footer__contact li {
    font-size: 14px;
    color: rgba(247, 244, 238, 0.75);
    margin-bottom: 0.4rem;
}

.hk-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hk-footer li {
    margin-bottom: 0.6rem;
}

.hk-footer a {
    color: var(--hk-parchment-dark);
    text-decoration: none;
    transition: color 0.3s var(--hk-ease), padding-inline-start 0.3s var(--hk-ease);
}

.hk-footer a:hover {
    color: var(--hk-gold);
    padding-inline-start: 4px;
}

/* Social icons */
.hk-footer__social {
    display: flex;
    gap: 12px;
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(200, 169, 110, 0.15);
}

.hk-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(200, 169, 110, 0.25);
    color: rgba(247, 244, 238, 0.7);
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.hk-footer__social-link:hover {
    color: var(--hk-gold);
    border-color: var(--hk-gold);
    background: rgba(200, 169, 110, 0.1);
    padding-inline-start: 0; /* override default footer a:hover */
}

.hk-footer__social-link--soon {
    opacity: 0.35;
    cursor: default;
    position: relative;
}

.hk-footer__soon-badge {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--hk-font-body);
    font-size: 8px;
    font-weight: 500;
    color: var(--hk-gold-light);
    white-space: nowrap;
    opacity: 0.9;
}

.hk-footer__bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--hk-gold), transparent) 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(247, 244, 238, 0.7);
}

.hk-footer__legal {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hk-footer__legal li {
    margin-bottom: 0;
}

.hk-footer__legal a {
    color: rgba(247, 244, 238, 0.7);
    font-size: 13px;
}

.hk-footer__legal a:hover {
    color: var(--hk-gold);
    padding-inline-start: 0;
}

/* ==========================================================================
   Grid Utilities
   ========================================================================== */

.hk-grid {
    display: grid;
    gap: var(--hk-gap);
}

.hk-grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.hk-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   Responsive — Small Desktop (max 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .hk-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Priority+ Nav — show items that fit, overflow items hidden behind burger
   ========================================================================== */

/* Hide overflow items in the horizontal bar */
.hk-nav__item--overflow {
    display: none !important;
}

/* Show hamburger when there are overflow items */
body.hk-nav-has-overflow .hk-hamburger {
    display: flex;
}

/* In the slide-in panel, show ALL items (including overflow) */
body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__item--overflow {
    display: block !important;
}

/* Slide-in panel for desktop overflow */
body.hk-nav-has-overflow .hk-nav.is-open {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    inset-inline-start: auto;
    width: 72vw;
    max-width: 340px;
    height: 100vh;
    height: 100dvh;
    margin-inline-start: 0;
    /* Above its backdrop overlay (var(--hk-z-overlay)) but below the hamburger close button. */
    z-index: calc(var(--hk-z-overlay) + 1);
    background: var(--hk-white);
    box-shadow: -8px 0 40px rgba(27, 42, 74, 0.12);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(0);
    visibility: visible;
}

body.hk-nav-has-overflow .hk-nav:not(.is-open) {
    /* Keep horizontal layout when panel is closed */
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 80px 28px 32px;
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list > li {
    border-bottom: 1px solid rgba(200, 169, 110, 0.1);
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list > li + li::before {
    display: none;
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list > li:last-child {
    border-bottom: none;
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list > li > a {
    padding: 14px 0;
    font-size: 16px;
    letter-spacing: 0.06em;
    display: block;
    width: 100%;
    text-align: start;
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list > li > a::after {
    display: none;
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list .sub-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding: 0 0 8px 16px;
    border-radius: 0;
}

body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list .sub-menu a {
    font-size: 14px;
    padding: 8px 0;
    color: var(--hk-body);
    text-align: start;
}

/* Overlay for desktop overflow panel */
body.hk-nav-has-overflow .hk-nav__overlay.is-visible {
    display: block;
    opacity: 1;
}

/* ==========================================================================
   Adaptive Nav — Full collapse for mobile (JS adds hk-nav-collapsed ≤768px)
   ========================================================================== */

/* Show hamburger */
body.hk-nav-collapsed .hk-hamburger {
    display: flex;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
}

body.hk-nav-collapsed .hk-hamburger span {
    background: var(--hk-gold);
}

/* Hide desktop logo when fully collapsed (lives in nav panel) */
body.hk-nav-collapsed .hk-header__logo {
    display: none;
}

/* Show home link when nav is collapsed */
body.hk-nav-collapsed .hk-header__home {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hk-gold);
    text-decoration: none;
    padding: 6px;
    transition: color 200ms var(--hk-ease);
}

/* Slim header */
body.hk-nav-collapsed .hk-header__inner {
    justify-content: space-between;
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Navigation — slide-in panel */
body.hk-nav-collapsed .hk-nav {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    inset-inline-start: auto;
    width: 72vw;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    margin-inline-start: 0;
    /* Above its backdrop overlay (var(--hk-z-overlay)) but below the hamburger close button. */
    z-index: calc(var(--hk-z-overlay) + 1);
    background: var(--hk-white);
    box-shadow: -8px 0 40px rgba(27, 42, 74, 0.12);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.05),
                visibility 0.4s;
}

body.hk-nav-collapsed .hk-nav.is-open {
    transform: translateX(0);
    visibility: visible;
}

body.hk-nav-collapsed .hk-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 80px 28px 32px;
}

body.hk-nav-collapsed .hk-nav__list > li {
    border-bottom: 1px solid var(--hk-parchment-dark);
}

body.hk-nav-collapsed .hk-nav__list > li + li::before {
    display: none;
}

body.hk-nav-collapsed .hk-nav__list > li:last-child {
    border-bottom: none;
}

body.hk-nav-collapsed .hk-nav__list > li > a {
    padding: 14px 0;
    font-size: 16px;
    letter-spacing: 0.06em;
    display: block;
    width: 100%;
    text-align: start;
}

/* Submenus — inline below parent */
body.hk-nav-collapsed .hk-nav__list .sub-menu {
    position: static;
    box-shadow: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    padding-block-end: 8px;
    padding-inline-start: 16px;
    border-radius: 0;
}

body.hk-nav-collapsed .hk-nav__list .sub-menu a {
    font-size: 14px;
    padding: 8px 0;
    color: var(--hk-body);
    text-align: start;
}

/* Overlay */
body.hk-nav-collapsed .hk-nav__overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--hk-z-overlay);
    background: rgba(27, 42, 74, 0.18);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.hk-nav-collapsed .hk-nav__overlay.is-visible {
    display: block;
    opacity: 1;
}

/* Logo inside nav panel */
body.hk-nav-collapsed .hk-nav__logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding: 28px 28px 16px;
    position: relative;
}

body.hk-nav-collapsed .hk-nav__logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 169, 110, 0.7), transparent);
}

body.hk-nav-collapsed .hk-nav__logo img {
    max-height: 72px;
    width: auto;
    opacity: 0.75;
}

/* ==========================================================================
   Responsive — Tablet (max 768px)
   ========================================================================== */

@media (max-width: 768px) {

    /* Header always visible on mobile — no intro hide */
    .hk-header--intro {
        opacity: 1;
        transform: none;
    }

    /* Nav list items visible from start on mobile */
    .hk-header--intro .hk-nav__list > li {
        opacity: 1;
        transform: none;
    }

    /* Slim frosted white header bar on mobile */
    .hk-header {
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(20px) saturate(1.2);
        -webkit-backdrop-filter: blur(20px) saturate(1.2);
        border-bottom: 1px solid rgba(200, 169, 110, 0.1);
        box-shadow: 0 1px 12px rgba(27, 42, 74, 0.04);
        pointer-events: auto;
    }

    /* Hide logo in header on mobile — it lives in the nav panel */
    .hk-header__logo {
        display: none;
    }

    /* Slim inner — home link left, burger right */
    .hk-header__inner {
        justify-content: space-between;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    /* Show home link on mobile */
    .hk-header__home {
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--hk-gold);
        text-decoration: none;
        padding: 6px;
        transition: color 200ms var(--hk-ease);
    }

    .hk-header__home:hover {
        color: var(--hk-gold-light);
    }

    /* Hamburger — plain, inherits header bg */
    .hk-hamburger {
        display: flex;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        border-radius: 0;
    }

    /* Hamburger bars — gold on mobile */
    .hk-hamburger span {
        background: var(--hk-gold);
    }

    /* Prevent horizontal overflow on mobile */
    html, body {
        overflow-x: hidden;
    }

    /* Navigation — slide-in panel from right */
    .hk-nav {
        position: fixed;
        top: 0;
        inset-inline-end: 0;
        inset-inline-start: auto;
        width: 72vw;
        max-width: 320px;
        height: 100vh;
        height: 100dvh;
        margin-inline-start: 0;
        /* Above its backdrop overlay (var(--hk-z-overlay)) but below the hamburger close button. */
        z-index: calc(var(--hk-z-overlay) + 1);
        background: var(--hk-white);
        box-shadow: -8px 0 40px rgba(27, 42, 74, 0.12);
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.05),
                    visibility 0.4s;
    }

    .hk-nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .hk-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 80px 28px 32px;
    }

    .hk-nav__list > li {
        border-bottom: 1px solid var(--hk-parchment-dark);
    }

    /* Hide desktop gold dividers in mobile panel */
    .hk-nav__list > li + li::before {
        display: none;
    }

    .hk-nav__list > li:last-child {
        border-bottom: none;
    }

    .hk-nav__list > li > a {
        padding: 14px 0;
        font-size: 16px;
        letter-spacing: 0.06em;
        display: block;
        width: 100%;
        opacity: 0;
        transform: translateX(20px);
    }

    .hk-nav.is-open .hk-nav__list > li > a {
        animation: hkMenuSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    /* Stagger each top-level item */
    .hk-nav.is-open .hk-nav__list > li:nth-child(1) > a { animation-delay: 0ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(2) > a { animation-delay: 50ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(3) > a { animation-delay: 100ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(4) > a { animation-delay: 150ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(5) > a { animation-delay: 200ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(6) > a { animation-delay: 250ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(7) > a { animation-delay: 300ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(8) > a { animation-delay: 350ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(9) > a { animation-delay: 400ms; }
    .hk-nav.is-open .hk-nav__list > li:nth-child(10) > a { animation-delay: 450ms; }

    /* B2: collapse into hk-slide-in-right (style.css primitive) — note 20px translate vs --hk-motion-distance-lg 32px; B2 must reconcile the distance */
    @keyframes hkMenuSlideIn {
        from { opacity: 0; transform: translateX(20px); }
        to   { opacity: 1; transform: translateX(0); }
    }

    .hk-nav__list .current-menu-item > a,
    .hk-nav__list .current-menu-ancestor > a {
        color: var(--hk-gold);
    }

    /* Submenus — inline below parent */
    .hk-nav__list .sub-menu {
        position: static;
        box-shadow: none;
        background: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-block-end: 8px;
        padding-inline-start: 16px;
        border-radius: 0;
    }

    .hk-nav__list .sub-menu a {
        font-size: 14px;
        padding: 8px 0;
        color: var(--hk-body);
    }

    .hk-nav__list > li:hover > .sub-menu,
    .hk-nav__list > li:focus-within > .sub-menu {
        transform: none;
    }

    /* Backdrop overlay with blur */
    .hk-nav__overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: var(--hk-z-overlay);
        background: rgba(27, 42, 74, 0.18);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        opacity: 0;
        transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .hk-nav__overlay.is-visible {
        display: block;
        opacity: 1;
    }

    /* Logo inside nav panel — pinned to bottom, centered */
    .hk-nav__logo {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: auto;
        padding: 28px 28px 16px;
        position: relative;
    }

    /* Gold gradient divider above logo */
    .hk-nav__logo::before {
        content: '';
        position: absolute;
        top: 0;
        left: 20%;
        right: 20%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(200, 169, 110, 0.7), transparent);
    }

    .hk-nav__logo img {
        max-height: 72px;
        width: auto;
        opacity: 0.75;
    }

    /* Inner pages: reduce top padding since header is transparent */
    .hk-main {
        padding-top: 60px;
    }

    body.home .hk-main {
        padding-top: 0;
    }

    /* Footer grid: 2 columns on tablet */
    .hk-footer__grid {
        grid-template-columns: 1fr 1fr;
        text-align: center;
        padding-top: 32px;
    }

    .hk-footer__col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hk-footer__col:first-child {
        grid-column: 1 / -1;
    }

    .hk-footer__social {
        justify-content: center;
    }

    /* Disable padding-inline-start hover when footer is centered */
    .hk-footer a:hover {
        padding-inline-start: 0;
    }

    /* Grid utilities */
    .hk-grid--2,
    .hk-grid--3 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Responsive — Mobile (max 480px)
   ========================================================================== */

@media (max-width: 480px) {

    /* Footer grid: 1 column on small mobile */
    .hk-footer__grid {
        grid-template-columns: 1fr;
        gap: var(--hk-space-lg);
    }

    .hk-footer__col {
        padding-bottom: var(--hk-space-sm);
        border-bottom: 1px solid rgba(200, 169, 110, 0.1);
    }

    .hk-footer__col:first-child {
        grid-column: 1;
    }

    .hk-footer__col:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .hk-footer__bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .hk-footer__legal {
        justify-content: center;
    }
}

/* ==========================================================================
   Dropdown Navigation (Custom Walker)
   ========================================================================== */

.hk-nav__item { position: relative; }

.hk-nav__item--has-children > .hk-nav__link { display: inline-flex; align-items: center; gap: 4px; }

.hk-nav__chevron { transition: transform 300ms var(--hk-ease); }
.hk-nav__item--has-children:hover .hk-nav__chevron,
.hk-nav__item--has-children.is-open .hk-nav__chevron { transform: rotate(180deg); }

.hk-nav__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 220px;
    background: var(--hk-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(27, 42, 74, 0.12);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms var(--hk-ease), transform 250ms var(--hk-ease), visibility 250ms;
    z-index: var(--hk-z-dropdown);
}

.hk-nav__item--has-children:hover > .hk-nav__dropdown,
.hk-nav__item--has-children.is-open > .hk-nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hk-nav__dropdown-link {
    display: block;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--hk-heading);
    text-decoration: none;
    transition: background 200ms var(--hk-ease), color 200ms;
    white-space: nowrap;
}

.hk-nav__dropdown-link:hover {
    background: rgba(200, 169, 110, 0.1);
    color: var(--hk-gold);
}

@media (max-width: 768px) {
    .hk-nav__dropdown {
        position: static;
        transform: none;
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding-inline-start: 1rem;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height 300ms var(--hk-ease);
    }

    .hk-nav__item--has-children.is-open > .hk-nav__dropdown {
        max-height: 500px;
        transform: none;
    }

    .hk-nav__dropdown-link {
        padding: 10px 0;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(200, 169, 110, 0.1);
    }
}

/* ==========================================================================
   Flyout Submenu (Depth 2 — e.g. "Unsere Philosophie")
   ========================================================================== */

/* Flyout trigger item */
.hk-nav__item--has-flyout > .hk-nav__dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hk-nav__flyout-chevron {
    transition: transform 300ms var(--hk-ease);
    flex-shrink: 0;
    margin-inline-start: 8px;
}

.hk-nav__item--has-flyout:hover > .hk-nav__dropdown-link .hk-nav__flyout-chevron {
    transform: translateX(2px);
    color: var(--hk-gold);
}

/* Flyout panel */
.hk-nav__flyout {
    position: absolute;
    inset-inline-start: 100%;
    top: 0;
    min-width: 200px;
    background: var(--hk-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--hk-glass-border);  /* Spec B1 — Family 3 full border shorthand */
    border-radius: 12px;
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(27, 42, 74, 0.12);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(4px);
    transition: opacity 250ms var(--hk-ease), transform 250ms var(--hk-ease), visibility 250ms;
    /* Sub-flyout sits one rung above its parent dropdown. */
    z-index: calc(var(--hk-z-dropdown) + 1);
    margin-inline-start: -1px;
}

.hk-nav__item--has-flyout:hover > .hk-nav__flyout {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Flyout links — same style as dropdown links */
.hk-nav__flyout-link {
    display: block;
    padding: 8px 20px;
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--hk-heading);
    text-decoration: none;
    transition: background 200ms var(--hk-ease), color 200ms;
    white-space: nowrap;
}

.hk-nav__flyout-link:hover {
    background: rgba(200, 169, 110, 0.1);
    color: var(--hk-gold);
}

/* Mobile: flyout becomes nested accordion */
@media (max-width: 768px) {
    .hk-nav__flyout {
        position: static;
        transform: none;
        background: transparent;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding-inline-start: 1rem;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height 300ms var(--hk-ease);
        margin-inline-start: 0;
    }

    .hk-nav__item--has-flyout.is-flyout-open > .hk-nav__flyout {
        max-height: 500px;
        transform: none;
    }

    .hk-nav__item--has-flyout.is-flyout-open > .hk-nav__dropdown-link .hk-nav__flyout-chevron {
        transform: rotate(90deg);
    }

    .hk-nav__flyout-link {
        padding: 10px 0;
        font-size: 0.9rem;
        border-bottom: 1px solid rgba(200, 169, 110, 0.1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hk-nav__flyout,
    .hk-nav__flyout-chevron {
        transition: none;
    }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.hk-breadcrumbs {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--hk-body);
}

.hk-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hk-breadcrumbs__item + .hk-breadcrumbs__item::before {
    content: "\203A";
    margin-inline-end: 4px;
    color: var(--hk-gold);
}

.hk-breadcrumbs__item a {
    color: var(--hk-teal);
    text-decoration: none;
}

.hk-breadcrumbs__item a:hover {
    text-decoration: underline;
}

.hk-breadcrumbs__item:last-child {
    color: var(--hk-heading);
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
    .hk-nav, .hk-nav__list > li > a, .hk-nav__overlay, .hk-hamburger span {
        transition: none !important;
        animation: none !important;
    }
}

/* === Dark Mode Overrides === */

/* Force dark background on all wrapper elements */
:root[data-theme="dark"] body,
:root[data-theme="dark"] .hk-main {
    background-color: #090f1c !important;
}

/* Mobile nav panel → dark */
:root[data-theme="dark"] body.hk-nav-collapsed .hk-nav {
    background: #0e1726;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] body.hk-nav-collapsed .hk-nav__list > li {
    border-bottom-color: rgba(200, 169, 110, 0.15);
}

:root[data-theme="dark"] body.hk-nav-collapsed .hk-nav__list > li > a {
    color: var(--hk-heading);
}

:root[data-theme="dark"] body.hk-nav-collapsed .hk-nav__list .sub-menu a {
    color: var(--hk-body);
}

:root[data-theme="dark"] body.hk-nav-collapsed .hk-nav__overlay {
    background: rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .hk-header {
    background: rgba(9, 15, 28, 0.92);
}

:root[data-theme="dark"] .hk-header.is-sticky {
    background: rgba(9, 15, 28, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

:root[data-theme="dark"] .hk-footer {
    background: var(--hk-footer-bg);
}

:root[data-theme="dark"] .hk-nav .sub-menu {
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
}

/* Desktop overflow panel → dark */
:root[data-theme="dark"] body.hk-nav-has-overflow .hk-nav.is-open {
    background: #0e1726;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list > li {
    border-bottom-color: rgba(200, 169, 110, 0.15);
}

:root[data-theme="dark"] body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list > li > a {
    color: var(--hk-heading);
}

:root[data-theme="dark"] body.hk-nav-has-overflow .hk-nav.is-open .hk-nav__list .sub-menu a {
    color: var(--hk-body);
}

:root[data-theme="dark"] body.hk-nav-has-overflow .hk-nav__overlay.is-visible {
    background: rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .hk-search-overlay {
    background: rgba(9, 15, 28, 0.95);
}

:root[data-theme="dark"] .hk-search-overlay__input {
    background: rgba(14, 23, 38, 0.8);
    border-color: rgba(200, 169, 110, 0.2);
    color: var(--hk-body);
}

:root[data-theme="dark"] .hk-footer a {
    color: rgba(247, 244, 238, 0.75);
}

:root[data-theme="dark"] .hk-footer a:hover {
    color: var(--hk-gold);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .hk-header {
        background: rgba(9, 15, 28, 0.92);
    }
    :root:not([data-theme="light"]) .hk-header.is-sticky {
        background: rgba(9, 15, 28, 0.97);
        box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
    }
    :root:not([data-theme="light"]) .hk-footer {
        background: var(--hk-footer-bg);
    }
    :root:not([data-theme="light"]) .hk-search-overlay {
        background: rgba(9, 15, 28, 0.95);
    }
    :root:not([data-theme="light"]) .hk-search-overlay__input {
        background: rgba(14, 23, 38, 0.8);
        border-color: rgba(200, 169, 110, 0.2);
        color: var(--hk-body);
    }
    :root:not([data-theme="light"]) .hk-footer a {
        color: rgba(247, 244, 238, 0.75);
    }
    :root:not([data-theme="light"]) .hk-footer a:hover {
        color: var(--hk-gold);
    }
    :root:not([data-theme="light"]) body.hk-nav-collapsed .hk-nav {
        background: #0e1726;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
    }
    :root:not([data-theme="light"]) body.hk-nav-collapsed .hk-nav__list > li {
        border-bottom-color: rgba(200, 169, 110, 0.15);
    }
    :root:not([data-theme="light"]) body.hk-nav-collapsed .hk-nav__list > li > a {
        color: var(--hk-heading);
    }
    :root:not([data-theme="light"]) body.hk-nav-collapsed .hk-nav__list .sub-menu a {
        color: var(--hk-body);
    }
    :root:not([data-theme="light"]) body.hk-nav-collapsed .hk-nav__overlay {
        background: rgba(0, 0, 0, 0.4);
    }
}

/* ==========================================================================
   Language Switcher
   ========================================================================== */

.hk-lang-switcher {
    position: relative;
}
.hk-lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 8px;
    color: inherit;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: border-color 0.2s var(--hk-ease);
}
.hk-lang-switcher__toggle:hover {
    border-color: var(--hk-gold);
}
.hk-lang-switcher__dropdown {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    min-width: 180px;
    background: var(--hk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 6px 0;
    z-index: var(--hk-z-dropdown);
    overflow: hidden;
}
.hk-lang-switcher__dropdown[hidden] { display: none; }
.hk-lang-switcher__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: var(--hk-heading);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}
.hk-lang-switcher__item:hover { background: rgba(200, 169, 110, 0.08); }
.hk-lang-switcher__item--active {
    font-weight: 600;
    color: var(--hk-gold);
    background: rgba(200, 169, 110, 0.06);
}
.hk-lang-switcher__abbr {
    font-family: Inter, sans-serif !important; /* override :lang(ar) Amiri */
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--hk-navy);
    background: rgba(27, 42, 74, 0.07);
    border-radius: 4px;
    padding: 2px 6px;
    line-height: 1;
}

/* Dark mode — lang switcher abbr */
:root:not([data-theme="light"]) .hk-lang-switcher__abbr {
    color: var(--hk-gold);
    background: rgba(200, 169, 110, 0.1);
}

/* Dark mode — lang switcher border */
:root:not([data-theme="light"]) .hk-lang-switcher__toggle {
    border-color: rgba(255, 255, 255, 0.1);
}
:root:not([data-theme="light"]) .hk-lang-switcher__dropdown {
    background: rgba(14, 23, 38, 0.92);
    border-color: rgba(200, 169, 110, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
