/* =============================================
   MedRAG Clinical Intelligence - Pharma E-Commerce Theme
   Clinical Teal | Sterile White | Syringe Red
   Medicine & Syringe Visual Identity
   ============================================= */

:root {
    --primary: #007799;
    --primary-dark: #005c73;
    --primary-darker: #004459;
    --primary-light: #e6f4f8;
    --primary-glow: rgba(0, 119, 153, 0.12);
    --accent: #ff6b6b;
    --accent-dark: #e05555;
    --accent-light: #fff0f0;
    --secondary: #4a90e2;
    --secondary-light: #e8f0fd;
    --dark: #1a2332;
    --dark-2: #2d3748;
    --gray: #5f7a8c;
    --gray-light: #eef2f7;
    --gray-lighter: #f7f9fc;
    --border: #dce5ed;
    --border-light: #eef2f6;
    --white: #ffffff;
    --success: #28a745;
    --warning: #e8a317;
    --shadow: 0 2px 12px rgba(26, 35, 50, 0.08);
    --shadow-lg: 0 8px 30px rgba(26, 35, 50, 0.12);
    --shadow-xl: 0 12px 48px rgba(26, 35, 50, 0.18);
    --shadow-primary: 0 4px 20px rgba(0, 119, 153, 0.25);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-width: 1200px;
    --header-height: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--primary); color: white; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ============= NAVIGATION ============= */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 3px solid var(--primary);
    transition: var(--transition);
    height: var(--header-height);
}
.navbar .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; border-radius: var(--radius-pill);
    position: relative;
}
.brand-icon::after {
    content: '';
    position: absolute; top: 50%; right: -6px;
    width: 2px; height: 14px;
    background: var(--accent);
    border-radius: 2px;
    transform: translateY(-50%);
    box-shadow: 0 0 4px var(--accent);
}
.brand-text { font-size: 22px; font-weight: 700; color: var(--dark); }
.brand-accent { color: var(--primary); }
.brand-badge {
    padding: 3px 10px; background: var(--primary-light);
    color: var(--primary); border-radius: var(--radius-pill);
    font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--gray); font-size: 14px;
    font-weight: 500; transition: var(--transition);
    position: relative;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--primary);
    transition: var(--transition);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }
.btn-nav {
    padding: 10px 24px; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important; border-radius: var(--radius-pill); font-weight: 600; font-size: 13px;
    box-shadow: var(--shadow-primary);
}
.btn-nav::after { display: none !important; }
.btn-nav:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl) !important; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: var(--transition); }

/* ============= HERO ============= */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 40%, var(--accent-light) 100%);
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 119, 153, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
    pointer-events: none;
}
.hero-pulse {
    position: absolute; top: -20%; right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,119,153,0.05) 0%, transparent 60%);
    border-radius: 50%; animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 1; }
}
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.hero-badge-group { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-badge {
    padding: 6px 16px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600;
    border: 1px solid transparent;
}
.hero-badge.pharma { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.hero-badge.clinical { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.hero-badge.verified { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.hero h1 {
    font-size: 44px; font-weight: 800; line-height: 1.15;
    margin-bottom: 20px; color: var(--dark);
}
.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero h1 .highlight-red {
    background: linear-gradient(135deg, var(--accent), #e05555);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 16px; color: var(--gray); line-height: 1.7;
    margin-bottom: 32px; max-width: 560px;
}
.hero-cta { display: flex; gap: 14px; margin-bottom: 48px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 28px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600;
    text-decoration: none; transition: var(--transition); cursor: pointer; border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.btn-secondary {
    background: var(--white); color: var(--primary);
    border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white; box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 26px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--gray); font-weight: 500; }

/* Clinical Card - Syringe Themed */
.clinical-card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl); border: 1px solid var(--border);
    overflow: hidden; position: relative;
}
.clinical-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: var(--dark); color: white;
}
.card-pulse {
    width: 8px; height: 8px; background: var(--success);
    border-radius: 50%; animation: cardPulse 2s infinite;
}
@keyframes cardPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(40, 167, 69, 0); }
}
.card-header span { font-size: 12px; font-weight: 600; }
.card-status { padding: 2px 10px; background: var(--success); border-radius: var(--radius-pill); font-size: 10px; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card-step { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-light); flex-shrink: 0; position: relative; }
.step-dot.active { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.step-info { flex: 1; display: flex; flex-direction: column; }
.step-label { font-size: 13px; font-weight: 600; color: var(--dark); }
.step-desc { font-size: 11px; color: var(--gray); }
.step-time { font-size: 11px; color: var(--secondary); font-weight: 600; font-family: var(--font-mono); }
.card-footer {
    padding: 12px 20px; background: var(--gray-lighter);
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--gray); font-family: var(--font-mono);
}

