/* =================================================================
   SimpleLabs Home Site - Design System
   Premium, Science-Driven, Trust-Building
   ================================================================= */

/* --- CSS Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color System - Sophisticated, minimal palette */
    --color-primary: #1a1a1a;
    --color-primary-light: #333333;
    --color-secondary: #fffcfc;
    --color-accent: #1e3a8a;
    --color-accent-hover: #0052a3;
    --color-background: #ffffff;
    --color-background-alt: #f8f9fa;
    --color-background-subtle: #fafbfc;
    --color-border: #e5e7eb;
    --color-border-light: #f0f1f3;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #4a4a4a;
    --color-text-tertiary: #6b7280;
    --color-success: #059669;
    --color-warning: #d97706;
    
    /* Typography Scale */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", monospace;
    
    /* Fluid Type Scale */
    --text-xs: 0.75rem;   
    --text-xxs: 0.625rem;  /* 10px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    
    /* Spacing Scale (8px base) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 2.5rem;   /* 40px */
    --space-6: 3rem;     /* 48px */
    --space-8: 4rem;     /* 64px */
    --space-10: 5rem;    /* 80px */
    --space-12: 6rem;    /* 96px */
    --space-16: 8rem;    /* 128px */
    
    /* Layout */
    --max-width-prose: 65ch;
    --max-width-narrow: 600px;
    --max-width-medium: 900px;
    --max-width-wide: 1200px;
    --max-width-full: 1440px;
    
    /* Elevation (subtle shadows) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Base Styles --- */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    line-height: 1.6;
    font-size: var(--text-base);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-primary);
}

h1 { font-size: var(--text-5xl); margin-bottom: var(--space-3); }
h2 { font-size: var(--text-4xl); margin-bottom: var(--space-3); }
h3 { font-size: var(--text-3xl); margin-bottom: var(--space-2); }
h4 { font-size: var(--text-2xl); margin-bottom: var(--space-2); }
h5 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
h6 { font-size: var(--text-lg); margin-bottom: var(--space-1); }

p {
    margin-bottom: var(--space-3);
    max-width: var(--max-width-prose);
}

.text-balance {
    text-wrap: balance;
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-tertiary {
    color: var(--color-text-tertiary);
}

/* --- Layout Components --- */
.container {
    width: 100%;
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-narrow {
    max-width: var(--max-width-narrow);
}

.container-wide {
    max-width: var(--max-width-full);
}

.section {
    padding: var(--space-12) 0;
}

.section-tight {
    padding: var(--space-8) 0;
}

/* --- Header Navigation (Sticky) --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border-light);
    transition: box-shadow var(--transition-base);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo span {
    color: var(--color-text-tertiary);
    font-weight: 400;
    font-size: var(--text-sm);
    margin-left: var(--space-1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    list-style: none;
}

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Ensure button text stays white in nav */
.nav-links .btn-primary {
    color: white !important;
}

.nav-links .btn-primary:hover {
    color: white !important;
}

/* --- Responsive Visibility Utilities --- */
.mobile-only {
    display: none; /* Hidden by default on desktop */
}

.desktop-only {
    display: list-item; /* Shown by default on desktop */
}

/* --- Dropdown Menu --- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-trigger {
    cursor: pointer;
    position: relative;
}

.nav-dropdown .dropdown-trigger::after {
    content: '▾';
    margin-left: 0.5rem;
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-trigger::after,
.nav-dropdown.active .dropdown-trigger::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: fixed;
    left: 0;
    right: 0;
    top: 100%; /* Position directly under the header */
    width: 100%;
    background: white;
    border-top: 1px solid var(--color-border-light);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    z-index: 999;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    padding: var(--space-8) 0;
}

.dropdown-section {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    transition: background var(--transition-fast);
}

.dropdown-section:hover {
    background: var(--color-background);
}

.dropdown-section h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.dropdown-section p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
    line-height: 1.5;
}

