/* ===== CSS Variables ===== */
/* ADA/WCAG 2.1 AA Compliant Color Contrast */
:root {
    --navy: #0f172a;
    --navy-mid: #1e293b;
    --navy-light: #334155;
    --blue: #2563eb;           /* Darkened for better contrast - 4.5:1 on white */
    --blue-dark: #1d4ed8;
    --blue-light: #3b82f6;
    --cyan: #0891b2;           /* Darkened for ADA compliance */
    --teal: #0d9488;           /* Darkened for ADA compliance */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #94a3b8;
    --gray-400: #64748b;       /* Swapped - now meets 4.5:1 on white */
    --gray-500: #475569;       /* Darker for better contrast - 7:1 on white */
    --gray-600: #334155;       /* Darker for ADA compliance */
    --text: #0f172a;
    --text-muted: #475569;     /* Darkened to meet 4.5:1 contrast */
    --warning: #b45309;        /* Darkened amber for ADA compliance */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --gradient-hero: linear-gradient(180deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ===== Compliance Banner ===== */
.compliance-banner {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 12px 24px;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.compliance-banner p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===== Navigation ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 48px;
    width: auto;
    transition: transform 0.2s ease;
}

.logo:hover img {
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

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

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    background: var(--navy-mid);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* ===== Hero Section ===== */
.hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 120px 0 140px;
    text-align: center;
    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='%23ffffff' 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::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--gray-100), transparent);
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.375rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== Sections ===== */
section {
    padding: 100px 0;
}

