/* ================================================================
   LIFESCRIBE AI — Universal Header
   Shared across all sub-pages. Uses ls- prefix to avoid collisions.
   ================================================================ */

.ls-header,
.ls-announce,
.ls-mobile-menu {
    --ls-teal: #1A5F7A;
    --ls-teal-dark: #134A5F;
    --ls-gold: #D4AC0D;
    --ls-gold-light: #E8C84A;
    --ls-gold-dark: #C49B0C;
    --ls-cream: #F9F3E9;
    --ls-text: #2C3E50;
    --ls-text-muted: #5D6D7E;
    --ls-white: #FFFFFF;
    --ls-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Announcement Banner --- */
.ls-announce {
    background: linear-gradient(135deg, var(--ls-teal) 0%, var(--ls-teal-dark) 100%);
    padding: 10px 0;
    text-align: center;
}

.ls-announce p {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ls-white);
    letter-spacing: 0.3px;
    margin: 0;
    line-height: 1.4;
}

.ls-announce strong {
    color: var(--ls-gold-light);
    font-weight: 700;
}

/* --- Container --- */
.ls-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.ls-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(26, 95, 122, 0.06);
    transition: box-shadow 0.3s var(--ls-transition);
}

.ls-header.ls-header--scrolled {
    box-shadow: 0 4px 20px rgba(26, 95, 122, 0.10);
}

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

/* --- Logo --- */
.ls-header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.ls-header__logo:hover {
    opacity: 0.85;
}

.ls-header__logo-img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: contain;
    flex-shrink: 0;
}

.ls-header__logo-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ls-teal);
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.ls-header__logo-ai {
    font-weight: 700;
    color: var(--ls-gold);
    margin-left: 4px;
}

/* --- Desktop Nav --- */
.ls-header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ls-header__link {
    font-family: 'Inter', 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ls-text-muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
    position: relative;
    white-space: nowrap;
}

.ls-header__link:hover {
    color: var(--ls-teal);
    background-color: rgba(26, 95, 122, 0.05);
}

.ls-header__link.ls-active {
    color: var(--ls-teal);
    font-weight: 600;
}

.ls-header__link.ls-active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    background: linear-gradient(90deg, var(--ls-gold), var(--ls-gold-light));
    border-radius: 2px;
}

/* --- CTA Button --- */
.ls-header__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--ls-gold) 0%, var(--ls-gold-dark) 100%);
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(212, 172, 13, 0.30);
    transition: all 0.3s var(--ls-transition);
    flex-shrink: 0;
    min-height: 44px;
}

.ls-header__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(212, 172, 13, 0.4);
    background: linear-gradient(135deg, var(--ls-gold-dark) 0%, #B8960B 100%);
}

.ls-header__cta:active {
    transform: translateY(0);
}

.ls-header__cta-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ls-white);
    line-height: 1.2;
    letter-spacing: 0.2px;
}

.ls-header__cta-sub {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1;
    margin-top: 2px;
}

/* --- Hamburger --- */
.ls-header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.ls-header__hamburger:hover {
    background-color: rgba(26, 95, 122, 0.05);
}

.ls-header__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--ls-teal);
    border-radius: 2px;
    transition: all 0.3s var(--ls-transition);
    transform-origin: center;
}

.ls-header__hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.ls-header__hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.ls-header__hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Mobile Menu --- */
.ls-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    visibility: hidden;
}

.ls-mobile-menu.ls-mobile-menu--open {
    pointer-events: auto;
    visibility: visible;
}

.ls-mobile-menu__overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 95, 122, 0.3);
    opacity: 0;
    transition: opacity 0.3s var(--ls-transition);
    backdrop-filter: blur(2px);
}

.ls-mobile-menu--open .ls-mobile-menu__overlay {
    opacity: 1;
}

.ls-mobile-menu__drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: var(--ls-white);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 0.35s var(--ls-transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.ls-mobile-menu--open .ls-mobile-menu__drawer {
    transform: translateX(0);
}

.ls-mobile-menu__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(26, 95, 122, 0.08);
}

.ls-mobile-menu__close {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--ls-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ls-mobile-menu__close:hover {
    background-color: rgba(26, 95, 122, 0.05);
    color: var(--ls-teal);
}

.ls-mobile-menu__nav {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
}

.ls-mobile-menu__link {
    font-family: 'Inter', 'Source Sans 3', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ls-text);
    text-decoration: none;
    padding: 14px 24px;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
}

.ls-mobile-menu__link:hover {
    background-color: rgba(26, 95, 122, 0.04);
    color: var(--ls-teal);
}

.ls-mobile-menu__link.ls-active {
    color: var(--ls-teal);
    font-weight: 600;
    border-left-color: var(--ls-gold);
    background-color: rgba(26, 95, 122, 0.03);
}

.ls-mobile-menu__cta {
    display: block;
    margin: 24px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--ls-gold) 0%, var(--ls-gold-dark) 100%);
    border-radius: 50px;
    text-align: center;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ls-white);
    box-shadow: 0 4px 16px rgba(212, 172, 13, 0.30);
    transition: all 0.3s var(--ls-transition);
}

.ls-mobile-menu__cta:hover {
    background: linear-gradient(135deg, var(--ls-gold-dark) 0%, #B8960B 100%);
    transform: translateY(-1px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .ls-header__nav {
        display: none;
    }

    .ls-header__hamburger {
        display: flex;
    }

    .ls-header__inner {
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .ls-container {
        padding: 0 16px;
    }

    .ls-header__inner {
        height: 72px;
    }

    .ls-header__logo-img {
        width: 50px;
        height: 50px;
    }

    .ls-header__logo-text {
        font-size: 1.25rem;
    }

    .ls-header__cta {
        padding: 8px 16px;
    }

    .ls-header__cta-text {
        font-size: 0.78rem;
    }

    .ls-header__cta-sub {
        font-size: 0.6rem;
    }
}

@media (max-width: 375px) {
    .ls-header__logo-text {
        font-size: 1.1rem;
    }

    .ls-header__cta {
        padding: 6px 12px;
    }

    .ls-header__cta-sub {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ls-header,
    .ls-header__link,
    .ls-header__cta,
    .ls-header__hamburger span,
    .ls-mobile-menu__overlay,
    .ls-mobile-menu__drawer,
    .ls-mobile-menu__link,
    .ls-mobile-menu__cta {
        transition-duration: 0.01ms !important;
    }
}