.dropdown-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.dropdown-link:hover {
    gap: var(--space-2);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-background);
    color: var(--color-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: var(--text-lg);
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* --- Hero Section --- */
.hero {
    padding: var(--space-16) 0 var(--space-12);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-background-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: var(--text-6xl);
    margin-bottom: var(--space-4);
    max-width: 20ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-subheadline {
    font-size: var(--text-xl);
    color: var(--color-text-secondary);
    max-width: 50ch;
    margin: 0 auto var(--space-6);
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-10);
}

/* Dual-Path Hero (AI Search + Browse) */
.hero-dual-path {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: var(--space-4);
    max-width: 900px;
    margin: 0 auto var(--space-10);
    flex-wrap: wrap;
}

.path-option {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.path-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin: 0;
    letter-spacing: 0.5px;
}

.path-divider {
    display: flex;
    align-items: center;
    padding: var(--space-4) 0;
}

.path-divider span {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* AI Search Form */
.ai-search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.search-input-wrapper input {
    width: 100%;
    padding: 14px 60px 14px 20px;
    font-size: var(--text-base);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    background: var(--color-bg-light);
    color: var(--color-text-primary);
    transition: all var(--transition-base);
    font-family: var(--font-sans);
    line-height: 1.5;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--color-accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.search-input-wrapper input::placeholder {
    color: var(--color-text-tertiary);
    transition: opacity 0.2s ease;
}

.search-input-wrapper input:focus::placeholder {
    opacity: 0.6;
}

.search-submit-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit-btn:hover:not(:disabled) {
    background: var(--color-accent-hover);
    transform: translateY(-50%) scale(1.05);
}

.search-submit-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.search-submit-btn:disabled {
    background: var(--color-text-tertiary);
    cursor: not-allowed;
    opacity: 0.5;
}

.search-icon {
    display: block;
    line-height: 1;
}

.search-hint {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-top: 12px;
    text-align: center;
}

/* Loading state for search */
.search-input-wrapper.loading .search-submit-btn {
    pointer-events: none;
}

.search-input-wrapper.loading .search-icon {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-8);
    max-width: var(--max-width-medium);
    margin-left: auto;
    margin-right: auto;
}

.pillar {
    text-align: center;
}

.pillar-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-1);
}

.pillar-description {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin: 0;
}

/* --- Trust Band --- */
.trust-band {
    background: var(--color-background-subtle);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--space-6) 0;
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
    text-align: center;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.trust-item-icon {
    font-size: var(--text-2xl);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-1);
}

.trust-item-text {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-primary);
    margin: 0;
}

.trust-item-subtext {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin: 0;
}

/* --- Feature Grid --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    padding: var(--space-5);
    background: var(--color-background);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: var(--text-3xl);
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.feature-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.feature-description {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- Step Cards (How It Works) --- */
.step-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-4);
}

.step-card {
    position: relative;
    padding: var(--space-5);
    background: var(--color-background-alt);
    border-radius: var(--radius-lg);
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: var(--text-lg);
    margin-bottom: var(--space-3);
}

.step-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.step-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* --- Biomarker Category Carousel --- */
.biomarker-categories {
    background: var(--color-background);
    overflow: hidden;
}

/* Carousel Container */
.category-carousel {
    position: relative;
    margin-top: var(--space-8);
    padding-bottom: var(--space-12);
}

/* Carousel Track */
.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc(33.333% - 20px);
    gap: var(--space-5);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

@media (max-width: 1199px) {
    .carousel-track {
        grid-auto-columns: calc(50% - 15px);
    }
}

@media (max-width: 767px) {
    .carousel-track {
        grid-auto-columns: 100%;
    }
}

/* Category Cards */
.category-card {
    position: relative;
    padding: var(--space-6);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.category-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* CTA Card */
.category-card-cta {
    background: linear-gradient(135deg, #2c5f2d 0%, #1e4620 100%);
    border: none;
    color: white;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.category-card-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.category-card-cta .category-title,
.category-card-cta .category-description {
    color: white;
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: white;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.carousel-btn-prev {
    left: -24px;
}

.carousel-btn-next {
    right: -24px;
}

@media (max-width: 1199px) {
    .carousel-btn-prev {
        left: 0;
    }
    .carousel-btn-next {
        right: 0;
    }
}

@media (max-width: 767px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: var(--space-6);
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-base);
}

.carousel-indicator:hover {
    background: var(--color-primary);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: var(--color-primary);
    width: 24px;
    border-radius: 4px;
}

/* Card Content */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.category-icon {
    font-size: 2rem;
    line-height: 1;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--color-background-alt);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-card-cta .category-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.category-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
    line-height: 1.3;
}

.category-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.5;
}

.category-card-cta .category-description {
    color: rgba(255, 255, 255, 0.9);
}

.category-tests {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-4) 0;
    flex-grow: 1;
}

.category-tests li {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
    line-height: 1.4;
}

.category-tests li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.category-link {
    display: inline-flex;
    align-items: center;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: all var(--transition-base);
    margin-top: auto;
}

