/* ========================================
    CSS VARIABLES (Design Tokens) - UPDATED
    ======================================== */
:root {
    /* Primary Colors - Personality Theme */
    --primary-color: #0e0e47;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #645a5a;
    --secondary-dark: #a88d99;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;

    /* Neutral Colors */
    --dark: #1f2937;
    --dark-2: #374151;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --light: #f8fafc;
    --white: #ffffff;

    /* Semantic Colors */
    --color-success: var(--success-color);
    --color-warning: var(--warning-color);
    --color-danger: var(--danger-color);
    --color-error: var(--danger-color);
    --color-info: var(--info-color);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 2rem;

    /* 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;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    --border-radius: 0.75rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ========================================
    RESET & BASE STYLES
    ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--gray-800);
    background: linear-gradient(135deg, var(--gray-50) 0%, #f0f9ff 50%, #faf5ff 100%);
    min-height: 100vh;
}

/* ========================================
    LAYOUT & CONTAINERS
    ======================================== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container { padding: 0 var(--space-6); }
}

@media (min-width: 1024px) {
    .container { padding: 0 var(--space-8); }
}

/* ========================================
    PERSONALITY ASSESSMENT HEADER
    ======================================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo Section */
.logo-section {
    flex-shrink: 0;
    margin-left: -65px;;
}

.logo-link {
    text-decoration: none;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-primary {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
}

.logo-secondary {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: var(--white);
}

.nav-link i:first-child {
    width: 16px;
    text-align: center;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    z-index: var(--z-dropdown);
    border: 1px solid var(--gray-200);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    font-weight: 500;
}

.dropdown-item:hover {
    background: var(--gray-50);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--space-2) 0;
}

/* User Menu */
.user-menu .nav-link {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
}

.user-avatar i {
    color: var(--primary-color);
}

/* Header CTA */
/* --- Replicating Original CTA Container (Now nav-action-container) --- */
/* ==================================================================
   UNIQUE & ADVANCED "TAKE TEST" BUTTON (Green)
   ================================================================== */

.primary-cta-button {
    /* Layout & Sizing */
    display: inline-flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
    padding: 10px 18px;

    /* Font & Text */
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    
    /* * --- Advanced Style ---
     * Using a modern green, a gradient, and a matching shadow.
     */
    color: #ffffff;
    /* A subtle top-to-bottom gradient */
    background: linear-gradient(180deg, #34c759, #28a745); 
    border: 1px solid #28a745; /* Border matches the darker green */
    border-radius: 8px; /* Softer, more modern corners */
    /* A soft shadow using the button's own color */
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    
    /* Animation */
    transition: all 0.2s ease-in-out;
}

.primary-cta-button:hover,
.primary-cta-button:focus {
    color: #ffffff;
    /* Darken the gradient on hover */
    background: linear-gradient(180deg, #30b852, #218838);
    border-color: #218838;
    
    /* "Lift" effect */
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.primary-cta-button:active {
    /* "Press" effect */
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
.header-cta {
    margin-left: var(--space-4);
}

.cta-button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: var(--transition-base);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition-base);
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: var(--z-modal);
    transform: translateX(-100%);
    transition: var(--transition-base);
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-content {
    height: 100%;
    padding: var(--space-4);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: var(--space-4);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    color: var(--dark);
}

.mobile-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
}

.mobile-nav-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition-base);
}

.mobile-nav-item:hover,
.mobile-nav-item.highlight {
    background: var(--gray-50);
}

.mobile-nav-item.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.mobile-nav-divider {
    height: 1px;
    background: var(--gray-200);
    margin: var(--space-4) 0;
}

/* ========================================
    BUTTON COMPONENTS
    ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: var(--font-size-base);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}
/* ========================================
   HERO SECTION LAYOUT (The Fix)
   ======================================== */

/* 1. The Grid Container */
.hero-grid {
    display: grid;
    /* MOBILE DEFAULT: 1 Column (This fixes your issue) */
    grid-template-columns: 1fr; 
    gap: 40px;
    align-items: center;
    position: relative;
}

/* DESKTOP: Switch to 2 Columns only when screen is wide */
@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

/* 2. Visual Container (Right side wrapper) */
.hero-visual {
    position: relative;
    /* Add padding to prevent floating badge from getting cut off on mobile */
    padding: 10px; 
}

/* 3. The Main Card Styling */
.hero-card {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid #E2E8F0;
    position: relative;
    z-index: 2;
}

/* Card Header */
.hero-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.hero-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4F7CFF, #3461E0);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0; /* Prevents icon from squishing */
    color: white;
}

