/* ================= 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);
}

.navbar {
    max-width: 1280px;
    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-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--dark) !important;
    transition: color 0.3s ease;
}
.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 {
    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);
}

/* 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;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}
.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: var(--white);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 0 0 12px 12px;
}
.mobile-menu ul {
    list-style: none;
    padding: 20px;
}
.mobile-menu li {
    margin-bottom: 15px;
}
.mobile-menu a {
    color: var(--dark);
    font-weight: 500;
}
.mobile-menu a:hover {
    color: var(--gold);
}

/* Mobile "Services" dropdown — tap to expand/collapse (toggled by the
   existing .dropdown / .dropdown-menu.active handler in main.js). */
.mobile-menu .dropdown-toggle,
.mobile-menu .mobile-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--dark);
    font-weight: 500;
    cursor: pointer;
}
.mobile-menu .mobile-dropdown-trigger svg {
    width: 13px;
    height: 13px;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.mobile-menu .dropdown.is-open .mobile-dropdown-trigger svg {
    transform: rotate(180deg);
}
.mobile-menu .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background: rgba(35, 83, 71, 0.04);
    border-radius: 8px;
    min-width: 0;
    margin: 10px 0 0;
    padding: 4px 0;
}
.mobile-menu .dropdown-menu.active {
    display: flex;
}
.mobile-menu .dropdown-menu a {
    padding: 9px 16px;
    font-weight: 400;
    font-size: 0.95rem;
}
.mobile-menu .dropdown-menu-label {
    padding: 8px 16px 2px !important;
}
.mobile-menu .dropdown-menu-divider {
    margin: 6px 12px;
}

/* Responsive */
@media (max-width: 992px) {
    .navbar-menu {
        display: none;
    }
    .navbar-right {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .mobile-menu {
        display: none;
    }
    .mobile-menu.active {
        display: block;
    }
}
