/* === CARDIOSENSE NEW UI - GLASSMORPHISM + SOFT MINIMAL === */

/* --- CSS Variables for Theme System --- */
:root {
    /* Primary Colors - Medical Trust */
    --primary: #1a56db;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --primary-rgb: 26, 86, 219;

    /* Accent */
    --accent: #f97316;
    --accent-dark: #ea580c;
    --accent-light: #fb923c;
    --accent-rgb: 249, 115, 22;

    /* Semantic Colors */
    --success: #10b981;
    --success-rgb: 16, 185, 129;
    --warning: #f59e0b;
    --warning-rgb: 245, 158, 11;
    --danger: #ef4444;
    --danger-rgb: 239, 68, 68;

    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-darker: rgba(255, 255, 255, 0.9);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-strong: rgba(0, 0, 0, 0.15);

    /* Effects */
    --shadow-sm: 0 1px 2px 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-glow: 0 0 40px rgba(var(--primary-rgb), 0.15);
    --shadow-glow-accent: 0 0 40px rgba(var(--accent-rgb), 0.15);

    /* Glassmorphism */
    --glass-blur: blur(10px);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', var(--font-sans);

}

/* --- Dark Theme Variables --- */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --bg-glass-darker: rgba(30, 41, 59, 0.9);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --text-inverse: #0f172a;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-strong: rgba(255, 255, 255, 0.15);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);

    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

body {
    font-family: var(--font-sans);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--transition-base), color var(--transition-base);
    overflow-x: hidden;
    position: relative;
}

/* Optimize theme switching performance */
.theme-switching,
.theme-switching * {
    transition: none !important;
}

/* Background Pattern - Light Mode */
/* Animated Background Container */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

/* Floating Orbs Animation */
.animated-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15), transparent 70%);
    top: -200px;
    right: -100px;
    animation: float-orb 20s ease-in-out infinite;
}

.animated-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.12), transparent 70%);
    bottom: -150px;
    left: -100px;
    animation: float-orb 25s ease-in-out infinite reverse;
}

@keyframes float-orb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -50px) scale(1.05);
    }

    50% {
        transform: translate(100px, 20px) scale(0.95);
    }

    75% {
        transform: translate(30px, 50px) scale(1.02);
    }
}

/* Gradient background base */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--primary-rgb), 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent),
        radial-gradient(ellipse 50% 50% at 0% 100%, rgba(var(--success-rgb), 0.06), transparent);
    pointer-events: none;
    animation: gradient-shift 30s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* Subtle dot pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(var(--primary-rgb), 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Background Pattern - Dark Mode */
[data-theme="dark"] body::before {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--primary-rgb), 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 100% 0%, rgba(var(--accent-rgb), 0.1), transparent),
        radial-gradient(ellipse 50% 50% at 0% 100%, rgba(59, 130, 246, 0.08), transparent);
}

[data-theme="dark"] body::after {
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

[data-theme="dark"] .animated-bg::before {
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.2), transparent 70%);
}

[data-theme="dark"] .animated-bg::after {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
}

/* ... keep your existing body/root styles ... */

/* === ADVANCED FLOATING HEARTS === */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    /* Behind content */
    pointer-events: none;
    overflow: hidden;
    perspective: 1000px;
}

.particle {
    position: absolute;
    /* smoother rendering */
    will-change: transform, opacity;
    user-select: none;
    /* Default starting position below screen */
    bottom: -10vh;
    line-height: 1;
    cursor: default;
}

/* Layer 0: Background (Small, Blurred, Slow) */
.particle.layer-back {
    z-index: 1;
    filter: blur(2px) opacity(0.4);
    mix-blend-mode: soft-light;
    /* Blends nicely with gradient */
}

/* Layer 1: Middle (Normal) */
.particle.layer-mid {
    z-index: 2;
    filter: opacity(0.4);
    text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
}

/* Layer 2: Foreground (Large, Crisp, Fast) */
.particle.layer-front {
    z-index: 3;
    filter: opacity(0.6) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
    text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4);
}