.hero-card-title {
    font-size: 24px;
    font-weight: 700;
    color: #1A2332;
    margin-bottom: 4px;
    line-height: 1.2;
}

.hero-card-subtitle {
    font-size: 14px;
    color: #718096;
    line-height: 1.4;
}

/* Skill Bars */
.skill-group {
    margin-bottom: 20px;
}

.skill-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.skill-name {
    color: #4A5568;
    font-weight: 500;
}

.skill-track {
    height: 8px;
    background: #EDF2F7;
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar {
    height: 100%;
    border-radius: 10px;
}

/* Skill Colors */
.text-blue { color: #4F7CFF; font-weight: 700; }
.bg-blue { background: linear-gradient(90deg, #4F7CFF, #3461E0); }

.text-green { color: #48BB78; font-weight: 700; }
.bg-green { background: linear-gradient(90deg, #48BB78, #38A169); }

.text-purple { color: #9F7AEA; font-weight: 700; }
.bg-purple { background: linear-gradient(90deg, #9F7AEA, #805AD5); }

/* Card Footer */
.hero-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: #F0FFF4;
    border-radius: 12px;
    margin-top: 24px;
}

.footer-icon {
    width: 32px;
    height: 32px;
    background: #48BB78;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.footer-text {
    font-size: 18px;
    font-weight: 700;
    color: #22543D;
}

.footer-text span {
    font-weight: 500;
}

/* 4. Floating Stats Badge */
.stats-badge {
    position: absolute;
    top: -20px;
    right: -20px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #E2E8F0;
    z-index: 3;
}

.stats-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-emoji {
    font-size: 24px;
}

.stats-number {
    font-size: 24px;
    font-weight: 800;
    color: #1A2332;
    line-height: 1;
}

.stats-label {
    font-size: 12px;
    color: #718096;
}

/* Mobile Adjustments for the Cards */
@media (max-width: 640px) {
    .hero-card {
        padding: 20px;
    }
    
    .hero-card-title {
        font-size: 20px;
    }
    
    /* Adjust floating badge position on mobile */
    .stats-badge {
        position: relative;
        top: auto;
        right: auto;
        margin-top: -20px;
        margin-left: auto;
        margin-right: auto;
        width: fit-content;
        display: block;
        text-align: center;
    }
}

/* ========================================
    HERO SECTION
    ======================================== */
.hero-section {
    padding: 80px 0 80px;
    background: linear-gradient(135deg, #f8faff 0%, #ffffff 50%, #fdf4ff 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--gray-100);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-8);
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    color: var(--dark);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--gray-600);
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--success-color);
    font-weight: 500;
}

/* ========================================
    ENHANCED HERO SECTION STYLES (for new HTML structure)
    ======================================== */

.hero-grid {
    display: grid;
    /* Default for mobile: Single column */
    grid-template-columns: 1fr;
    gap: var(--space-10);
    align-items: center;
}

/* Tablet and Desktop: Two columns */
@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
}

/* Hero Visual (Right Column Container) */
.hero-visual {
    position: relative;
    /* Added padding to prevent the popover/badge from being cut off on smaller screens */
    padding: var(--space-8); 
}

/* Main Career Match Card */
.hero-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    transition: var(--transition-base);
    transform: translateY(0);
}

.hero-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.card-icon-wrapper {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--white);
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
}

/* Progress Bars */
.progress-item {
    margin-bottom: var(--space-6);
}

.progress-item.last-progress {
    margin-bottom: var(--space-8);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    font-weight: 500;
}

.progress-labels span:last-child {
    font-weight: 700;
}

.progress-bar-container {
    height: 8px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s ease-out;
}

.progress-leadership {
    background: linear-gradient(90deg, var(--primary-light), var(--primary-color));
}

.progress-analytics {
    background: linear-gradient(90deg, var(--success-color), #059669); /* Using a slightly darker success color for gradient */
}

.progress-creativity {
    background: linear-gradient(90deg, var(--accent-color), #7c3aed); /* Using a slightly darker accent color for gradient */
}

/* Accuracy Badge */
.accuracy-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--gray-50); /* Use a subtle gray background */
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.accuracy-icon {
    width: 32px;
    height: 32px;
    background: var(--success-color);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: var(--font-size-sm);
}

.accuracy-text {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--dark);
}

.accuracy-text .font-normal {
    font-weight: 500;
}

/* Stats Popover (Floating Badge) */
.stats-popover {
    position: absolute;
    /* Adjusted for padding in hero-visual */
    top: var(--space-4); 
    right: var(--space-4); 
    background: var(--white);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    animation: pulse 2s infinite alternate ease-in-out;
    transition: var(--transition-base);
}

@media (max-width: 640px) {
    /* Hide the popover on very small screens to save space */
    .stats-popover {
        display: none;
    }
    
    .hero-visual {
        padding: var(--space-4);
    }
}

.popover-content {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.popover-icon {
    font-size: var(--font-size-xl);
}

.popover-value {
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
}

.popover-label {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
}

/* Utility Classes (If not already present, you can add these) */
.text-primary-color {
    color: var(--primary-color);
}

.text-success-color {
    color: var(--success-color);
}

.text-accent-color {
    color: var(--accent-color);
}
/* ========================================
    STATS COMPONENTS
    ======================================== */
.stats-section {
    background: var(--dark);
    color: var(--white);
    padding: var(--space-20) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-12);
}

.stat-item {
    text-align: center;
}

.stat-icon {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-4);
    opacity: 0.9;
}

.stat-number {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--space-2);
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    opacity: 0.9;
}

/* Stats Banner Component */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-4);
    max-width: 800px;
    margin: 0 auto var(--space-12);
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    border: 1px solid var(--gray-200);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-3);
    color: var(--primary-color);
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: var(--space-2);
}