.category-link:hover {
    color: var(--color-primary-dark);
    transform: translateX(3px);
}

.category-card-cta .btn-primary {
    background: white;
    color: var(--color-primary);
    border: none;
    margin-top: var(--space-2);
}

.category-card-cta .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

/* --- Panel Cards --- */
.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-5);
}

.panel-card {
    padding: var(--space-5);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
}

.panel-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.panel-tier {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.panel-name {
    font-size: var(--text-2xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.panel-for {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.panel-includes {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-4);
    flex-grow: 1;
}

.panel-price {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-3);
}

.panel-cta {
    width: 100%;
}

/* --- How It Works Section - Timeline Design --- */
.how-it-works-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: var(--space-10) 0;
    padding: 0 var(--space-8);
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    top: 24px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 50%, #1e3a8a 100%);
    z-index: 1;
}

/* Timeline Step */
.timeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    z-index: 2;
}

/* Step Number Circle */
.timeline-step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
    border: 4px solid #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: var(--space-4);
}

.timeline-step:hover .timeline-step-number {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

/* Timeline Tag (compact by default) */
.timeline-tag {
    background: white;
    border: 2px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    max-width: 200px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.timeline-tag:hover {
    border-color: var(--color-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    max-width: 280px;
}

/* Tag Title */
.timeline-tag-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    text-align: center;
}

/* Tag Description (hidden by default) */
.timeline-tag-description {
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.timeline-tag:hover .timeline-tag-description {
    max-height: 150px;
    opacity: 1;
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border-light);
}

.timeline-step:hover .timeline-tag {
    border-color: var(--color-accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    max-width: 280px;
}

.timeline-step:hover .timeline-tag .timeline-tag-description {
    max-height: 150px;
    opacity: 1;
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-border-light);
}

/* CTA */
.how-it-works-cta {
    text-align: center;
    margin-top: var(--space-8);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .how-it-works-timeline {
        flex-direction: column;
        align-items: stretch;
        padding: 0 var(--space-4);
        gap: var(--space-6);
    }
    
    .timeline-line {
        display: none;
    }
    
    .timeline-step {
        flex-direction: row;
        gap: var(--space-4);
        align-items: flex-start;
    }
    
    .timeline-step-number {
        width: 40px;
        height: 40px;
        font-size: var(--text-lg);
        margin-bottom: 0;
        min-width: 40px;
    }
    
    .timeline-tag {
        flex: 1;
        max-width: none;
    }
    
    .timeline-tag-title {
        text-align: left;
    }
    
    /* Show description by default on mobile */
    .timeline-tag-description {
        max-height: 200px;
        opacity: 1;
        margin-top: var(--space-2);
        padding-top: var(--space-2);
        border-top: 1px solid var(--color-border-light);
    }
}

/* --- Comparison Section - Card-Based Design (from /why) --- */
.comparison-section {
    padding: var(--space-12) 0;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    margin: var(--space-10) 0;
    align-items: center;
}

.comparison-column {
    background: white;
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.comparison-column-highlight {
    border: 2px solid var(--color-accent);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-8px) scale(1.02);
    padding: var(--space-5) var(--space-6);
    position: relative;
    z-index: 10;
}

.comparison-column-highlight:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-10px) scale(1.02);
}

.comparison-column-title {
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-4);
    text-align: center;
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-border-light);
}

.comparison-column-highlight .comparison-column-title {
    font-size: var(--text-xl);
    font-weight: 650;
    color: var(--color-primary);
}

.comparison-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comparison-list li {
    padding: var(--space-2) 0;
    padding-left: var(--space-4);
    font-size: var(--text-sm);
    line-height: 1.6;
    position: relative;
}

.comparison-column-highlight .comparison-list li {
    font-size: var(--text-sm);
    font-weight: 500;
    line-height: 1.65;
}

.comparison-positive:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: 600;
}

.comparison-negative:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: #dc2626;
    font-weight: 600;
}

.comparison-neutral:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-text-tertiary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-column-highlight {
        transform: translateY(-6px) scale(1.01);
        padding: var(--space-5);
    }
    
    .comparison-column-highlight:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

/* Bottom CTA Box */
.comparison-cta-box {
    margin-top: var(--space-10);
    text-align: center;
    padding: var(--space-8);
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-radius: var(--radius-lg);
    color: white;
}

.comparison-cta-title {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-3);
}