/* Keyframes: Float Up + Rotate */
@keyframes float-up {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: var(--p-opacity);
        /* Fade in quickly */
    }

    90% {
        opacity: var(--p-opacity);
    }

    100% {
        /* Move way up above screen */
        transform: translateY(-120vh) rotate(var(--p-rotation)) scale(var(--p-scale));
        opacity: 0;
    }
}

/* Keyframes: Horizontal Sway (Sine Wave feel) */
@keyframes sway {

    0%,
    100% {
        margin-left: -25px;
    }

    50% {
        margin-left: 25px;
    }
}


/* Main Content Padding for Floating Navbar */
main {
    padding-top: 10px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Selection */
::selection {
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-dark);
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

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

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

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* --- Glass Card --- */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: var(--space-md);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - var(--space-xl) * 2);
    max-width: 1200px;
    z-index: 1000;
    padding: var(--space-md) var(--space-xl);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all var(--transition-base);
}

[data-theme="dark"] .navbar {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    top: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 6px 20px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    transition: transform var(--transition-base);
}

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

.nav-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.nav-logo i {
    color: var(--danger);
    font-size: 1.75rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    10%,
    30% {
        transform: scale(1.15);
    }

    20%,
    40% {
        transform: scale(1.05);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: var(--bg-glass);
    color: var(--primary);
    transform: rotate(15deg);
}

.theme-toggle .fa-sun {
    display: none;
}

.theme-toggle .fa-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: var(--space-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.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, height 0.6s;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    border: 1px solid var(--border-color-strong);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

[data-theme="dark"] .btn-secondary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color-strong);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-white:hover {
    background: var(--bg-secondary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.1rem;
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--space-3xl)) 0 var(--space-3xl);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(var(--primary-rgb), 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(var(--accent-rgb), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%);
}

[data-theme="dark"] .hero-gradient {
    background:
        radial-gradient(circle at 20% 50%, rgba(var(--primary-rgb), 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(var(--accent-rgb), 0.15) 0%, transparent 50%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat .stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
}

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

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color-strong);
}

/* === HERO LAYOUT === */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    height: 400px;
    /* Ensure space for floating */
}

.hero-glow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.2) 0%, transparent 60%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(50px);
    z-index: -1;
    animation: glow-pulse 4s ease-in-out infinite alternate;
}

.hero-card-stack {
    position: relative;
    width: 320px;
    height: 200px;
}

/* === THE WRAPPERS (Handle the Floating Animation) === */
.card-float-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: simple-float 6s ease-in-out infinite;
    /* Custom properties allow us to use one keyframe for all */
}

.float-delay-0 {
    animation-delay: 0s;
    z-index: 10;
}

.float-delay-1 {
    animation-delay: 0.5s;
    z-index: 5;
}

.float-delay-2 {
    animation-delay: 2s;
    z-index: 4;
}

.float-delay-3 {
    animation-delay: 4s;
    z-index: 1;
}

@keyframes simple-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(var(--float-y));
    }
}

/* === THE CARDS (Handle Design & Hover) === */
.hero-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-xl);

    /* High-End Glassmorphism */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 10px 30px -5px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);

    /* Interaction Transition */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    transform-origin: center center;
    cursor: default;
    position: relative;
    overflow: hidden;
    /* For shimmer effect */
}

