/* ========================================
   4U DRIVING SCHOOL - BASE STYLES
   Modern & Vibrant Design System
   ======================================== */

/* ==================== CSS RESET ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== COLOR SCHEMES ==================== */
:root {
    /* Scheme 1: Energetic Cyan & Orange */
    --color-primary: #00D9FF;
    --color-primary-light: #5FE5FF;
    --color-primary-dark: #00A8CC;
    --color-secondary: #FF6B35;
    --color-secondary-light: #FF8C5F;
    --color-secondary-dark: #E64920;
    --color-accent: #FFD23F;
    --color-success: #06D6A0;
    --color-warning: #FCA311;
    --color-danger: #EF476F;

    /* Neutrals */
    --color-bg: #FAFBFC;
    --color-bg-alt: #F0F4F8;
    --color-surface: #FFFFFF;
    --color-text: #1A2332;
    --color-text-light: #4A5568;
    --color-text-muted: #718096;
    --color-border: #E2E8F0;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-vibrant: linear-gradient(135deg, #00D9FF 0%, #FF6B35 50%, #FFD23F 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(0,217,255,0.9) 0%, rgba(255,107,53,0.9) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 20px rgba(0,217,255,0.4);

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Container */
    --container-max: 1200px;
    --container-padding: 1.5rem;
}

/* Scheme 2: Electric Purple & Green */
[data-palette="2"] {
    --color-primary: #A855F7;
    --color-primary-light: #C084FC;
    --color-primary-dark: #9333EA;
    --color-secondary: #10B981;
    --color-secondary-light: #34D399;
    --color-secondary-dark: #059669;
    --color-accent: #F59E0B;
    --color-success: #14B8A6;
    --color-warning: #F97316;
    --color-danger: #EF4444;

    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --gradient-vibrant: linear-gradient(135deg, #A855F7 0%, #10B981 50%, #F59E0B 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(168,85,247,0.9) 0%, rgba(16,185,129,0.9) 100%);
    --shadow-glow: 0 0 20px rgba(168,85,247,0.4);
}

/* ==================== BASE STYLES ==================== */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-light);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-primary-dark);
}

strong, b {
    font-weight: 600;
}

/* ==================== CONTAINER ==================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background-color: white;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* ==================== CARDS ==================== */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    margin-bottom: var(--space-md);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.card-body {
    color: var(--color-text-light);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background-color: var(--color-primary-light);
    color: white;
}

.badge-secondary {
    background-color: var(--color-secondary-light);
}

.badge-accent {
    background-color: var(--color-accent);
    color: var(--color-text);
}

/* ==================== SECTIONS ==================== */
.section {
    padding: var(--space-3xl) 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
}

.section-dark {
    background: var(--gradient-overlay);
    color: white;
}

.section-dark h2,
.section-dark h3,
.section-dark p {
    color: white;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-2xl);
}

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* ==================== GRID ==================== */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ==================== UTILITIES ==================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --space-xl: 2rem;
        --space-2xl: 3rem;
        --space-3xl: 4rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

/* ==================== ACCESSIBILITY ==================== */
.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;
}

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* ==================== PRINT ==================== */
@media print {
    .site-header,
    .site-footer,
    .btn {
        display: none;
    }
}