/* ============= PHARMA PRODUCT GRID ============= */
.pharma-section { background: var(--white); }
.pharma-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.pharma-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); overflow: hidden;
    transition: var(--transition); position: relative;
}
.pharma-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}
.pharma-card-image {
    height: 160px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), #ffffff);
    padding: 20px; position: relative;
}
.pharma-card-image .pill-icon {
    width: 60px; height: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-pill); position: relative;
    box-shadow: var(--shadow-primary);
    display: flex; align-items: center; justify-content: center;
}
.pharma-card-image .pill-icon::before,
.pharma-card-image .pill-icon::after {
    content: ''; position: absolute; top: 50%; transform: translateY(-50%);
    width: 20px; height: 2px; background: rgba(255,255,255,0.3);
}
.pharma-card-image .pill-icon::before { left: 6px; }
.pharma-card-image .pill-icon::after { right: 6px; }
.pharma-card-image .syringe-icon {
    position: absolute; right: 20px; top: 12px;
    width: 24px; height: 48px;
    display: flex; flex-direction: column; align-items: center;
}
.pharma-card-image .syringe-needle {
    width: 2px; height: 20px; background: var(--accent);
    border-radius: 1px; position: relative;
    box-shadow: 0 0 4px rgba(255, 107, 107, 0.4);
}
.pharma-card-image .syringe-needle::after {
    content: ''; position: absolute; bottom: -3px; left: -2px;
    width: 6px; height: 6px; background: var(--accent);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.pharma-card-image .syringe-body {
    width: 10px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 2px; background: var(--white);
    position: relative;
}
.pharma-card-image .syringe-body::before {
    content: ''; position: absolute; top: 2px; left: 2px;
    right: 2px; bottom: 2px;
    background: var(--primary-light);
    border-radius: 1px;
}
.pharma-card-image .syringe-plunger {
    width: 4px; height: 8px; background: var(--gray);
    border-radius: 1px;
}
.pharma-card-badge {
    position: absolute; top: 8px; left: 8px;
    padding: 3px 10px; border-radius: var(--radius-pill);
    font-size: 10px; font-weight: 700;
}
.pharma-card-badge.prescription {
    background: var(--accent-light); color: var(--accent);
}
.pharma-card-badge.otc {
    background: var(--primary-light); color: var(--primary);
}
.pharma-card-body { padding: 16px 18px 18px; }
.pharma-card-body h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: var(--dark); }
.pharma-card-body .pharma-brand {
    font-size: 12px; color: var(--gray); margin-bottom: 8px;
}
.pharma-card-body .pharma-desc {
    font-size: 12px; color: var(--gray); line-height: 1.5;
    margin-bottom: 12px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pharma-card-body .pharma-meta {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px; border-top: 1px solid var(--border-light);
}
.pharma-card-body .pharma-price {
    font-size: 20px; font-weight: 800; color: var(--primary);
}
.pharma-card-body .pharma-unit {
    font-size: 11px; color: var(--gray);
}
.pharma-card-body .pharma-stock {
    font-size: 11px; font-weight: 600;
    padding: 3px 10px; border-radius: var(--radius-pill);
}
.pharma-card-body .pharma-stock.in-stock {
    background: #e8f5e9; color: #2e7d32;
}
.pharma-card-body .pharma-stock.low-stock {
    background: var(--accent-light); color: var(--accent);
    animation: pulseWarning 2s infinite;
}
.pharma-card-body .pharma-stock.out-of-stock {
    background: #f5f5f5; color: #999;
}
@keyframes pulseWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.btn-pharma-card {
    display: block; width: 100%; margin-top: 12px;
    padding: 10px; background: var(--primary);
    color: white; border: none; border-radius: var(--radius-pill);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: var(--transition);
}
.btn-pharma-card:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-primary); }

/* ============= MEDICATION CATEGORIES ============= */
.categories { background: var(--gray-lighter); }
.categories-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.category-card {
    padding: 24px 16px; background: var(--white);
    border-radius: var(--radius); border: 1px solid var(--border);
    text-align: center; transition: var(--transition); cursor: pointer;
}
.category-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.category-icon { font-size: 28px; margin-bottom: 10px; }
.category-card h4 { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 4px; }
.category-card span { font-size: 11px; color: var(--gray); }

