/* ================= NAVBAR ================= */

.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 999;
    background: linear-gradient(180deg, #F4FBF6 0%, #FFFFFF 100%);
    border-top: 3px solid var(--dark);
    border-bottom: 1px solid rgba(11, 43, 38, 0.08);
    box-shadow: 0 4px 24px rgba(11, 43, 38, 0.05);
}

/* ---- Homepage hero navbar: dark -> light theme ----
   Only index.php sets the .kg-hero-navbar class (see includes/navbar.php's
   $kgNavOnHero flag). It starts transparent and floats over the hero photo
   with light text, matching the dark overlay the hero already has, then
   swaps to the site's normal light/solid header once assets/js/main.js
   adds .scrolled at 50px of scroll. Every other page keeps the plain
   .main-header rules above (sticky, solid, always the same). */
.main-header.kg-hero-navbar {
    position: fixed;
    top: 0;
    left: 0;
    background: transparent;
    border-top: none;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.main-header.kg-hero-navbar .navbar-logo-text,
.main-header.kg-hero-navbar .navbar-menu > li > a,
.main-header.kg-hero-navbar .navbar-menu > li > a.dropdown-toggle,
.main-header.kg-hero-navbar .navbar-right > a.btn-secondary {
    color: #fff;
}
.main-header.kg-hero-navbar .navbar-right > a.btn-secondary {
    border-color: rgba(255, 255, 255, 0.7);
}
/* FIX: the plain (non-:hover) hero-navbar rule above has higher CSS
   specificity than .navbar-right .btn-secondary:hover, so it was winning
   even while hovering and leaving the label the same colour as (or too
   close to) the hover background — reading as "invisible" text. These
   explicit :hover overrides restore correct contrast in both header
   states. */
.main-header.kg-hero-navbar .navbar-right > a.btn-secondary:hover {
    color: var(--dark);
}
.main-header.kg-hero-navbar.scrolled .navbar-right > a.btn-secondary:hover {
    color: var(--white);
}
.main-header.kg-hero-navbar .navbar-profile-avatar {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.main-header.kg-hero-navbar.scrolled {
    position: fixed;
    background: linear-gradient(180deg, #F4FBF6 0%, #FFFFFF 100%);
    border-top: 3px solid var(--dark);
    border-bottom: 1px solid rgba(11, 43, 38, 0.08);
    box-shadow: 0 4px 24px rgba(11, 43, 38, 0.05);
}
.main-header.kg-hero-navbar.scrolled .navbar-logo-text,
.main-header.kg-hero-navbar.scrolled .navbar-menu > li > a,
.main-header.kg-hero-navbar.scrolled .navbar-right > a.btn-secondary {
    color: var(--dark);
}
.main-header.kg-hero-navbar.scrolled .navbar-right > a.btn-secondary {
    border-color: var(--dark);
}
/* The hamburger is dark green by default, which disappears against the dark hero
   photo while the homepage navbar is still transparent. Match the white
   links/logo until the bar turns solid on scroll. */
.main-header.kg-hero-navbar:not(.scrolled) .hamburger span { background: #fff; }
.main-header.kg-hero-navbar.scrolled .navbar-profile-avatar {
    background: var(--dark);
    color: #fff;
}
/* Content below a fixed nav needs the page pushed down by the header's own
   height everywhere the header isn't fixed over a hero image to sit on
   top of — but the home hero is the one section designed to run full
   height behind it, so no extra top padding is added here. */
@media (prefers-reduced-motion: reduce) {
    .main-header.kg-hero-navbar { transition: none; }
}

.navbar {
    /* Full-size bar (logo + 8 links + 2 buttons) needs ~1560px; the old 1280px
       cap let the CTA hang outside the container on 1441-1700px screens. */
    max-width: 1560px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
}

/* Logo — the mark carries real detail (leaf sprig + face line-art), so it
   needs real size to read; it now anchors the bar rather than hiding in
   it. Negative vertical margin lets the image grow well past the bar's
   own padding without stretching the header's height to match. */
.navbar-logo {
    margin-right: auto;
}
.navbar-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.navbar-logo img,
.navbar-logo-img {
    height: 68px;
    width: auto;
    margin: -14px 0;
    transition: transform 0.3s ease;
}
.navbar-logo img:hover,
.navbar-logo-link:hover .navbar-logo-img {
    transform: scale(1.06);
}

.navbar-logo-text {
    font-family: var(--heading-font);
    font-weight: 600;
    letter-spacing: 0.01em;
    /* FIX: this used to be `color: var(--dark) !important;`. !important
       always beats a normal declaration regardless of selector specificity
       or source order, so the hero-navbar and .scrolled color rules above
       (which are NOT !important) could never actually apply — the logo
       text was stuck dark on every page, including floating over the
       homepage hero where it needs to read as white. Dropping !important
       here lets the more specific .kg-hero-navbar / .scrolled selectors
       above win normally, so white-on-hero -> dark-green-on-scroll (client
       feedback) actually takes effect. The hover rule below keeps its own
       !important so a hover highlight still wins in every state,
       including scrolled. */
    color: var(--dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Tight enough that "Kaaya"/"Glow" read as one wordmark rather than
       two unrelated lines. */
    line-height: 1;
    transition: color 0.3s ease;
}
.navbar-logo-word {
    font-size: 1.35rem;
}
.navbar-logo-word--glow {
    /* Client feedback: "shift the glow little above in the navbar left
       the space for tagline" — pulled up under "Kaaya" so the wordmark
       reads as one tight two-line block instead of two evenly-spaced
       lines, freeing the room below for .navbar-logo-tagline. */
    margin-top: -0.05em;
}
.navbar-logo-tagline {
    display: block;
    /* Empty for now (see the HTML comment in navbar.php) — this height is
       what actually reserves the space, so adding real tagline text later
       doesn't push the header taller or nudge "Kaaya"/"Glow" up. */
    min-height: 13px;
    margin-top: 3px;
    font-family: var(--body-font, var(--heading-font));
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    /* Inherits the wordmark's current color (white on hero, dark green
       once scrolled/on solid pages) rather than setting its own, so it
       never needs its own color rule as the header state changes. */
    color: inherit;
    opacity: 0.72;
}
.navbar-logo-text::after {
    content: "";
}
.navbar-logo-link:hover .navbar-logo-text {
    color: var(--primary) !important;
}

@media (max-width: 480px) {
    /* Keep the mark, drop the wordmark on very small screens so the
       navbar doesn't crowd the hamburger. */
    .navbar-logo-text { display: none; }
    .navbar-logo img,
    .navbar-logo-img { height: 56px; margin: -10px 0; }
}

/* Menu — flat links spread across the bar (no capsule/background), each
   getting its own quiet underline cue on hover/active. */
.navbar-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 34px;
}
.navbar-menu li {
    position: relative;
}
.navbar-menu a {
    display: inline-flex;
    align-items: center;
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--dark);
    padding: 8px 2px;
    position: relative;
    transition: color 0.25s ease;
}
.navbar-menu a::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 2px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.navbar-menu a:hover {
    color: var(--primary);
    background: none;
}
.navbar-menu a:hover::after {
    transform: scaleX(1);
}

/* "Services" dropdown trigger — same look/spacing as the other flat nav
   links, plus a chevron that flips when the menu is open. */
.navbar-menu .dropdown {
    display: flex;
    align-items: center;
}
.navbar-menu .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.navbar-menu .dropdown-toggle svg {
    width: 13px;
    height: 13px;
    transition: transform 0.25s ease;
}
.navbar-menu .dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
}

/* Dropdown menu — lists every service category, then Membership &
   Specials, so those two never need their own top-level nav link. */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(11, 43, 38, 0.14);
    border-radius: 10px;
    display: none;
    flex-direction: column;
    min-width: 210px;
    padding: 8px 0;
    margin-top: 6px;
}
.dropdown:hover .dropdown-menu,
.dropdown.kg-pinned .dropdown-menu {
    display: flex;
}
.dropdown-menu li {
    padding: 0;
}
.dropdown-menu a {
    display: block;
    color: var(--dark);
    padding: 9px 20px;
    font-size: 0.94rem;
}
.dropdown-menu a:hover {
    color: var(--primary);
    background: rgba(35, 83, 71, 0.06);
}
.dropdown-menu-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a8a8a;
    padding: 6px 20px 4px !important;
}
.dropdown-menu-divider {
    height: 1px;
    margin: 6px 12px;
    background: rgba(11, 43, 38, 0.1);
    padding: 0 !important;
}