/* Dark Mode Card */
[data-theme="dark"] .hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(30, 41, 59, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

/* === POSITIONING THE CARDS WITHIN WRAPPERS === */
/* Main Card */
.hero-card-main {
    width: 100%;
    transform: rotate(0deg);
}

/* AI Card */
.hero-card-2 {
    position: absolute;
    top: -20px;
    left: -40px;
    width: 260px;
    transform: rotate(-5deg);
}

/* Accuracy Card */
.hero-card-3 {
    position: absolute;
    bottom: -60px;
    right: -20px;
    width: 240px;
    transform: rotate(3deg);
}

/* ECG Card (New) */
.hero-card-ecg {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    padding: var(--space-md);
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    transform: rotate(6deg);
    background: rgba(255, 255, 255, 0.95);
    /* More opaque */
}

/* === CARD CONTENTS === */
.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.primary-glass {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

.accent-glass {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
}

.success-glass {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.status-badge {
    margin-left: auto;
    font-size: 0.75rem;
    background: rgba(var(--success-rgb), 0.1);
    color: var(--success);
    padding: 4px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(var(--success-rgb), 0.4);
    animation: dot-pulse 2s infinite;
}

/* === ECG CARD STYLES === */
.card-header-sm {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.pulse-red {
    width: 6px;
    height: 6px;
    background: var(--danger);
    border-radius: 50%;
    animation: dot-pulse 1s infinite;
}

.ecg-line {
    width: 100%;
    height: 30px;
    margin: 5px 0;
}

.ecg-line path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: draw-ecg 2s linear infinite;
}

.ecg-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.ecg-value .unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* === INTERACTION === */

/* When hovering the STACK, we target the specific CARDS inside */

.hero-card-stack:hover .hero-card-main {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 40px rgba(var(--primary-rgb), 0.2);
    z-index: 20;
}

.hero-card-stack:hover .hero-card-2 {
    transform: translate(-20px, -10px) rotate(-10deg) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    z-index: 15;
}

.hero-card-stack:hover .hero-card-3 {
    transform: translate(20px, 10px) rotate(5deg) scale(1.02);
    z-index: 15;
}

.hero-card-stack:hover .hero-card-ecg {
    transform: translate(30px, -20px) rotate(10deg) scale(1.05);
    z-index: 15;
    box-shadow: 0 15px 30px rgba(var(--danger-rgb), 0.15);
}

/* === SHIMMER EFFECT === */
.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.5s;
    pointer-events: none;
}

.hero-card-main:hover .card-shine {
    animation: shine-sweep 1s forwards;
}

/* === KEYFRAMES === */
@keyframes dot-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(var(--success-rgb), 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(var(--success-rgb), 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(var(--success-rgb), 0);
    }
}

@keyframes draw-ecg {
    0% {
        stroke-dashoffset: 100;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        stroke-dashoffset: 0;
        opacity: 0;
    }
}

@keyframes shine-sweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
}

.card-icon.success {
    background: rgba(var(--success-rgb), 0.15);
    color: var(--success);
}

.card-icon.primary {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary);
}

.card-icon.warning {
    background: rgba(var(--warning-rgb), 0.15);
    color: var(--warning);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-weight: 700;
    color: var(--text-primary);
}

/* Hero Heart Animation */
.hero-heart {
    position: absolute;
    width: 200px;
    height: 200px;
    opacity: 0.1;
    z-index: -1;
    right: -50px;
    top: -50px;
}

.heart-svg {
    width: 100%;
    height: 100%;
}

.heart-path {
    fill: var(--danger);
    animation: heartPulse 1.5s ease-in-out infinite;
}

.heart-pulse {
    fill: none;
    stroke: var(--danger);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawPulse 2s ease-in-out infinite;
}

@keyframes heartPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes drawPulse {
    0% {
        stroke-dashoffset: 300;
    }

    50% {
        stroke-dashoffset: 0;
    }

    100% {
        stroke-dashoffset: -300;
    }
}

/* Hero Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: 0.875rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ==================== SECTIONS ==================== */
section {
    padding: var(--space-3xl) 0;
}

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

.section-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* ==================== FEATURES ==================== */
.features {}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    padding: var(--space-xl);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);

}

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

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==================== HOW IT WORKS ==================== */
.how-it-works {}

.steps-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
}

.step-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: var(--space-md);
}

.step-content {
    padding: var(--space-xl);
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-size: 1.5rem;
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-lg);
}

.step-content h3 {
    font-size: 1.125rem;
    margin-bottom: var(--space-sm);
}

.step-content p {
    font-size: 0.9rem;
}

.step-connector {
    display: flex;
    align-items: center;
    padding-top: 60px;
    color: var(--border-color-strong);
    width: 80px;
}

/* ==================== METRICS SECTION ==================== */
.metrics-section {}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.metric-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.metric-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.metric-item span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    padding: var(--space-2xl) 0;
}

.cta-card {
    position: relative;
    padding: var(--space-3xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);

    overflow: hidden;
    text-align: center;
}

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

.cta-card h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.cta-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
}

.cta-decoration {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.cta-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.cta-circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.cta-circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
}