/* ============= SECTIONS ============= */
section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-badge {
    display: inline-block; padding: 5px 16px;
    background: var(--primary-light); color: var(--primary);
    border-radius: var(--radius-pill); font-size: 12px; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 16px;
}
.section-title {
    font-size: 34px; font-weight: 800; color: var(--dark);
    margin-bottom: 12px; line-height: 1.2;
}
.section-subtitle {
    font-size: 16px; color: var(--gray);
    max-width: 600px; margin: 0 auto;
}

/* ============= FEATURES ============= */
.features { background: var(--white); }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
    padding: 32px 24px; background: var(--gray-lighter);
    border-radius: var(--radius); border: 1px solid var(--border-light);
    transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    border-color: var(--primary); background: var(--white);
}
.feature-number {
    position: absolute; top: 12px; right: 16px;
    font-size: 48px; font-weight: 800; color: var(--primary-glow);
    line-height: 1;
}
.feature-icon {
    width: 48px; height: 48px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.feature-icon.retrieval { background: var(--primary-light); color: var(--primary); }
.feature-icon.analysis { background: var(--secondary-light); color: var(--secondary); }
.feature-icon.safety { background: var(--accent-light); color: var(--accent); }
.feature-icon.generation { background: #f0e6ff; color: #7c3aed; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--gray); line-height: 1.6; margin-bottom: 14px; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-tags span {
    padding: 4px 12px; background: var(--white); color: var(--gray);
    border-radius: var(--radius-pill); font-size: 10px; font-weight: 600; border: 1px solid var(--border);
}

/* ============= SPECIALTIES ============= */
.specialties { background: var(--gray-lighter); }
.specialties-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.specialty-card {
    padding: 28px 24px; background: var(--white);
    border-radius: var(--radius); border: 1px solid var(--border);
    transition: var(--transition);
}
.specialty-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.specialty-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px; font-size: 16px; font-weight: 800;
    background: var(--primary-light); color: var(--primary);
}
.specialty-card[data-specialty="orthopedic"] .specialty-icon { background: var(--secondary-light); color: var(--secondary); }
.specialty-card[data-specialty="cardiothoracic"] .specialty-icon { background: var(--accent-light); color: var(--accent); }
.specialty-card[data-specialty="neurosurgery"] .specialty-icon { background: #f0e6ff; color: #7c3aed; }
.specialty-card[data-specialty="emergency"] .specialty-icon { background: #fff3e0; color: #e65100; }
.specialty-card[data-specialty="vascular"] .specialty-icon { background: #fce4ec; color: #c62828; }
.specialty-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.specialty-desc { font-size: 13px; color: var(--gray); line-height: 1.5; margin-bottom: 14px; }
.specialty-procedures { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.specialty-procedures span {
    padding: 4px 12px; background: var(--gray-lighter);
    color: var(--dark); border-radius: var(--radius-pill); font-size: 11px; font-weight: 500;
}
.specialty-evidence { font-size: 11px; color: var(--primary); font-weight: 600; }

/* ============= API SECTION ============= */
.api-section { background: var(--white); }
.api-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.api-endpoint {
    border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 16px; overflow: hidden; transition: var(--transition);
}
.api-endpoint:hover { border-color: var(--primary); }
.endpoint-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px; background: var(--gray-lighter);
    border-bottom: 1px solid var(--border);
}
.method {
    padding: 3px 10px; border-radius: var(--radius-sm); font-size: 11px;
    font-weight: 700; font-family: var(--font-mono); text-transform: uppercase;
}
.method.get { background: var(--primary-light); color: var(--primary); }
.method.post { background: var(--secondary-light); color: var(--secondary); }
.path { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--dark); }
.endpoint-body { padding: 20px; }
.endpoint-body p { font-size: 13px; color: var(--gray); margin-bottom: 14px; }
.code-block {
    background: var(--dark); color: #e8f0fe; padding: 16px 20px;
    border-radius: var(--radius-sm); font-family: var(--font-mono);
    font-size: 12px; line-height: 1.6; overflow-x: auto; margin-top: 12px;
    border-left: 3px solid var(--primary);
}
.code-block.small { font-size: 11px; padding: 12px 16px; }
.params { margin: 12px 0; }
.params h4 { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--dark); }
.param-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border-light); }
.param-row code { font-family: var(--font-mono); font-size: 12px; color: var(--dark); font-weight: 600; min-width: 120px; }
.param-row .required { padding: 2px 10px; background: var(--accent-light); color: var(--accent); border-radius: var(--radius-pill); font-size: 10px; font-weight: 600; }
.param-row .optional { padding: 2px 10px; background: var(--gray-lighter); color: var(--gray); border-radius: var(--radius-pill); font-size: 10px; font-weight: 600; }
.param-row span:last-child { color: var(--gray); }