/* Logged-in navbar state: "Account" keeps the standard .btn-secondary
   pill, but a second solid-gold pill right next to it for "Logout" is
   visually loud for a low-frequency action — style it as a quieter text
   link instead so "Account" stays the one clear call to action. */
.navbar-right .navbar-logout {
    background: transparent;
    color: var(--dark);
    padding: 0.75rem 0.4rem;
    box-shadow: none;
}
.navbar-right .navbar-logout:hover {
    background: transparent;
    color: var(--primary);
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

/* Right Side */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Navbar buttons — scoped to .navbar-right only (rather than restyling
   .btn-primary/.btn-secondary globally) so this look matches the light
   header without changing how those same classes look on hero sections,
   cards, etc. elsewhere on the site.
   - "Login" reads as a plain nav link (quiet secondary action)
   - "Book Appointment" is the one solid, pill-shaped CTA */
.navbar-right .btn-secondary {
    background: var(--gold, #8EB69B);
    color: var(--dark);
    border: none;
    border-radius: 999px;
    padding: 0.62rem 1.35rem;
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 0.92rem;
}
.navbar-right .btn-secondary:hover {
    background: #7CA88C;
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 43, 38, 0.18);
}

.navbar-right .btn-primary {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    color: var(--white);
    border: 1px solid var(--dark);
    border-radius: 999px;
    padding: 0.62rem 1.35rem;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    text-transform: none;
    box-shadow: 0 2px 10px rgba(11, 43, 38, 0.15);
}
.navbar-right .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--gold, #8EB69B) 100%);
    border-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(11, 43, 38, 0.25);
}

