/**
 * Header Styles
 * Desktop: Floating Liquid Glass Logo pill (left) + Transparent Nav pill (right)
 * Mobile: Hamburger (left) + Liquid Glass Logo center + Gift icon (right) + Sidebar drawer
 *
 * @package linhanhclinic
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CSS VARIABLES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
    --color-primary: #2c1b4e;
    --color-secondary: #7F6337;
    --color-gold: #8b6e3f;
    --color-white: #ffffff;
    --color-dark: #1a1a1a;
    --color-border: rgba(255, 255, 255, 0.25);
    --color-bg-light: #f5f5f5;

    --transition: all 0.3s ease;
    --pill-radius: 50px;
    --header-offset: 20px;
    /* floating gap from top */
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BASE HEADER WRAPPER (both desktop & mobile)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-header {
    position: absolute;
    top: 65px;
    left: 50%;
    height: 100px;
    transform: translateX(-50%);
    width: 100vw;
    z-index: 900;
    transition: transform 0.4s ease, top 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

/* Hide header when scrolling down */
.site-header.is-hidden {
    transform: translate(-50%, -150%);
}

/* When page is scrolled – become sticky with subtle shadow */
.site-header.is-sticky {
    position: fixed;
    top: 10px;
}

.site-header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    /* Increased padding for wider look */
    gap: 16px;
    width: 100%;
    max-width: 100%;
    /* Ensure no inheritance of global max-width */
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SHOW / HIDE rules
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.site-header--desktop {
    display: none;
}

.site-header--mobile {
    display: flex;
    top: 15px;
}

@media (min-width: 992px) {
    .site-header--desktop {
        display: flex;
    }

    .site-header--mobile {
        display: none;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIQUID GLASS LOGO PILL  (used on both desktop & mobile)
   Based on the SVG glass-distortion filter technique.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.header-logo-pill {
    position: relative;
    border-radius: var(--pill-radius);
    /* isolation: isolate; */
    box-shadow: 0 0 21px -8px #957b3b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(176deg, rgba(255, 255, 255, 0.9) 0%, rgb(255 255 255 / 88%) 100%);
    border: 1px solid #fff;
}

/* Tint + inner-shadow layer */
.header-logo-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    box-shadow: inset 0 0 12px -2px rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.0);
    pointer-events: none;
}

/* Backdrop blur + distortion layer */
.header-logo-pill::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    filter: url(#glass-distortion);
    -webkit-filter: url(#glass-distortion);
    isolation: isolate;
    pointer-events: none;
}

.header-logo-pill .logo-link {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 10px 22px;
}

.header-logo-pill .logo-img {
    height: 56px;
    width: auto;
    display: block;
    transition: var(--transition);
}

/* ─ Desktop logo pill sizing ─ */
@media (min-width: 992px) {
    .header-logo-pill .logo-img {
        height: 60px;
    }
}

/* ─ Mobile logo pill sizing ─ */
.header-logo-pill--mobile .logo-link {
    padding: 8px 18px;
}

.header-logo-pill--mobile .logo-img {
    height: 44px;
}

/* Hover lift on logo */
.header-logo-pill:hover {
    transform: translateY(-2px);
    transition: var(--transition);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DESKTOP NAV PILL  (transparent bg + white border)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.header-nav-pill {
    border-radius: var(--pill-radius);
    border: 1px solid #fff;
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    background: linear-gradient(176deg, rgba(255, 255, 255, 0.9) 0%, rgb(255 255 255 / 88%) 100%);
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0px 1px 13px -3px #7b643aba;
}



/* Nav list */
.desktop-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    white-space: nowrap;
    padding: 1.2rem 0.8rem;
}

.desktop-nav-list li a {
    color: var(--color-secondary);
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
    font-family: 'Geomanist';
}

.desktop-nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: var(--transition);
}

.desktop-nav-list li a:hover {
    color: var(--color-secondary);
}

.desktop-nav-list li a:hover::after {
    width: 100%;
}

.desktop-nav-list li.current-menu-item>a,
.desktop-nav-list li.current-menu-ancestor>a {
    color: var(--color-secondary);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE HEADER ELEMENTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ─ Hamburger button ─ */
.mobile-hamburger {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #fff;
    backdrop-filter: blur(10px);
    border-radius: 14px;
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.mobile-hamburger:hover {
    background: rgba(255, 255, 255, 0.22);
}

.mobile-hamburger__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #BF934E;
    border-radius: 2px;
    transition: var(--transition);
}

/* Active state (X) */
.mobile-hamburger.is-active .mobile-hamburger__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

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

/* ─ Gift CTA icon ─ */
.mobile-gift-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #fff;
    backdrop-filter: blur(10px);
    border-radius: 14px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    font-size: 20px;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.mobile-gift-btn i.fa-solid {
    color: #BF934E;
}

.mobile-gift-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    color: var(--color-secondary);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE SIDEBAR DRAWER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: var(--color-white);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
}

.mobile-sidebar.is-open {
    transform: translateX(0);
}

.mobile-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: var(--color-primary);
    color: var(--color-white);
}

.mobile-sidebar__title {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-sidebar__close {
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: var(--transition);
}

.mobile-sidebar__close:hover {
    color: var(--color-secondary);
}

.mobile-sidebar__nav {
    flex: 1;
    overflow-y: auto;
}

/* Sidebar nav list */
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.mobile-nav-list li a {
    display: block;
    padding: 14px 24px;
    color: var(--color-dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: var(--transition);
}

.mobile-nav-list li a:hover,
.mobile-nav-list li.current-menu-item a {
    background: rgba(44, 27, 78, 0.05);
    color: var(--color-primary);
    padding-left: 32px;
}

/* Backdrop */
.mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1090;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.mobile-sidebar-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
}