/* API Sidebar */
.api-sidebar { display: flex; flex-direction: column; gap: 16px; }
.sidebar-card {
    padding: 20px; background: var(--gray-lighter);
    border-radius: var(--radius); border: 1px solid var(--border);
}
.sidebar-card h4 {
    font-size: 14px; font-weight: 700; margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
}
.sidebar-card h4::before {
    content: ''; width: 4px; height: 16px;
    background: var(--primary); border-radius: 2px;
}
.sidebar-card p { font-size: 13px; color: var(--gray); }
.note { font-size: 12px !important; color: var(--primary) !important; margin-top: 8px !important; font-weight: 600; }
.rate-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border-light); }
.rate-value { font-weight: 600; color: var(--primary); }
.sdk-item { display: flex; flex-direction: column; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.sdk-item span { font-size: 12px; font-weight: 600; color: var(--dark); }
.sdk-item code { font-family: var(--font-mono); font-size: 11px; color: var(--gray); margin-top: 2px; }
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card ul li { padding: 6px 0; font-size: 13px; color: var(--gray); position: relative; padding-left: 16px; }
.sidebar-card ul li::before { content: '›'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* ============= EVIDENCE SECTION ============= */
.evidence-section { background: var(--gray-lighter); }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.evidence-card {
    padding: 28px 24px; background: var(--white);
    border-radius: var(--radius); border: 1px solid var(--border);
    transition: var(--transition); position: relative; overflow: hidden;
}
.evidence-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 4px; height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    opacity: 0; transition: var(--transition);
}
.evidence-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.evidence-card:hover::before { opacity: 1; }
.evidence-icon { margin-bottom: 14px; color: var(--primary); }
.evidence-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.evidence-card p { font-size: 13px; color: var(--gray); line-height: 1.6; margin-bottom: 14px; }
.evidence-stat { display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-light); }
.evidence-stat .stat-label { font-size: 12px; color: var(--gray); }
.evidence-stat .stat-value { font-size: 18px; font-weight: 800; color: var(--primary); font-family: var(--font-mono); }

/* ============= CHATBOT ============= */
.chatbot-section { background: var(--white); }
.chat-container {
    max-width: 760px; margin: 0 auto;
    background: var(--white); border-radius: var(--radius-lg);
    border: 1px solid var(--border); overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.chat-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; background: var(--dark); color: white;
    position: relative;
}
.chat-header::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    position: relative;
}
.chat-avatar::after {
    content: ''; position: absolute; top: 50%; right: -4px;
    width: 2px; height: 12px;
    background: var(--accent); border-radius: 1px;
    transform: translateY(-50%);
}
.chat-header-info h3 { font-size: 15px; font-weight: 600; }
.chat-meta { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.chat-specialty-label { font-size: 11px; padding: 3px 12px; background: rgba(255,255,255,0.12); border-radius: var(--radius-pill); }
.chat-status { font-size: 11px; display: flex; align-items: center; gap: 6px; }
.status-dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; animation: cardPulse 2s infinite; }
.chat-mode-badges { display: flex; gap: 6px; }
.mode-badge { padding: 3px 10px; border-radius: var(--radius-pill); font-size: 9px; font-weight: 700; letter-spacing: 0.5px; }
.mode-badge.clinical { background: var(--success); color: white; }
.mode-badge.api { background: var(--secondary); color: white; }
.mode-badge.demo { background: var(--warning); color: var(--dark); }

.chat-messages {
    height: 420px; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 14px;
    background: var(--gray-lighter);
}
.message { display: flex; max-width: 88%; }
.message.user { margin-left: auto; }
.message.bot { margin-right: auto; }
.message-content {
    padding: 14px 18px; border-radius: 14px;
    font-size: 14px; line-height: 1.6;
}
.message.user .message-content {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; border-bottom-right-radius: 4px;
}
.message.bot .message-content {
    background: var(--white); color: var(--dark);
    border: 1px solid var(--border); border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-left: 3px solid var(--primary);
}
.message-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.msg-role { font-size: 11px; font-weight: 700; color: var(--primary); }
.msg-time { font-size: 10px; color: var(--gray); }