/* Navbar buttons: identical box model + text perfectly centred, both
   horizontally and vertically, so Login / Book Appointment / Account
   always match each other. */
.navbar-right .btn-primary,
.navbar-right .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    min-height: 44px;
    line-height: 1.2;
    white-space: nowrap;
}
.navbar-right .btn-primary svg,
.navbar-right .btn-secondary svg { margin: 0; }

/* Profile icon (top-right, shown after login) + its dropdown menu */
.navbar-profile {
    position: relative;
}
.navbar-profile-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: box-shadow 0.2s ease;
}
.navbar-profile-trigger:hover,
.navbar-profile-trigger[aria-expanded="true"] {
    box-shadow: 0 0 0 3px rgba(35, 83, 71, 0.18);
}
.navbar-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold, #8EB69B);
    color: var(--dark, #0B2B26);
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}
.navbar-profile-avatar-lg {
    width: 44px;
    height: 44px;
    font-size: 1rem;
    flex-shrink: 0;
}
.navbar-profile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: var(--white, #fff);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.16);
    padding: 8px;
    z-index: 1000;
}
.navbar-profile-menu.is-open {
    display: flex;
}
.navbar-profile-menu-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 6px;
}
.navbar-profile-menu-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.navbar-profile-menu-id strong {
    color: var(--dark, #1c1c1c);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-profile-menu-id span {
    color: #8a8a8a;
    font-size: 0.78rem;
}
.navbar-profile-menu a {
    padding: 10px;
    border-radius: 8px;
    color: var(--dark, #1c1c1c);
    font-size: 0.92rem;
    font-weight: 500;
}
.navbar-profile-menu a:hover {
    background: rgba(35, 83, 71, 0.08);
    color: var(--primary, #235347);
}
.navbar-profile-menu-logout,
.navbar-profile-logout {
    color: #b3413c !important;
}
.navbar-profile-menu-logout:hover,
.navbar-profile-logout:hover {
    background: rgba(179, 65, 60, 0.08) !important;
    color: #b3413c !important;
}

/* Compact mobile "Book" CTA — hidden on desktop, enabled <=1320px below. */
/* .main-header prefix: base.css's .btn-primary (loaded later) was overriding the plain
   class and leaking this compact button next to the full one on desktop. */
.main-header .navbar-book-mobile { display: none !important; }
.main-header .navbar-profile-mobile { display: none !important; }

/* ===== Mobile menu button + drawer (redesigned) =====
   Button: a 46px round outline button; the three bars morph into an X (.open).
   Drawer: slides in from the right over a dimmed page; dark green, serif links
   with small numbers, a Services accordion, and a sticky footer with Book + account. */
.hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    padding: 0;
    cursor: pointer;
    background: rgba(35, 83, 71, 0.07);
    border: 1.5px solid rgba(11, 43, 38, 0.22);
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.25s ease, border-color 0.25s ease;
}
.hamburger:hover { background: rgba(35, 83, 71, 0.14); }
.hamburger:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
}
.hamburger span:nth-child(2) { width: 13px; align-self: flex-end; margin-right: 13px; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.main-header.kg-hero-navbar:not(.scrolled) .hamburger { border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.1); }

body.kg-menu-open { overflow: hidden; }

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(4, 33, 28, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-menu-backdrop.show { opacity: 1; }

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    width: min(88vw, 380px);
    height: 100vh;
    height: 100dvh;
    color: #fff;
    background:
        radial-gradient(120% 60% at 100% 0%, rgba(142, 182, 155, 0.18) 0%, transparent 60%),
        linear-gradient(180deg, #0B2B26 0%, #04211C 100%);
    box-shadow: -18px 0 50px rgba(0, 0, 0, 0.3);
    border-radius: 22px 0 0 22px;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.4s;
}
.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
}
.mm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mm-brand {
    font-family: var(--kg-heading-font, 'Cormorant Garamond', serif);
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.mm-brand em { font-style: italic; color: #8EB69B; }
.mm-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    cursor: pointer;
}
.mm-close svg { width: 18px; height: 18px; }
.mm-close:focus-visible, .mm-book:focus-visible, .mobile-menu a:focus-visible, .mobile-dropdown-trigger:focus-visible { outline: 2px solid #8EB69B; outline-offset: 2px; }

.mm-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 8px 22px 12px; }
.mm-list, .mm-list ul { list-style: none; margin: 0; padding: 0; }
.mm-list > li { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.mm-list > li > a,
.mm-list .mobile-dropdown-trigger {
    display: flex;
    align-items: baseline;
    gap: 14px;
    width: 100%;
    padding: 15px 0;
    margin: 0;
    color: #fff;
    background: none;
    border: 0;
    text-align: left;
    font-family: var(--kg-heading-font, 'Cormorant Garamond', serif);
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1.15;
    cursor: pointer;
    transition: color 0.2s ease, padding-left 0.25s ease;
}
.mm-list > li > a:hover,
.mm-list > li > a:active,
.mm-list .mobile-dropdown-trigger:hover { color: #8EB69B; padding-left: 4px; }
.mm-n {
    flex: 0 0 auto;
    min-width: 1.6em;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: #8EB69B;
    opacity: 0.8;
}
.mobile-menu .mm-list .mobile-dropdown-trigger, .mobile-menu .mm-list > li > a { font-weight: 500; } /* beats kg-weight.css (600) */
.mm-list .mobile-dropdown-trigger svg { width: 16px; height: 16px; margin-left: auto; align-self: center; transition: transform 0.25s ease; }
.mm-list .dropdown.is-open .mobile-dropdown-trigger svg { transform: rotate(180deg); }
.mm-list .dropdown-menu {
    position: static;
    display: none;
    flex-direction: column;
    min-width: 0;
    margin: 0 0 14px 2.6em;
    padding: 4px 0 4px 14px;
    background: none;
    box-shadow: none;
    border: 0;
    border-left: 1px solid rgba(142, 182, 155, 0.4);
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
}
.mm-list .dropdown-menu.active { display: flex; }
.mm-list .dropdown-menu a {
    display: block;
    padding: 9px 0;
    color: rgba(255, 255, 255, 0.82);
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.92rem;
    font-weight: 400;
    background: none;
}
.mm-list .dropdown-menu a:hover { color: #fff; background: none; }
.mm-list .dropdown-menu .mm-all a { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: #8EB69B; font-weight: 500; }
.mm-list .dropdown-menu .mm-all svg { width: 15px; height: 15px; }

.mm-foot {
    flex: 0 0 auto;
    padding: 16px 22px calc(18px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.18);
}
.mm-book {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 20px;
    color: #04211C;
    background: #8EB69B;
    border-radius: 999px;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
}
.mm-book:hover { background: #A5C7B0; color: #04211C; }
.mm-book svg { width: 18px; height: 18px; }
.mm-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.mm-auth a {
    display: flex; align-items: center; justify-content: center;
    min-height: 44px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}
.mm-auth a:hover { background: rgba(255, 255, 255, 0.1); }
.mm-account { margin-top: 12px; }
.mm-hello { display: block; margin-bottom: 6px; color: #8EB69B; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }
.mm-account ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.mm-account a {
    display: inline-block;
    padding: 7px 13px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    font-size: 0.82rem;
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu, .mobile-menu-backdrop, .hamburger span { transition: none; }
}

/* Responsive */
@media (max-width: 1320px) {
    .navbar-menu {
        display: none;
    }
    .navbar-right {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .main-header .navbar-book-mobile {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        flex: 0 0 auto;
        min-height: 40px;
        padding: 0.4rem 1.1rem;
        margin-right: 12px;
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
        text-transform: none;
        background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
        color: var(--white);
        border: 1px solid var(--dark);
        border-radius: 999px;
    }
    .navbar-book-mobile svg { display: none; }
    /* Profile icon button (matches the round hamburger beside it) */
    .main-header .navbar-profile-mobile {
        position: relative;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        box-sizing: border-box;
        width: 42px;
        height: 42px;
        margin-right: 10px;
        color: var(--dark);
        background: rgba(35, 83, 71, 0.07);
        border: 1.5px solid rgba(11, 43, 38, 0.22);
        border-radius: 50%;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.25s ease, border-color 0.25s ease;
    }
    .main-header .navbar-profile-mobile svg { display: block; width: 22px; height: 22px; }
    .main-header .navbar-profile-mobile:hover { background: rgba(35, 83, 71, 0.14); }
    .main-header .navbar-profile-mobile:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
    .main-header .navbar-profile-mobile.is-signed-in { background: var(--dark); border-color: var(--dark); color: #fff; }
    .main-header .navbar-profile-mobile-dot {
        position: absolute; top: 1px; right: 1px; width: 10px; height: 10px;
        border-radius: 50%; background: #d9534f; border: 2px solid #fff;
    }
    .main-header.kg-hero-navbar:not(.scrolled) .navbar-profile-mobile { color: #fff; border-color: rgba(255, 255, 255, 0.55); background: rgba(255, 255, 255, 0.1); }
}

/* AI Skin Analysis became a top-level item -> 8 links + 2 buttons. The full
   bar needs ~1560px. Below 1320px it collapses to the hamburger; between
   1321px and 1599px spacing, link size and button padding are scaled down so
   the bar fits without wrapping, clipping the "Book Appointment" CTA, or
   pushing the page sideways. */
@media (min-width: 1321px) and (max-width: 1599px) {
    .navbar { gap: 20px; padding-left: 20px; padding-right: 20px; }
    .navbar-logo img,
    .navbar-logo-img { height: 58px; margin: -10px 0; }
    .navbar-menu { gap: 12px; }
    .navbar-menu a { font-size: 0.84rem; white-space: nowrap; }
    .navbar-right { gap: 10px; }
    .navbar-right .btn-primary,
    .navbar-right .btn-secondary { padding: 0.55rem 1rem; font-size: 0.84rem; white-space: nowrap; }
}
@media (min-width: 1600px) {
    .navbar-menu a { white-space: nowrap; }
}


/* "Register" — sits between Login and Book Appointment. Outlined so the
   bar keeps one filled secondary (Login) and one solid CTA (Book). Shown
   only to signed-out visitors (see includes/navbar.php). */
.navbar-right .btn-secondary.navbar-register,
.main-header.kg-hero-navbar .navbar-right > a.btn-secondary.navbar-register {
    background: transparent;
    border: 1.5px solid var(--gold, #8EB69B);
}
.navbar-right .btn-secondary.navbar-register:hover,
.main-header.kg-hero-navbar .navbar-right > a.btn-secondary.navbar-register:hover {
    background: var(--gold, #8EB69B);
    color: var(--dark);
}

/* Kaaya Glow Circle account menu refresh */
.navbar-profile-trigger:hover,
.navbar-profile-trigger[aria-expanded="true"] {
    box-shadow: 0 0 0 3px rgba(180, 154, 95, .22);
}
.navbar-profile-avatar {
    background: #e8efe5;
    border: 1px solid #d7e2d4;
    color: #234a36;
}
.navbar-profile-menu {
    background: #fffefa;
    border: 1px solid #e6e3d8;
    border-radius: 15px;
    box-shadow: 0 18px 44px rgba(23, 48, 35, .15);
    min-width: 248px;
    padding: 9px;
}
.navbar-profile-menu-head {
    background: #f5f5ef;
    border: 1px solid #e8e6dc;
    border-radius: 11px;
    margin: 0 0 7px;
    padding: 11px;
}
.navbar-profile-avatar-lg { background: #e8efe5; color: #234a36; }
.navbar-profile-menu-id strong { color: #20392e; }
.navbar-profile-menu-id span { color: #788278; }
.navbar-profile-menu a {
    border-radius: 9px;
    color: #344a3b;
    font-size: .88rem;
    min-height: 40px;
    padding: 11px 12px;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.navbar-profile-menu a:hover {
    background: #edf1e9;
    color: #173e30;
    transform: translateX(2px);
}
.navbar-profile-menu .navbar-profile-logout,
.navbar-profile-menu .navbar-profile-menu-logout { color: #994b3f !important; }
.navbar-profile-menu .navbar-profile-logout:hover,
.navbar-profile-menu .navbar-profile-menu-logout:hover { background: #f7e9e5 !important; }
@media (max-width: 480px) {
    .navbar-profile-menu { min-width: min(248px, calc(100vw - 28px)); }
}

/* Tightest phones (<=360px): shave the gutters so logo + Book + hamburger
   never touch or clip at 320px. */
@media (max-width: 480px) {
    /* Full "Book Appointment" label on phones: slightly smaller type so it fits beside the logo mark + hamburger. */
    .main-header .navbar-book-mobile { padding: 0.35rem 0.9rem; margin-right: 8px; font-size: 0.8rem; min-height: 38px; }
    .main-header .navbar-profile-mobile { width: 38px; height: 38px; margin-right: 8px; }
    .main-header .navbar-profile-mobile svg { width: 20px; height: 20px; }
}
@media (max-width: 360px) {
    .navbar { padding-left: 14px; padding-right: 14px; }
    .main-header .navbar-book-mobile { padding: 0.3rem 0.7rem; margin-right: 6px; font-size: 0.74rem; min-height: 36px; }
    .main-header .navbar-profile-mobile { width: 34px; height: 34px; margin-right: 6px; }
    .hamburger { width: 40px; height: 40px; }
}

/* Phones (<=480px): Book + Profile + Menu share the right side. The bar's 40px flex gap left no room for the
   profile icon (the hamburger was pushed off-screen), so use a small gap and right-align the button group. */
@media (max-width: 480px) {
    .navbar { gap: 8px; }
    .main-header .navbar-book-mobile { margin-left: auto; margin-right: 0; }
    .main-header .navbar-profile-mobile { margin-right: 0; }
}
