/**
 * ClearDrugTests.com - Authority Theme
 * Privacy-first, medically authoritative, trust-building design
 * 
 * Color Philosophy:
 * - Primary Teal (#0d9488): Clarity, health, trust
 * - Secondary Indigo (#6366f1): Trust, professionalism
 * - Accent Green (#22c55e): Positive action, go, health
 * - Neutral Slate (#475569): Professional, clean
 */

:root {
    /* Primary Palette - Clarity & Health */
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --primary-soft: #f0fdfa;
    
    /* Secondary Palette - Trust & Professionalism */
    --secondary: #6366f1;
    --secondary-dark: #4f46e5;
    --secondary-light: #818cf8;
    --secondary-soft: #eef2ff;
    
    /* Accent - Action & Health */
    --accent: #22c55e;
    --accent-dark: #16a34a;
    --accent-light: #4ade80;
    --accent-soft: #f0fdf4;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Text Colors */
    --text: #1e293b;
    --text-light: #475569;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    /* Background Colors */
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --bg-soft: #f1f5f9;
    --bg-muted: #e2e8f0;
    
    /* Border Colors */
    --border: #cbd5e1;
    --border-light: #e2e8f0;
    --border-soft: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.07), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.02);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html { 
    scroll-behavior: smooth; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--primary-dark); }

/* Container */
.container { 
    max-width: 1280px; 
    margin: 0 auto; 
    padding: 0 var(--space-6); 
}

.container-narrow { max-width: 800px; }
.container-wide { max-width: 1440px; }

/* Header - Clean & Trustworthy */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.logo-text span {
    color: var(--primary);
}

.logo-tagline {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: -2px;
}

/* Navigation */
.main-nav { 
    display: flex; 
    gap: var(--space-8); 
    align-items: center; 
}

.nav-link {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: var(--space-2) 0;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Privacy Badge */
.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--secondary-soft);
    color: var(--secondary-dark);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* CTA Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: var(--primary);
    color: white;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.cta-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
    color: white;
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button-secondary {
    background: var(--bg-white);
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: none;
}

.cta-button-secondary:hover {
    background: var(--primary-soft);
}

.cta-button-accent {
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.cta-button-accent:hover {
    background: var(--accent-dark);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

/* Hero Section */
.hero {
    padding: var(--space-20) var(--space-6) var(--space-16);
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--secondary-soft) 50%, var(--accent-soft) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -1px;
    max-width: 800px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: var(--space-8);
    max-width: 640px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-bottom: var(--space-10);
}

/* Trust Indicators */
.hero-trust {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
}

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

.trust-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow);
}

.trust-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.trust-text strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
}

/* Trust Bar */
.trust-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: var(--space-5) 0;
}

.trust-bar-content {
    display: flex;
    justify-content: center;
    gap: var(--space-16);
    flex-wrap: wrap;
}

.trust-bar-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 0.9375rem;
    color: var(--text-light);
}

.trust-bar-item strong {
    color: var(--primary);
    font-weight: 700;
}

/* Sections */
.section { 
    padding: var(--space-20) 0; 
}

.section-white { background: var(--bg-white); }
.section-soft { background: var(--bg-soft); }
.section-gradient {
    background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-12);
}

.section-label {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--primary-soft);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Cards */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all 0.2s ease;
    height: 100%;
}

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

.card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--secondary-soft) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-4);
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.card p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Grid Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Test Cards */
.test-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.test-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.test-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.test-card-category {
    padding: var(--space-1) var(--space-3);
    background: var(--bg-soft);
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}

.test-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
}

.test-card-meta {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.test-card-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.test-card-price {
    margin-top: auto;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.test-card-price .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.test-card-price .price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-muted);
}

/* Article Cards */
.article-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
}

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

.article-card-image {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--secondary-soft) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.article-card-content {
    padding: var(--space-5);
}

.article-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.article-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-2);
    line-height: 1.4;
}

.article-card p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* State Cards */
.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-4);
}

.state-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--space-5);
    text-align: center;
    transition: all 0.2s ease;
}

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

.state-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-1);
}

.state-card span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Content Layouts */
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-10);
}

.content-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}

.sidebar-card h4 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-card ul {
    list-style: none;
}

.sidebar-card li {
    margin-bottom: var(--space-2);
}

.sidebar-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) 0;
    color: var(--text-light);
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-soft);
}

.sidebar-card a:hover {
    color: var(--primary);
}

.content-main {
    min-width: 0;
}

.content-block {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
}

.content-block h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: var(--space-8) 0 var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--border-light);
}

.content-block h2:first-child {
    margin-top: 0;
}

.content-block h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: var(--space-6) 0 var(--space-3);
}

.content-block p {
    margin-bottom: var(--space-4);
    color: var(--text-light);
}

.content-block ul, .content-block ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.content-block li {
    margin-bottom: var(--space-2);
    color: var(--text-light);
}

/* FAQ Section */
.faq-section {
    margin-top: var(--space-10);
}

.faq-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    overflow: hidden;
}

.faq-question {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-soft);
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
}

.faq-answer {
    padding: var(--space-5);
    color: var(--text-light);
    line-height: 1.7;
}

/* Medical Disclaimer */
.disclaimer {
    background: var(--bg-soft);
    border-left: 4px solid var(--warning);
    padding: var(--space-5);
    margin-top: var(--space-8);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.9375rem;
    color: var(--text-light);
}

.disclaimer strong {
    color: var(--text);
}

/* Info Boxes */
.info-box {
    background: var(--primary-soft);
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: var(--space-5);
    margin: var(--space-6) 0;
}

.info-box-success {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.info-box-warning {
    background: #fffbeb;
    border-color: var(--warning);
}

/* Breadcrumbs */
.breadcrumb {
    background: var(--bg-soft);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.875rem;
    color: var(--text-muted);
    list-style: none;
}

.breadcrumb-list a {
    color: var(--text-light);
}

.breadcrumb-list a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--border);
}

/* Footer */
.site-footer {
    background: var(--text);
    color: var(--bg-soft);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: var(--space-10);
    margin-bottom: var(--space-12);
}

.footer-brand .logo-text {
    color: var(--bg-white);
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: var(--space-4);
    font-size: 0.9375rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bg-white);
    margin-bottom: var(--space-4);
}

.footer-column ul {
    list-style: none;
}

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

.footer-column a {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.footer-column a:hover {
    color: var(--bg-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Medical Review Badge */
.medical-review {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-dark);
}

/* Urgency Indicators */
.urgency-low { color: var(--accent); }
.urgency-moderate { color: var(--warning); }
.urgency-high { color: var(--error); }

/* Tables */
.table-container {
    overflow-x: auto;
    margin: var(--space-6) 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.data-table th {
    background: var(--bg-soft);
    padding: var(--space-3) var(--space-4);
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-light);
}

.data-table tr:hover td {
    background: var(--bg-soft);
}

/* Responsive */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        position: static;
        order: 2;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .cta-button {
        width: 100%;
    }
    
    .main-nav {
        display: none;
    }
    
    .section-title {
        font-size: 1.875rem;
    }
    
    .trust-bar-content {
        gap: var(--space-6);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Utility Classes */
.text-center { text-center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none; }
.sr-only { position: absolute; left: -10000px; }