.chat-input-area { padding: 16px 20px; border-top: 1px solid var(--border); background: var(--white); }
.chat-input-row { display: flex; gap: 10px; align-items: center; }
.chat-specialty-selector { flex-shrink: 0; }
.chat-specialty-selector select {
    padding: 10px 14px; border: 1px solid var(--border);
    border-radius: var(--radius-pill); font-size: 12px; font-weight: 500;
    font-family: var(--font); background: var(--gray-lighter);
    cursor: pointer; outline: none; min-width: 130px;
}
.chat-specialty-selector select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.chat-input-row input {
    flex: 1; padding: 12px 20px;
    border: 1px solid var(--border); border-radius: var(--radius-pill);
    font-size: 14px; font-family: var(--font); outline: none;
    transition: var(--transition);
}
.chat-input-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.btn-send {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white; border: none; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition); flex-shrink: 0;
    box-shadow: var(--shadow-primary);
}
.btn-send:hover { transform: scale(1.05); box-shadow: var(--shadow-xl); }

.chat-suggestions {
    display: flex; align-items: center; gap: 8px; margin-top: 12px;
    padding-top: 12px; border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.suggestion-label { font-size: 11px; color: var(--gray); font-weight: 500; }
.suggestion-chip {
    padding: 6px 16px; background: var(--gray-lighter);
    border: 1px solid var(--border); border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 500; cursor: pointer;
    transition: var(--transition); color: var(--gray);
    white-space: nowrap;
}
.suggestion-chip:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ============= PHARMA BANNER / PROMO ============= */
.pharma-banner {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-darker) 100%);
    padding: 60px 0; color: white; text-align: center;
    position: relative; overflow: hidden;
}
.pharma-banner::before {
    content: '';
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background:
        radial-gradient(circle at 30% 40%, rgba(0, 119, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(255, 107, 107, 0.1) 0%, transparent 50%);
    animation: bannerDrift 15s ease-in-out infinite;
}
@keyframes bannerDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(2%, -2%); }
}
.pharma-banner .container { position: relative; z-index: 1; }
.pharma-banner h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.pharma-banner p { font-size: 15px; opacity: 0.8; margin-bottom: 24px; max-width: 500px; margin-left: auto; margin-right: auto; }
.pharma-banner .btn { border: 2px solid rgba(255,255,255,0.3); color: white; }
.pharma-banner .btn:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* ============= FOOTER ============= */
.footer {
    background: var(--dark); color: white; padding: 60px 0 0;
}
.footer-content { display: grid; grid-template-columns: 1.5fr 1.5fr 1.5fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.footer-brand svg { color: var(--primary); }
.footer-brand .accent { color: var(--primary); }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.5); max-width: 300px; margin-bottom: 16px; }
.footer-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-badge { padding: 4px 12px; background: rgba(255,255,255,0.08); border-radius: var(--radius-pill); font-size: 10px; font-weight: 600; }
.footer-links-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 14px; color: rgba(255,255,255,0.7); }
.footer-col a { display: block; color: rgba(255,255,255,0.5); text-decoration: none; font-size: 13px; padding: 4px 0; transition: var(--transition); }
.footer-col a:hover { color: white; }
.footer-disclaimer-section h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: rgba(255,255,255,0.7); }
.footer-disclaimer-section p { font-size: 12px; color: rgba(255,255,255,0.4); line-height: 1.7; }
.footer-compliance { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.footer-compliance span { font-size: 10px; padding: 4px 12px; background: rgba(255,255,255,0.06); border-radius: var(--radius-pill); color: rgba(255,255,255,0.4); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; font-size: 12px; color: rgba(255,255,255,0.3); }
.footer-version { display: flex; gap: 12px; }
.footer-version span { font-family: var(--font-mono); font-size: 10px; }

/* ============= RESPONSIVE ============= */
@media (max-width: 1024px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin: 0 auto 32px; }
    .hero-cta { justify-content: center; }
    .hero-stats { justify-content: center; }
    .pharma-grid { grid-template-columns: repeat(3, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .evidence-grid { grid-template-columns: repeat(2, 1fr); }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .api-layout { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 768px) {
    .nav-links {
        display: none; position: absolute; top: var(--header-height); left: 0; right: 0;
        background: white; flex-direction: column; padding: 20px;
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    }
    .nav-links.active { display: flex; }
    .hamburger { display: flex; }
    .hero h1 { font-size: 30px; }
    .pharma-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
    .specialties-grid { grid-template-columns: 1fr 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
    .evidence-grid { grid-template-columns: 1fr; }
    .footer-links-group { grid-template-columns: repeat(2, 1fr); }
    .chat-messages { height: 350px; }
    .chat-suggestions { overflow-x: auto; flex-wrap: nowrap; }
    .hero-stats { gap: 20px; }
    .section-title { font-size: 26px; }
}
@media (max-width: 480px) {
    .pharma-grid { grid-template-columns: 1fr; }
    .specialties-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; }
    section { padding: 60px 0; }
    .footer-version { flex-direction: column; gap: 4px; }
}

/* ============= UTILITIES ============= */
.typing-indicator { display: flex; gap: 5px; padding: 8px 0; }
.typing-indicator span { width: 8px; height: 8px; background: var(--gray); border-radius: 50%; animation: typing 1.4s infinite; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 60%, 100% { opacity: 0.2; transform: scale(1); }
    30% { opacity: 1; transform: scale(1.3); }
}

/* Syringe animation for loading states */
.syringe-loader {
    display: flex; align-items: center; gap: 6px; padding: 4px 0;
}
.syringe-loader .bar {
    width: 3px; height: 20px; background: var(--primary);
    border-radius: 2px; animation: syringeBar 1s ease-in-out infinite;
}
.syringe-loader .bar:nth-child(2) { animation-delay: 0.15s; height: 16px; }
.syringe-loader .bar:nth-child(3) { animation-delay: 0.3s; height: 24px; }
.syringe-loader .bar:nth-child(4) { animation-delay: 0.45s; height: 12px; }
.syringe-loader .bar:nth-child(5) { animation-delay: 0.6s; height: 20px; }
@keyframes syringeBar {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* Clinical data badge */
.data-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 14px; border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 600;
}
.data-badge.teal { background: var(--primary-light); color: var(--primary); }
.data-badge.red { background: var(--accent-light); color: var(--accent); }
.data-badge.blue { background: var(--secondary-light); color: var(--secondary); }

/* ============= DISEASE SELECTOR ============= */
.disease-selector {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
}
.disease-selector-header {
    margin-bottom: 16px;
}
.disease-selector-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}
.disease-selector-header p {
    font-size: 12px;
    color: var(--gray);
}
.disease-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}
.disease-grid::-webkit-scrollbar {
    width: 4px;
}
.disease-grid::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}
.disease-card {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    background: var(--white);
}
.disease-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.disease-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: var(--shadow-primary);
}
.disease-card.general {
    border-style: dashed;
    border-color: var(--gray);
}
.disease-card.general:hover,
.disease-card.general.selected {
    border-color: var(--primary);
    border-style: solid;
}
.disease-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}
.disease-card-doctor {
    font-size: 11px;
    color: var(--gray);
}
.disease-card-specialty {
    font-size: 10px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 2px;
}