/* ========================================
    FILTER PILLS COMPONENT
    ======================================== */
.filter-section {
    padding: var(--space-12) 0 var(--space-8);
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    margin-bottom: var(--space-8);
}

.filter-pill {
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-full);
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    font-weight: 600;
    font-size: var(--font-size-sm);
    transition: var(--transition-base);
    cursor: pointer;
}

.filter-pill:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* ========================================
    FEATURES SECTION
    ======================================== */
.features-section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-16);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-5);
    background: var(--gray-100);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-weight: 600;
    margin-bottom: var(--space-6);
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--space-6);
    color: var(--dark);
}

.section-description {
    font-size: var(--font-size-xl);
    color: var(--gray-600);
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-8);
}

.feature-card {
    background: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: var(--space-6);
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.feature-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--dark);
}

.feature-description {
    color: var(--gray-600);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.feature-check {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--success-color);
    font-weight: 500;
}

/* ========================================
    TEST CARDS & GRID
    ======================================== */
.test-selection-container {
    max-width: 1400px;
    margin: var(--space-10) auto;
    padding: var(--space-5);
}

.page-header {
    text-align: center;
    margin-bottom: var(--space-12);
    animation: fadeInDown 0.8s ease;
}

.page-header h1 {
    font-size: var(--font-size-5xl);
    color: var(--primary-color);
    margin-bottom: var(--space-4);
    font-weight: 800;
}

