/* ==========================================================================
   header.css — MedVita Health Tech
   Section: Global Header (Logo, Primary Navigation, Mobile Menu, CTA)
   Depends on tokens defined in global.css
   ========================================================================== */

.mvht-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: var(--mvht-header-height);
    background: var(--mvht-white);
    box-shadow: 0 2px 12px rgba(43, 42, 41, 0.06);
}

.mvht-header__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* Logo */
.mvht-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.mvht-header__logo img {
    height: 44px;
    width: auto;
}

/* Primary navigation */
.mvht-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.mvht-nav__list {
    display: flex;
    align-items: center;
    gap: 36px;
}

.mvht-nav__link {
    position: relative;
    font-family: var(--mvht-font-body);
    font-weight: 500;
    font-size: 15px;
    color: var(--mvht-charcoal);
    padding: 8px 0;
    transition: color 0.2s ease;
}

.mvht-nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--mvht-red);
    transition: width 0.25s ease;
}

.mvht-nav__link:hover,
.mvht-nav__link.is-active {
    color: var(--mvht-blue);
}

.mvht-nav__link:hover::after,
.mvht-nav__link.is-active::after {
    width: 100%;
}

/* Header actions (CTA + mobile toggle) */
.mvht-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.mvht-header__cta {
    padding: 10px 22px;
    font-size: 14px;
    white-space: nowrap;
}

/* Mobile menu toggle (hidden on desktop) */
.mvht-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mvht-menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--mvht-charcoal);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Toggled (open) state */
.mvht-menu-toggle[aria-expanded="true"] .mvht-menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mvht-menu-toggle[aria-expanded="true"] .mvht-menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.mvht-menu-toggle[aria-expanded="true"] .mvht-menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Responsive — Tablet & Mobile
   ========================================================================== */

@media (max-width: 991px) {
    .mvht-header {
        height: var(--mvht-header-height-mobile);
    }

    .mvht-header__logo img {
        height: 36px;
    }

    .mvht-menu-toggle {
        display: flex;
    }

    .mvht-nav {
        position: fixed;
        top: var(--mvht-header-height-mobile);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--mvht-header-height-mobile));
        background: var(--mvht-white);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        justify-content: flex-start;
        box-shadow: inset 0 1px 0 var(--mvht-grey-300);
    }

    .mvht-nav.is-open {
        transform: translateX(0);
    }

    .mvht-nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
        padding: 12px 0;
    }

    .mvht-nav__item {
        width: 100%;
    }

    .mvht-nav__link {
        display: block;
        width: 100%;
        padding: 16px var(--mvht-container-pad);
        border-bottom: 1px solid var(--mvht-grey-100);
    }

    .mvht-nav__link::after {
        display: none;
    }

    .mvht-header__cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .mvht-header__logo img {
        height: 30px;
    }
}