/* ============= LANGUAGE SELECTOR ============= */
.language-selector select {
    padding: 8px 32px 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f7a8c' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: var(--transition);
}
.language-selector select:hover {
    border-color: var(--primary);
}
.language-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============= CHAT CONTROLS ============= */
.chat-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-doctor-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    display: none;
}
.chat-doctor-name.visible {
    display: inline-block;
}

/* ============= CHAT HEADER UPDATED ============= */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    border-radius: var(--radius) var(--radius) 0 0;
}
.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
}

/* ============= MODE BADGES ============= */
.mode-badge {
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.mode-badge.clinical {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}
.mode-badge.api {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    display: none;
}

/* ============= MESSAGE STYLES ============= */
.message {
    margin-bottom: 16px;
    animation: messageSlideIn 0.3s ease-out;
}
@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.message.user {
    display: flex;
    justify-content: flex-end;
}
.message.user .message-content {
    background: var(--primary);
    color: white;
    border-radius: var(--radius) var(--radius) 4px var(--radius);
    max-width: 80%;
}
.message.bot .message-content {
    background: var(--gray-lighter);
    color: var(--dark);
    border-radius: var(--radius) var(--radius) var(--radius) 4px;
    max-width: 85%;
}
.message-content {
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.msg-role {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.msg-time {
    font-size: 10px;
    color: var(--gray);
}

/* ============= TYPING INDICATOR ============= */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}
.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