.comparison-cta-text {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-cta-box .btn-primary {
    background: white;
    color: #1e3a8a;
    font-size: var(--text-lg);
    padding: 16px 40px;
    font-weight: 600;
}

.comparison-cta-box .btn-primary:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .comparison-card-header {
        padding: var(--space-4);
    }
    
    .comparison-card-body {
        padding: var(--space-4);
    }
    
    .comparison-card-icon {
        font-size: 1.5rem;
    }
    
    .comparison-card-title {
        font-size: var(--text-base);
    }
    
    .comparison-check,
    .comparison-cross {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    .comparison-content strong {
        font-size: var(--text-sm);
    }
    
    .comparison-content p {
        font-size: var(--text-xs);
    }
    
    .comparison-cta-box {
        padding: var(--space-6);
    }
    
    .comparison-cta-title {
        font-size: var(--text-2xl);
    }
    
    .comparison-cta-text {
        font-size: var(--text-base);
    }
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    max-width: var(--max-width-narrow);
    margin: 0 auto var(--space-8);
}

.section-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* --- Footer --- */
.site-footer {
    background: var(--color-background-subtle);
    border-top: 1px solid var(--color-border-light);
    padding: var(--space-10) 0 var(--space-6);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.footer-logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.footer-logo span {
    color: var(--color-text-tertiary);
    font-weight: 400;
    font-size: var(--text-sm);
    margin-left: var(--space-1);
}

.footer-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.footer-tagline {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.footer-section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.footer-section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.footer-disclaimer {
    font-size: var(--text-xxs);
    color: var(--color-text-tertiary);
    line-height: 1.5;
    max-width: 120ch;
}

/* --- Utilities --- */
.fade-in {
    animation: fadeIn var(--transition-slow) ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-6xl: 2.5rem;
    }
    
    .hero {
        padding: var(--space-10) 0 var(--space-8);
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: var(--space-3);
        line-height: 1.2;
    }
    
    .hero-subheadline {
        font-size: 15px !important;
        margin-bottom: var(--space-5) !important;
        padding: 0 var(--space-2);
    }
    
    .hero-cta-group {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-cta-group .btn {
        width: 100%;
    }
    
    /* Dual-path responsive */
    .hero-dual-path {
        flex-direction: column;
        gap: var(--space-4);
        margin-bottom: var(--space-6);
        padding: 0 var(--space-2);
    }
    
    .path-option {
        width: 100%;
        min-width: 0;
    }
    
    .path-label {
        font-size: 13px;
    }
    
    .path-divider {
        width: 100%;
        padding: 0;
        margin: var(--space-2) 0;
        justify-content: center;
        text-align: center;
    }
    
    .path-divider span {
        font-size: 12px;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .search-input-wrapper input {
        font-size: 16px;
        padding: 12px 54px 12px 18px;
        border-radius: 24px;
    }
    
    .search-submit-btn {
        width: 36px;
        height: 36px;
        right: 6px;
    }
    
    .search-hint {
        font-size: 11px;
        margin-top: var(--space-1);
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 15px;
    }
    
    .hero-pillars {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        margin-top: var(--space-6);
        padding: 0 var(--space-2);
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }
    
    nav.active {
        right: 0;
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        padding: var(--space-16) var(--space-4) var(--space-4);
        gap: 0;
    }
    
    /* Show mobile-only items, hide desktop-only on mobile */
    .mobile-only {
        display: list-item !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--color-border-light);
    }
    
    .nav-links a {
        display: block;
        padding: var(--space-4) var(--space-3);
        font-size: var(--text-base);
        color: var(--color-text-primary);
        text-align: left;
    }
    
    .nav-links a:hover {
        background: var(--color-background);
        color: var(--color-accent);
    }
    
    .nav-links .btn {
        margin: var(--space-4) var(--space-3);
        width: calc(100% - var(--space-6));
    }

    /* Mobile Dropdown */
    .nav-dropdown {
        border-bottom: 1px solid var(--color-border-light);
    }

    .nav-dropdown .dropdown-trigger {
        display: block;
        padding: var(--space-4) var(--space-3);
        font-size: var(--text-base);
        color: var(--color-text-primary);
        text-align: left;
        background: none;
    }

    .nav-dropdown .dropdown-trigger:hover {
        background: var(--color-background);
        color: var(--color-accent);
    }

    .nav-dropdown .dropdown-trigger::after {
        float: right;
        transition: transform 0.3s ease;
    }

    .nav-dropdown.active .dropdown-trigger::after {
        transform: rotate(180deg);
    }

    /* Nested dropdown items in mobile */
    .nav-dropdown .dropdown-menu {
        position: static !important;
        width: 100%;
        box-shadow: none;
        border-top: none;
        border-left: none;
        background: var(--color-background);
        margin-top: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        opacity: 1 !important;
        visibility: visible !important;
        top: auto !important; /* Override desktop positioning */
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 600px;
    }

    .nav-dropdown .dropdown-content {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    .nav-dropdown .dropdown-section {
        padding: 0;
        border-bottom: none;
        border-radius: 0;
    }

    .nav-dropdown .dropdown-section:hover {
        background: transparent;
    }

    .nav-dropdown .dropdown-section h3 {
        display: none; /* Hide section titles on mobile */
    }

    .nav-dropdown .dropdown-section p {
        display: none; /* Hide descriptions on mobile */
    }

    .nav-dropdown .dropdown-link {
        display: block;
        padding: var(--space-3) var(--space-3) var(--space-3) var(--space-6);
        font-size: var(--text-sm);
        color: var(--color-text-secondary);
        text-decoration: none;
        border-bottom: 1px solid var(--color-border-light);
        background: var(--color-background);
    }

    .nav-dropdown .dropdown-link:hover {
        color: var(--color-accent);
        background: rgba(30, 58, 138, 0.05);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .section {
        padding: var(--space-8) 0;
    }
}

/* ===================================================================
   Quest Diagnostics Locator Section
   =================================================================== */

.quest-locator-section {
    background: var(--color-background-alt);
    padding: var(--space-12) 0;
}

.quest-intro {
    margin-bottom: var(--space-8);
}

.quest-stats {
    display: flex;
    gap: var(--space-8);
    justify-content: center;
    margin: var(--space-6) 0;
    flex-wrap: wrap;
}

.quest-stat {
    text-align: center;
}

.quest-stat-number {
    font-size: var(--text-5xl);
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.quest-stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quest-locator-search {
    max-width: 1200px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-group input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-normal);
    font-family: var(--font-sans);
}

.search-input-group input:focus {
    border-color: var(--color-accent);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--color-accent);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--color-border-light);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background-color: var(--color-background-subtle);
}

.autocomplete-item-main {
    font-weight: 600;
    color: var(--color-primary);
    font-size: var(--text-base);
    margin-bottom: 4px;
}

.autocomplete-item-details {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.autocomplete-loading,
.autocomplete-no-results {
    padding: var(--space-3) var(--space-4);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: var(--text-sm);
}

.locator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-top: var(--space-6);
}

.map-container {
    position: sticky;
    top: 20px;
    height: 600px;
    border-radius: var(--radius-large);
    overflow: hidden;
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-medium);
}

#questMap {
    width: 100%;
    height: 100%;
}

.location-results {
    margin-top: 0;
}

.location-card {
    background: white;
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    border-radius: var(--radius-medium);
    border: 2px solid var(--color-border);
    transition: all var(--transition-normal);
}

.location-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-small);
}