.cta-circle-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 30%;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3xl) 0 var(--space-xl);
}

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

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.footer-logo i {
    color: var(--danger);
}

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

.footer-brand p {
    font-size: 0.95rem;
    margin-bottom: var(--space-lg);
}

.footer-social {
    display: flex;
    gap: var(--space-sm);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

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

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

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

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

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border-color);
}

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

.footer-bottom a {
    color: var(--primary);
    text-decoration: none;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: calc(100% - var(--space-lg) * 2);
        padding: var(--space-md);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + var(--space-sm));
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px) saturate(180%);

        padding: var(--space-lg);
        border-radius: var(--radius-lg);
        border: 1px solid rgba(255, 255, 255, 0.3);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    [data-theme="dark"] .nav-links {
        background: rgba(30, 41, 59, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: calc(80px + var(--space-2xl)) 0 var(--space-2xl);
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
    }

    .hero-stat-divider {
        width: 60px;
        height: 1px;
    }

    .hero-scroll {
        display: none;
    }

    .step-connector {
        display: none;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --space-lg: 1rem;
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
        --space-3xl: 2.5rem;
    }

    .btn-lg {
        padding: var(--space-md) var(--space-lg);
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== ADDITIONAL MOBILE OPTIMIZATIONS ==================== */

/* Mobile Large: 576px - 767px */
@media (max-width: 767px) {

    main {
        padding-top: 30px;
    }

    /* Typography Adjustments */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Hero Section */
    .hero {
        padding: calc(80px + var(--space-xl)) 0 var(--space-2xl);
        min-height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-visual {
        order: 1;
        max-width: 100%;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-md);
    }

    .hero-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .hero-cta .btn {
        width: 100%;
    }

    .hero-stats {
        flex-direction: row;
        gap: var(--space-md);
    }

    .hero-stat-divider {
        display: none;
    }

    /* Hero Cards */
    .hero-card-stack {
        padding: var(--space-lg);
    }

    .hero-card {
        padding: var(--space-md);
    }

    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .card-value {
        font-size: 1.5rem;
    }

    .card-label {
        font-size: 0.75rem;
    }

    /* Hero Card Positioning */
    .hero-card-2 {
        top: 10px;
        right: 10px;
    }

    .hero-card-3 {
        bottom: 10px;
        left: 10px;
    }

    .hero-card-ecg {
        bottom: 10px;
        right: 10px;
    }

    /* Features */
    .feature-card {
        padding: var(--space-lg);
    }

    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .feature-card p {
        font-size: 0.9rem;
    }

    /* Steps */
    .steps-container {
        gap: var(--space-xl);
    }

    .step {
        flex-direction: column;
        text-align: center;
        align-items: center;
        display: flex;
    }

    .step-number {
        position: static;
        /* margin-bottom: var(--space-md); */
    }

    .step-content {
        padding-top: 5px;
    }

    .step-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .step-connector {
        display: none;
    }

    /* Metrics */
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .metric-item {
        flex-direction: column;
        padding: var(--space-md);
    }

    .metric-item i {
        font-size: 1.75rem;
        margin-bottom: var(--space-sm);
    }

    .metric-item span {
        font-size: 1.25rem;
    }

    /* CTA Section */
    .cta-card {
        padding: var(--space-xl);
    }

    .cta-card h2 {
        font-size: 1.5rem;
    }

    .cta-card p {
        font-size: 1rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .footer-brand p {
        font-size: 0.9rem;
    }

    .footer-links h4 {
        margin-bottom: var(--space-sm);
    }

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

/* Mobile: 320px - 575px */
@media (max-width: 575px) {


    /* Base Adjustments */
    .container {
        padding: 0 var(--space-sm);
    }

    /* Typography */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    h4 {
        font-size: 1rem;
    }

    /* Buttons */
    .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }

    .btn-lg {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.95rem;
    }

    .btn-sm {
        padding: 6px var(--space-sm);
        font-size: 0.8rem;
    }

    /* Hero */
    .hero {
        padding: calc(70px + var(--space-lg)) 0 var(--space-xl);
    }

    .hero-title {
        font-size: clamp(1.5rem, 4.5vw, 2rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .hero-stats {
        gap: var(--space-sm);
    }

    .hero-stat .stat-value {
        font-size: 1.75rem;
    }

    .hero-stat .stat-label {
        font-size: 0.8rem;
    }

    /* Hero Cards - Stack them on very small screens */
    .hero-card-stack {
        position: relative;
        padding: var(--space-md);
    }

    .hero-card {
        position: static !important;
        margin-bottom: var(--space-md);
        transform: none !important;
    }

    .hero-card-main {
        max-width: 100%;
    }

    /* Features */
    .features-grid {
        gap: var(--space-md);
    }

    .feature-card {
        padding: var(--space-md);

    }

    .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .feature-card h3 {
        font-size: 1rem;
    }

    .feature-card p {
        font-size: 0.85rem;
    }

    /* Steps */
    .steps-container {
        gap: var(--space-lg);
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .step-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        margin-bottom: var(--space-sm);
    }

    .step-content h3 {
        font-size: 1rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }

    /* Metrics */
    /*i want two item in one row*/
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-item {
        padding: var(--space-sm) var(--space-md);
    }

    .metric-item i {
        font-size: 1.5rem;
    }

    .metric-item span {
        font-size: 1.1rem;
    }

    /* CTA */
    .cta-card {
        padding: var(--space-lg);
    }

    .cta-card h2 {
        font-size: 1.25rem;
    }

    .cta-card p {
        font-size: 0.9rem;
    }

    .cta-circle {
        width: 150px;
        height: 150px;
    }

    /* Sections */
    section {
        padding: var(--space-2xl) 0;
    }

    .section-badge {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer {
        padding: var(--space-2xl) 0 var(--space-xl);
    }

    .footer-brand {
        margin-bottom: var(--space-lg);
    }

    .footer-logo {
        font-size: 1.25rem;
    }

    .footer-logo i {
        font-size: 1.1rem;
    }

    .footer-brand p {
        font-size: 0.85rem;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .footer-links h4 {
        font-size: 1rem;
    }

    .footer-links a {
        font-size: 0.85rem;
    }

    .footer-bottom {
        padding-top: var(--space-lg);
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile: < 375px */
@media (max-width: 374px) {

    /* Ultra-compact adjustments */
    .hero-title {
        font-size: 1.35rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .btn {
        padding: 10px var(--space-md);
        font-size: 0.85rem;
    }

    .hero-stat .stat-value {
        font-size: 1.5rem;
    }

    .hero-card {
        padding: var(--space-sm);
    }

    .card-value {
        font-size: 1.25rem;
    }

    .feature-card {
        padding: var(--space-sm) var(--space-md);
    }

    .cta-card h2 {
        font-size: 1.1rem;
    }

    .footer-logo {
        font-size: 1.1rem;
    }
}

/* Landscape Mobile Phones */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(60px + var(--space-md)) 0 var(--space-lg);
    }

    .hero-container {
        gap: var(--space-lg);
    }

    .hero-visual {
        max-height: 300px;
    }

    .hero-card-stack {
        padding: var(--space-sm);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .btn {
        min-height: 44px;
        padding: var(--space-md) var(--space-lg);
    }

    .nav-link {
        padding: var(--space-md);
    }

    .theme-toggle {
        width: 44px;
        height: 44px;
    }

    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
    }

    /* Remove hover effects on touch */
    .btn:hover::before {
        opacity: 0;
    }

    .feature-card:hover,
    .model-card:hover,
    .education-card:hover {
        transform: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: rgba(0, 0, 0, 0.3);
        --border-color-strong: rgba(0, 0, 0, 0.5);
    }

    [data-theme="dark"] {
        --border-color: rgba(255, 255, 255, 0.3);
        --border-color-strong: rgba(255, 255, 255, 0.5);
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@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;
    }

    .animated-bg::before,
    .animated-bg::after {
        animation: none;
    }

    .particles {
        display: none;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .footer,
    .theme-toggle,
    .mobile-menu-toggle,
    .particles,
    .animated-bg,
    .hero-scroll {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }

    .btn {
        border: 1px solid #000;
    }
}