section h2 {
    font-size: 2.75rem;
    text-align: center;
    margin-bottom: 16px;
    color: var(--navy);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 60px;
    font-size: 1.125rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Products ===== */
.products {
    background: var(--gray-100);
    position: relative;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.product-card {
    background: var(--white);
    padding: 48px 36px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.product-card:hover::before {
    opacity: 1;
}

.product-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: var(--shadow-sm);
}

.product-card h3 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 16px;
}

.product-description {
    color: var(--gray-500);
    margin-bottom: 28px;
    line-height: 1.7;
    font-size: 0.9375rem;
}

.product-tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

/* ===== Features/Education ===== */
.education {
    background: var(--white);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.education-card {
    padding: 40px;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    background: var(--white);
    transition: all 0.3s ease;
    position: relative;
}

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

.education-card h3 {
    color: var(--navy);
    margin-bottom: 16px;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.education-card h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.education-card p {
    color: var(--gray-500);
    line-height: 1.7;
}

/* ===== About ===== */
.about {
    background: var(--gradient-dark);
    color: var(--white);
    text-align: center;
    position: relative;
}

.about h2 {
    color: var(--white);
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.25rem;
    line-height: 1.8;
    opacity: 0.9;
}

.about-features {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
}

.about-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.about-feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.about-feature span {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===== Contact ===== */
.contact {
    text-align: center;
    background: var(--gray-50);
}

.contact p {
    margin-bottom: 32px;
    color: var(--gray-500);
    font-size: 1.125rem;
}

.social-links {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    padding: 12px 24px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: var(--blue);
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Footer ===== */
.footer {
    background: var(--navy);
    color: var(--white);
    padding: 80px 0 32px;
}

.footer-content {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 80px;
    align-items: start;
    margin-bottom: 60px;
}

.footer-logo {
    height: 64px;
    width: auto;
    opacity: 0.9;
}

.footer-disclaimer {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 24px;
}

.footer-disclaimer h4 {
    margin-bottom: 12px;
    color: var(--warning);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-disclaimer p {
    font-size: 0.875rem;
    opacity: 0.8;
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}

.footer-bottom a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-bottom a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .product-grid,
    .education-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-stats {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links {
        gap: 24px;
    }
    
    .hero {
        padding: 80px 0 100px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .product-grid,
    .education-grid {
        grid-template-columns: 1fr;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .about-features {
        flex-direction: column;
        gap: 24px;
    }
}

/* ===== Education Hub ===== */
.page-hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.page-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.education-hub {
    padding: 80px 0;
}

.education-hub h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 32px;
    text-align: left;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--gray-200);
}

.education-hub h2:not(:first-of-type) {
    margin-top: 60px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.article-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 32px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.article-card .article-tag {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.article-card h3 {
    color: var(--navy);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.article-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-card .read-more {
    color: var(--blue);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ===== Article Content ===== */
.article-content {
    padding: 40px 0 80px;
}

.article-content .container {
    max-width: 800px;
}

.article-header {
    margin-bottom: 48px;
}

.back-link {
    display: inline-block;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 24px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--blue);
}

.article-header .article-tag {
    display: inline-block;
    background: var(--blue);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 2.75rem;
    color: var(--navy);
    margin-bottom: 16px;
    line-height: 1.2;
}

.article-meta {
    color: var(--gray-500);
    font-size: 1.125rem;
}

.article-body h2 {
    font-size: 1.75rem;
    color: var(--navy);
    margin: 48px 0 20px;
    text-align: left;
}

.article-body h3 {
    font-size: 1.25rem;
    color: var(--navy);
    margin: 32px 0 16px;
}

.article-body p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: var(--gray-600);
}

.article-body ul, .article-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
    color: var(--gray-600);
}

.article-body strong {
    color: var(--navy);
}

/* Info/Warning Boxes */
.info-box, .warning-box, .step-box {
    padding: 24px;
    border-radius: 12px;
    margin: 32px 0;
}

.info-box {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.info-box h4 {
    color: var(--navy);
    margin-bottom: 16px;
    font-size: 1rem;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.warning-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.warning-box h4 {
    color: var(--warning);
    margin-bottom: 12px;
}

.warning-box p {
    margin-bottom: 0;
}

.step-box {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--blue);
}

.step-box h3 {
    color: var(--blue);
    margin: 0 0 12px 0;
    font-size: 1.125rem;
}

.step-box ul {
    margin: 0;
}

/* Code Block */
.code-block {
    background: var(--navy);
    color: var(--gray-300);
    padding: 20px 24px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9375rem;
    overflow-x: auto;
    margin: 24px 0;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9375rem;
}

.data-table th, .data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.data-table th {
    background: var(--gray-50);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    color: var(--gray-600);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

/* Article Navigation */
.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--gray-200);
}

.article-nav .btn-outline {
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.article-nav .btn-outline:hover {
    color: var(--navy);
    border-color: var(--navy);
    background: var(--gray-50);
}

/* Active nav state */
.nav-links a.active {
    color: var(--blue);
}

.nav-links a.active::after {
    width: 100%;
}

/* Responsive Education */
@media (max-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .article-nav {
        flex-direction: column;
        gap: 16px;
    }
    
    .article-nav .btn {
        width: 100%;
    }
}

/* ===== Search Bar ===== */
.search-container {
    max-width: 600px;
    margin: 40px auto 32px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 4px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.search-icon {
    padding: 12px 16px;
    font-size: 1.25rem;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 1.0625rem;
    padding: 16px 20px 16px 0;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.search-results.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-result-item {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s ease;
}

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

.search-result-item:hover {
    background: var(--gray-50);
}

.search-result-name {
    font-weight: 600;
    color: var(--navy);
    font-size: 1rem;
    margin-bottom: 4px;
}

.search-result-category {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--blue);
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.search-result-description {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.search-no-results {
    padding: 24px;
    text-align: center;
    color: var(--gray-500);
}

/* Search on light backgrounds */
.education-hub .search-container .search-box {
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.education-hub .search-container .search-box:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.education-hub .search-container .search-box input {
    color: var(--navy);
}

.education-hub .search-container .search-box input::placeholder {
    color: var(--gray-400);
}

/* ===== Dark Mode Support ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #f1f5f9;
        --text-muted: #94a3b8;
        --white: #0f172a;
        --gray-50: #1e293b;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
    }
    
    body {
        background: #0f172a;
        color: #f1f5f9;
    }
    
    .navbar {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: rgba(255,255,255,0.1);
    }
    
    .nav-links a {
        color: #94a3b8;
    }
    
    .nav-links a:hover {
        color: #f1f5f9;
    }
    
    .product-card, .education-card, .article-card, .peptide-card {
        background: #1e293b;
        border-color: #334155;
    }
    
    .product-card h3, .education-card h3, .article-card h3 {
        color: #f1f5f9;
    }
    
    .article-content .container {
        background: #0f172a;
    }
    
    .article-header h1, .article-body h2, .article-body h3 {
        color: #f1f5f9;
    }
    
    .article-body p, .article-body li {
        color: #cbd5e1;
    }
    
    .info-box {
        background: #1e293b;
        border-color: #334155;
    }
    
    .info-box h4 {
        color: #f1f5f9;
    }
    
    .code-block {
        background: #0f172a;
        border: 1px solid #334155;
    }
    
    .data-table th {
        background: #1e293b;
        color: #f1f5f9;
    }
    
    .data-table td {
        color: #cbd5e1;
        border-color: #334155;
    }
    
    .data-table tbody tr:hover {
        background: #1e293b;
    }
    
    .search-input {
        background: #1e293b;
        border-color: #334155;
        color: #f1f5f9;
    }
    
    .search-input::placeholder {
        color: #64748b;
    }
    
    .category-tab {
        background: #1e293b;
        color: #94a3b8;
    }
    
    .products {
        background: #0f172a;
    }
    
    .product-icon {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .product-tag, .article-tag {
        background: #334155;
        color: #94a3b8;
    }
}

/* ===== Enhanced Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.hero {
    animation: fadeInUp 0.8s ease-out;
}

.product-card, .article-card, .peptide-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.product-card:nth-child(1), .article-card:nth-child(1), .peptide-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2), .article-card:nth-child(2), .peptide-card:nth-child(2) { animation-delay: 0.15s; }
.product-card:nth-child(3), .article-card:nth-child(3), .peptide-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4), .article-card:nth-child(4), .peptide-card:nth-child(4) { animation-delay: 0.25s; }
.product-card:nth-child(5), .article-card:nth-child(5), .peptide-card:nth-child(5) { animation-delay: 0.3s; }
.product-card:nth-child(6), .article-card:nth-child(6), .peptide-card:nth-child(6) { animation-delay: 0.35s; }

.btn-primary:hover {
    animation: pulse 0.3s ease-in-out;
}

/* ===== Better Focus States ===== */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

/* ===== Smooth Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ===== Better Selection ===== */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: inherit;
}

/* ===== Loading State ===== */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* ===== Better Mobile Navigation ===== */
@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .navbar, .compliance-banner, .footer, .article-nav {
        display: none;
    }
    
    .article-content {
        padding: 0;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===== ADA Accessibility Improvements ===== */

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--navy);
    color: var(--white);
    padding: 8px 16px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible outlines for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

/* Remove default outlines only when using mouse */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure links have sufficient contrast and are distinguishable */
a {
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover {
    text-decoration: underline;
}

/* High contrast focus for buttons */
.btn:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 3px;
}

/* Ensure form inputs have visible borders */
input, textarea, select {
    border: 2px solid var(--gray-400);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Placeholder text - ADA compliant contrast */
::placeholder {
    color: var(--gray-500);
    opacity: 1;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ensure sufficient line height for readability */
p, li {
    line-height: 1.7;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Ensure images have alt text indicator when missing */
img:not([alt]) {
    outline: 3px solid red;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --gray-400: #374151;
        --gray-500: #1f2937;
        --text-muted: #374151;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ===== Request Info Button ===== */
.request-cta {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.request-cta-text {
    color: white;
}

.request-cta-text h4 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.request-cta-text p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0;
}

.request-cta .btn-request {
    background: white;
    color: #059669;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.request-cta .btn-request:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@media (max-width: 600px) {
    .request-cta {
        flex-direction: column;
        text-align: center;
    }
    
    .request-cta .btn-request {
        width: 100%;
    }
}

/* ===== 🎉 FUN ANIMATIONS ===== */

/* Animated gradient background for hero */
.hero {
    background: linear-gradient(-45deg, #0f172a, #1e3a5f, #0f172a, #1a365d, #0f172a);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

/* Pulse glow */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6), 0 0 60px rgba(59, 130, 246, 0.3); }
}

/* Hero badge floating */
.hero-badge {
    animation: float 4s ease-in-out infinite;
}

/* Stats counter animation */
.stat-value {
    display: inline-block;
    animation: pulseGlow 3s ease-in-out infinite;
    border-radius: 8px;
    padding: 4px 8px;
}

/* Product/Topic cards - 3D hover effect */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.product-card:hover {
    transform: translateY(-12px) rotateX(5deg) rotateY(-2deg);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 50px rgba(59, 130, 246, 0.15);
}

.product-icon {
    transition: all 0.4s ease;
}

.product-card:hover .product-icon {
    transform: scale(1.2) rotate(10deg);
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1.2) rotate(10deg); }
    50% { transform: scale(1.3) rotate(-5deg); }
}

/* Education cards wave effect */
.education-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.education-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        transparent 40%,
        rgba(59, 130, 246, 0.1) 50%,
        transparent 60%,
        transparent
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.education-card:hover::after {
    transform: rotate(45deg) translateX(100%);
}

.education-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--blue);
}

/* Button animations */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.5);
}

/* Logo bounce on hover */
.logo img {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover img {
    transform: scale(1.1) rotate(-5deg);
}

/* Nav links underline animation */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 120%;
}

/* Search box glow effect */
.search-box {
    transition: all 0.4s ease;
}

.search-box:focus-within {
    transform: scale(1.02);
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.3),
        0 0 60px rgba(59, 130, 246, 0.1);
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.stagger-children.active > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.active > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* Floating particles background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    animation: particleFloat 20s infinite linear;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* DNA Helix decoration */
.dna-helix {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 300px;
    opacity: 0.15;
    pointer-events: none;
}

/* Morphing blob background */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: blobMorph 15s ease-in-out infinite;
    filter: blur(40px);
    pointer-events: none;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg); }
    25% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    50% { border-radius: 50% 60% 30% 60% / 70% 40% 50% 30%; transform: rotate(180deg); }
    75% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

/* Text shimmer effect for hero */
.hero h1 {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #60a5fa 25%,
        #ffffff 50%,
        #06b6d4 75%,
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* About features icons spin */
.about-feature-icon {
    transition: all 0.4s ease;
}

.about-feature:hover .about-feature-icon {
    transform: rotateY(360deg);
    background: rgba(59, 130, 246, 0.3);
}

/* Social links bounce */
.social-links a {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.social-links a:hover {
    transform: translateY(-8px) scale(1.1);
}

/* Footer glow */
.footer {
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

/* Request CTA pulse */
.request-cta {
    animation: ctaPulse 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.request-cta:hover {
    transform: scale(1.02);
    animation: none;
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 4px 40px rgba(16, 185, 129, 0.4); }
}

/* Article card hover lift */
.article-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.article-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Loading animation for page */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom cursor trail effect - add via JS */
.cursor-trail {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
    mix-blend-mode: screen;
}

/* Glitch effect for fun (on logo hover) */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.logo:active img {
    animation: glitch 0.3s ease infinite;
}

/* Typing effect for hero subtitle */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Counter animation */
.counter {
    display: inline-block;
}

/* Confetti burst on form submit - handled by JS */
