/* === HEADER === */
#site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
}

/* WP admin toolbar is position:fixed at the true viewport top (32px tall,
   46px under 783px) — without this, our sticky header's top:0 sticks
   underneath it instead of below it, so logged-in users see the nav
   overlapped/cut off by the black admin bar on scroll. */
.admin-bar #site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #site-header {
        top: 46px;
    }
}

.header-shell {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: clamp(12px, 1.8vw, 24px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: var(--header-height);
    gap: 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: var(--medical-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.site-logo .logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--medical-blue);
    line-height: 1.1;
}

.site-logo .logo-text span {
    color: var(--text-secondary);
    font-size: 0.7rem;
    display: block;
    font-family: var(--font-sans);
    font-weight: 500;
}

/* NAV */
#primary-navigation {
    flex: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu>li {
    position: relative;
}

.nav-menu>li>a {
    display: block;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: color 0.2s ease-out, background-color 0.2s ease-out;
    white-space: nowrap;
}

.nav-menu>li>a:hover,
.nav-menu>li.current-menu-item>a {
    color: var(--medical-blue);
    background: var(--sky-blue);
}

/* DROPDOWN */
.nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0.2s ease-out;
    z-index: 100;
}

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

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s ease-out, background-color 0.2s ease-out;
}

.nav-menu .sub-menu li a:hover {
    color: var(--medical-blue);
    background: var(--sky-blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.btn-header-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg-white);
    transition: border-color 0.2s ease-out, color 0.2s ease-out, background-color 0.2s ease-out;
}

.btn-header-secondary:hover {
    border-color: var(--medical-blue);
    color: var(--medical-blue);
    background: var(--sky-blue);
}

/* Account link shown inside the mobile hamburger menu only */
.mobile-account-link {
    display: none;
}

/* Mobile Nav Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    border-radius: 2px;
}

.nav-toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
