﻿/* ================================================
   PASTE THESE RULES INTO YOUR layout.css
   (replace any existing .hdr__ or .site-nav__dropdown rules)
   ================================================ */

/* ── Header ── */
.hdr {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-header);
}

    .hdr.scrolled {
        box-shadow: 0 2px 16px rgba(0,0,0,0.12);
    }

.hdr__inner {
    max-width: var(--content-wide);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Logo ── */
.hdr__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

    .hdr__logo img {
        width: 44px;
        height: 44px;
        object-fit: contain;
    }

.hdr__wordmark {
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

/* ── Desktop nav container ── */
.hdr__nav {
    display: none;
    align-items: center;
    gap: 4px;
}

@media (min-width: 900px) {
    .hdr__nav {
        display: flex;
    }

    .ham {
        display: none;
    }
}

/* ── Nav links (both <a> and <button>) ── */
.hdr__link {
    padding: 8px 14px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    /* FIX: use the dark text colour so active is visible on white header */
    color: var(--color-text-dim);
    border-radius: 6px;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
    /* reset <button> defaults */
    border: none;
    background: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    font-family: inherit;
}

    .hdr__link:hover {
        color: var(--color-primary);
        background: rgba(138, 59, 78, 0.06);
    }

    /* FIX: active must be visible — use brand colour text + underline */
    .hdr__link.active {
        color: var(--color-primary);
        background: rgba(138, 59, 78, 0.08);
        border-bottom: 2px solid var(--color-primary, #c9a96e);
    }

/* ── Book button ── */
.hdr__btn {
    margin-left: 8px;
    padding: 9px 20px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 6px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    white-space: nowrap;
    transition: background 0.18s, opacity 0.18s;
    text-decoration: none;
}

    .hdr__btn:hover {
        opacity: 0.88;
    }

/* ── Dropdown wrapper ── */
.hdr__drop {
    position: relative;
}

/* ── Dropdown panel ── */
.hdr__drop-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 6px 0;
    min-width: 200px;
    /* FIX: use opacity/visibility transition instead of display:none
     so the CSS transition actually plays */
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    z-index: 200;
    pointer-events: none;
}

/* FIX: .open on the wrapper reveals the menu */
.hdr__drop.open .hdr__drop-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
    pointer-events: auto;
}

/* ── Dropdown items ── */
.hdr__drop-item {
    display: block;
    padding: 10px 18px;
    font-size: var(--fs-sm);
    color: var(--color-text-dim);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

    .hdr__drop-item:hover {
        color: var(--color-primary);
        background: rgba(138, 59, 78, 0.05);
    }

    /* FIX: active dropdown item gets a clear highlight */
    .hdr__drop-item.active {
        color: var(--color-primary);
        font-weight: var(--fw-medium);
        background: rgba(138, 59, 78, 0.07);
    }

/* ── Hamburger ── */
.ham {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 101;
}

    .ham span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--color-text);
        border-radius: 2px;
        transition: all 0.2s;
    }