.page-header p {
    font-size: var(--font-size-xl);
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--space-6);
    animation: fadeIn 0.8s ease;
}

/* Mobile First - Single Column */
@media (max-width: 639px) {
    .tests-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
}

/* Tablet - 2 Columns */
@media (min-width: 640px) and (max-width: 1023px) {
    .tests-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

/* Desktop - 3 Columns */
@media (min-width: 1024px) {
    .tests-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
}

/* Large Desktop - 4 Columns */
@media (min-width: 1440px) {
    .tests-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-6);
    }
}

/* Test Card Component */
.test-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--gray-200);
    height: 100%;
}

.test-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.test-header {
    padding: var(--space-6);
    color: var(--white);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.test-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.test-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
    position: relative;
    z-index: 1;
    transition: var(--transition-base);
}

.test-card:hover .test-icon {
    transform: scale(1.1) rotate(5deg);
}

.test-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.test-category {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.test-body {
    padding: var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.test-description {
    color: var(--gray-600);
    line-height: 1.6;
    font-size: var(--font-size-sm);
}

.test-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-1);
}

.meta-icon {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

.meta-text {
    font-size: var(--font-size-sm);
    color: var(--gray-600);
    font-weight: 500;
}

.benefits-list {
    list-style: none;
    flex: 1;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    font-size: var(--font-size-sm);
    color: var(--gray-700);
}

.benefit-icon {
    color: var(--success-color);
    font-size: var(--font-size-lg);
    flex-shrink: 0;
    margin-top: 2px;
}

.start-btn {
    width: 100%;
    padding: var(--space-4);
    border: none;
    border-radius: var(--radius-xl);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.start-btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-icon {
    position: relative;
    z-index: 1;
}

/* ========================================
    MODAL COMPONENT
    ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal-backdrop);
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    max-width: 550px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: transform var(--transition-bounce), opacity var(--transition-base);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: var(--space-8);
    color: var(--white);
    position: relative;
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: var(--font-size-xl);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-4);
}

.modal-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.modal-subtitle {
    opacity: 0.95;
    font-size: var(--font-size-base);
}

.modal-body {
    padding: var(--space-8);
}

/* ========================================
    FORM COMPONENTS
    ======================================== */
.form-group {
    margin-bottom: var(--space-6);
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-2);
    font-size: var(--font-size-sm);
}

.form-input {
    width: 100%;
    padding: var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    transition: var(--transition-base);
    font-family: inherit;
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group.is-invalid .form-input {
    border-color: var(--danger-color);
    background: #fef2f2;
}

.error-message {
    color: var(--danger-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-top: var(--space-2);
    display: none;
}

.form-group.is-invalid .error-message {
    display: block;
}

.form-actions {
    display: flex;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

@media (max-width: 640px) {
    .form-actions {
        flex-direction: column;
    }
}

.btn-submit, .btn-cancel {
    flex: 1;
    padding: var(--space-4);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.btn-cancel {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-cancel:hover {
    background: var(--gray-300);
}

.btn-submit {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* ========================================
    CTA SECTION
    ======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: var(--space-16) var(--space-8);
    border-radius: var(--radius-2xl);
    text-align: center;
    margin: var(--space-16) 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-title {
    font-size: var(--font-size-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    position: relative;
    z-index: 1;
}

.cta-description {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-8);
    opacity: 0.9;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: var(--white);
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    position: relative;
    z-index: 1;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* ========================================
    ENHANCED FOOTER STYLES
    ======================================== */
/* ========================================
    ENHANCED FOOTER STYLES - PROFESSIONAL & MODERN
    Add this to the end of your main.css file
    ======================================== */

/* Footer Layout */
.footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--dark) 50%, #111827 100%);
    color: var(--white);
    padding: var(--space-20) 0 var(--space-8);
    position: relative;
    overflow: hidden;
    margin-top: var(--space-16);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Background Effects */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-10);
    margin-bottom: var(--space-12);
    position: relative;
    z-index: 1;
}

/* Footer Brand Section */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition-base);
    max-width: fit-content;
}

.footer-logo:hover {
    opacity: 0.85;
    transform: translateX(3px);
}

.footer-logo .logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.footer-description {
    color: var(--gray-300);
    line-height: 1.7;
    font-size: var(--font-size-sm);
    max-width: 400px;
}

/* Footer Newsletter */
.footer-newsletter {
    margin-top: var(--space-4);
}

.newsletter-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.newsletter-form {
    display: flex;
    gap: var(--space-2);
    max-width: 400px;
}

.newsletter-input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    font-size: var(--font-size-sm);
    transition: var(--transition-base);
    font-family: var(--font-primary);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-input::placeholder {
    color: var(--gray-400);
}

.newsletter-btn {
    width: 48px;
    height: 48px;
    padding: 0;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.newsletter-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.newsletter-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer Social Links */
.footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.social-link {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: inherit;
    transform: scale(0);
    transition: var(--transition-base);
    z-index: -1;
}

.social-link:hover {
    color: var(--white);
    transform: translateY(-3px);
    border-color: transparent;
    box-shadow: var(--shadow-lg);
}

.social-link:hover::before {
    transform: scale(1);
}

/* Footer Columns */
.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.footer-column h4 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-2);
    position: relative;
    display: inline-block;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
}

/* Footer Links */
.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links li {
    margin: 0;
    padding: 0;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    padding: var(--space-1) 0;
    position: relative;
}

.footer-links a::before {
    content: '→';
    opacity: 0;
    transition: var(--transition-base);
    font-weight: 600;
    color: var(--primary-color);
    position: absolute;
    left: -20px;
}

.footer-links a:hover {
    color: var(--white);
    transform: translateX(8px);
}

.footer-links a:hover::before {
    opacity: 1;
    left: -15px;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.footer-copyright {
    color: var(--gray-400);
    font-size: var(--font-size-sm);
    text-align: center;
}

.footer-copyright p {
    margin: 0;
}

/* ========================================
    RESPONSIVE FOOTER DESIGN
    ======================================== */

/* Large Tablets and Below (1024px) */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: var(--space-8);
    }
    
    .footer-column:last-child {
        grid-column: 1 / -1;
        max-width: 300px;
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .footer {
        padding: var(--space-16) 0 var(--space-6);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    .footer-column:last-child {
        grid-column: auto;
        max-width: none;
    }
}

/* Mobile (640px and below) */
@media (max-width: 640px) {
    .footer {
        padding: var(--space-12) 0 var(--space-4);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer-brand {
        text-align: center;
        align-items: center;
    }
    
    .footer-logo {
        margin: 0 auto;
    }
    
    .footer-description {
        text-align: center;
        margin: 0 auto;
    }
    
    .newsletter-form {
        margin: 0 auto;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-column {
        text-align: center;
        align-items: center;
    }
    
    .footer-column h4 {
        margin: 0 auto var(--space-4);
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    .footer-links a::before {
        display: none;
    }
    
    .footer-links a:hover {
        transform: translateY(-2px);
    }
    
    .footer-bottom {
        padding-top: var(--space-6);
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .footer {
        padding: var(--space-10) 0 var(--space-4);
    }
    
    .footer-grid {
        gap: var(--space-6);
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    
    .newsletter-btn {
        width: 100%;
        height: 48px;
    }
    
    .footer-social {
        flex-wrap: wrap;
    }
}

/* ========================================
    FOOTER ANIMATIONS
    ======================================== */

/* Staggered fade-in animation */
.footer-grid > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.footer-brand {
    animation-delay: 0.1s;
}

.footer-column:nth-child(2) {
    animation-delay: 0.2s;
}

.footer-column:nth-child(3) {
    animation-delay: 0.3s;
}

.footer-column:nth-child(4) {
    animation-delay: 0.4s;
}

.footer-bottom {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Disable animations on reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .footer-grid > *,
    .footer-bottom {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ========================================
    FOOTER PRINT STYLES
    ======================================== */
@media print {
    .footer {
        background: white;
        color: black;
        border-top: 2px solid black;
        padding: var(--space-8) 0;
    }
    
    .footer::before {
        display: none;
    }
    
    .footer-newsletter,
    .footer-social,
    .social-link {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-links a {
        color: black;
    }
    
    .footer-copyright {
        color: black;
    }
}

/* ========================================
    ACCESSIBILITY IMPROVEMENTS
    ======================================== */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .footer {
        border-top: 3px solid white;
    }
    
    .footer-links a,
    .social-link,
    .footer-logo {
        border: 2px solid currentColor;
        padding: var(--space-1) var(--space-2);
    }
}

/* Focus Visible States */
.footer-links a:focus-visible,
.social-link:focus-visible,
.newsletter-input:focus-visible,
.newsletter-btn:focus-visible,
.footer-logo:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
    FOOTER LAYOUT FIXES
    ======================================== */

/* Ensure footer doesn't break layout */
.footer,
.footer * {
    box-sizing: border-box;
    max-width: 100%;
}

/* Prevent footer overflow */
.footer .container {
    overflow: hidden;
}

/* Ensure proper spacing */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

/* ========================================
    END OF FOOTER STYLES
    ======================================== */

/* ========================================
    ANIMATIONS & UTILITIES
    ======================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.is-visible [data-animate-child] {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInChild 0.6s ease-out forwards;
}

.is-visible [data-animate-child]:nth-child(1) { animation-delay: 0.1s; }
.is-visible [data-animate-child]:nth-child(2) { animation-delay: 0.2s; }
.is-visible [data-animate-child]:nth-child(3) { animation-delay: 0.3s; }
.is-visible [data-animate-child]:nth-child(4) { animation-delay: 0.4s; }
.is-visible [data-animate-child]:nth-child(5) { animation-delay: 0.5s; }
.is-visible [data-animate-child]:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInChild {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ========================================
    UTILITY CLASSES
    ======================================== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
    RESPONSIVE BREAKPOINTS
    ======================================== */
@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-link span {
        display: none;
    }
    
    .dropdown-menu {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-content {
        height: 60px;
    }
    
    .logo-primary {
        font-size: 1.1rem;
    }
    
    .logo-secondary {
        font-size: 0.8rem;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .tests-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: var(--font-size-3xl);
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    :root {
        --font-size-base: 0.9375rem;
    }

    .stats-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .stat-card {
        padding: var(--space-4);
    }

    .stat-value {
        font-size: var(--font-size-2xl);
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
    }

    /* *** NEW: Title size reduction for small devices *** */
    .test-card.small-title .test-title {
        font-size: 1.25rem; /* Reduced size on small-title class applied by JS */
        line-height: 1.4;
    }
}

/* Main content padding to account for fixed header */
main {
    padding-top: 70px;
}

.page-header h1 {
    font-size: var(--font-size-2xl);
}

/* ========================================
    TEST NAVIGATION BUTTON STYLES (NEW/UPDATED)
    ======================================== */

.test-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-200);
}

.nav-btn {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    /* For icon alignment */
    display: flex; 
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: var(--gray-200); /* Light gray */
    color: var(--gray-700); /* Dark text */
}

.btn-back:hover:not(:disabled) {
    background: var(--gray-300);
}

.btn-back:disabled {
    background: var(--gray-100);
    color: var(--gray-400); 
    cursor: not-allowed;
}

.btn-next {
    background: var(--primary-color); /* Primary color */
    color: var(--white);
}

.btn-next:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-next:disabled {
    background: var(--gray-300); /* Consistent light gray for disabled state */
    color: var(--gray-500); 
    cursor: not-allowed;
}