.location-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-2);
}

.location-address {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-2);
}

.location-distance {
    color: var(--color-accent);
    font-weight: 600;
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.location-details {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.location-detail {
    display: flex;
    align-items: center;
    gap: 6px;
}

.location-hours {
    margin-top: var(--space-3);
    padding: var(--space-3);
    background: var(--color-background-subtle);
    border-radius: var(--radius-small);
    font-size: var(--text-sm);
}

.hours-today {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.hours-status {
    color: var(--color-success);
    font-weight: 600;
}

.hours-status.closed {
    color: #dc2626;
}

.location-actions {
    margin-top: var(--space-3);
    display: flex;
    gap: var(--space-2);
}

.location-actions a {
    padding: var(--space-2) var(--space-3);
    background: var(--color-background-subtle);
    color: var(--color-primary);
    text-decoration: none;
    border-radius: var(--radius-small);
    font-size: var(--text-sm);
    font-weight: 600;
    transition: background var(--transition-fast);
}

.location-actions a:hover {
    background: var(--color-border);
}

.loading-spinner {
    text-align: center;
    padding: var(--space-8);
    font-size: var(--text-lg);
    color: var(--color-text-tertiary);
}

.no-results-message {
    text-align: center;
    padding: var(--space-8);
    background: white;
    border-radius: var(--radius-medium);
    border: 2px solid var(--color-border);
}

/* Quest Locator Responsive */
@media (max-width: 968px) {
    .locator-layout {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 400px;
        position: relative;
        top: 0;
    }

    .location-actions {
        flex-direction: column;
    }

    .location-actions a {
        text-align: center;
    }
}
