/* ==================== ENHANCED COLOR SYSTEM (WCAG AAA COMPLIANT) ==================== */
:root {
    /* ===== PRIMARY COLORS - Vibrant Blue Family ===== */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* ===== ACCENT COLORS - Purple & Gradient ===== */
    --accent-purple: #8b5cf6;
    --accent-purple-light: #a78bfa;
    --accent-purple-dark: #7c3aed;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-teal: #14b8a6;
    
    /* ===== NEUTRAL COLORS - Enhanced Palette ===== */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    
    /* ===== SEMANTIC COLORS - Vibrant & Clear ===== */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    --success-700: #047857;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;
    
    --info-50: #eff6ff;
    --info-500: #3b82f6;
    --info-600: #2563eb;
    --info-700: #1d4ed8;
    
    /* ===== LIGHT THEME COLORS ===== */
    --light-bg-primary: #ffffff;
    --light-bg-secondary: #f8fafc;
    --light-bg-tertiary: #f1f5f9;
    --light-text-primary: #0f172a;
    --light-text-secondary: #475569;
    --light-text-tertiary: #64748b;
    --light-border-primary: #e2e8f0;
    --light-border-secondary: #cbd5e1;
    
    /* Main theme variables */
    --primary-color: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #1d4ed8;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    
    --light-color: #ffffff;
    --text-color: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --bg-secondary: #f8fafc;
    
    /* ===== DARK THEME COLORS ===== */
    --dark-bg-primary: #0a0f1e;
    --dark-bg-secondary: #0f172a;
    --dark-bg-tertiary: #1e293b;
    --dark-surface-primary: #0f172a;
    --dark-surface-secondary: #1e293b;
    --dark-surface-elevated: #334155;
    --dark-text-primary: #f8fafc;
    --dark-text-secondary: #cbd5e1;
    --dark-text-tertiary: #94a3b8;
    --dark-border-primary: #334155;
    --dark-border-secondary: #475569;
    
    --dark-color: #0a0f1e;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-surface-alt: #334155;
    --dark-text: #f8fafc;
    --dark-text-secondary: #cbd5e1;
    --dark-border: #334155;
    
    /* ===== GRADIENT COLORS - Vibrant & Modern ===== */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-primary-hover: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-cool: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    --gradient-rainbow: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    
    /* Dark mode specific gradients */
    --gradient-dark-primary: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    --gradient-dark-surface: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    
    /* ===== COURSES PAGE VARIABLES ===== */
    --courses-bg: #ffffff;
    --courses-surface: #ffffff;
    --courses-surface-alt: #f8fafc;
    --courses-border: #e2e8f0;
    --courses-text-primary: #0f172a;
    --courses-text-secondary: #475569;
    --courses-text-tertiary: #64748b;
    --courses-primary: #3b82f6;
    --courses-gradient: var(--gradient-primary);
    --courses-gradient-hover: var(--gradient-primary-hover);
    
    /* ===== SHADOWS & EFFECTS ===== */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px -3px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 12px 28px -1px rgba(0, 0, 0, 0.15);
    --shadow-focus: 0 0 0 4px rgba(59, 130, 246, 0.15);
    
    /* Colored shadows */
    --shadow-primary: 0 8px 20px rgba(59, 130, 246, 0.25);
    --shadow-purple: 0 8px 20px rgba(139, 92, 246, 0.25);
    --shadow-success: 0 8px 20px rgba(16, 185, 129, 0.25);
    
    /* Glow effects */
    --glow-primary: 0 0 20px rgba(59, 130, 246, 0.4);
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.4);
    --glow-success: 0 0 20px rgba(16, 185, 129, 0.4);
    
    /* ===== TRANSITIONS ===== */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Typography */
    --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;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    
    /* Radius */
    --brand-radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--light-color);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER - Modern & Glassmorphism ===== */
.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    position: relative;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.logo h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 2px;
    opacity: 0.5;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* RTL tweaks */
html[dir="rtl"] .nav-links { direction: rtl; }
html[dir="rtl"] .nav-links a { text-align: right; }

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    transition: all var(--transition-base);
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: 10px;
    z-index: -1;
}

.nav-links a:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.nav-links a:hover::before {
    opacity: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: white;
    transition: width var(--transition-base);
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 60%;
}

/* ===== BUTTONS - Modern & Vibrant ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 14px 28px;
    text-decoration: none;
    border-radius: 12px;
    transition: all var(--transition-base);
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-primary), var(--glow-primary);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-purple);
    border: 2px solid transparent;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-purple), var(--glow-purple);
}

/* Make nav buttons match main button animation but with compact sizing */
.nav-links .btn {
    padding: 8px 12px;
    font-size: 0.95rem;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-links .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Ensure all buttons have smooth transform/box-shadow transitions */
.btn,
.btn-primary,
.btn-secondary {
    will-change: transform, box-shadow;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

/* CTA-specific hover to make the bottom button more noticeable in light mode */
.cta .btn:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3) !important;
}

/* Featured Courses */
.featured-courses h2 {
    color: var(--text-color);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Why Choose Us */
.why-choose-us {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-rainbow);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-item:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-2xl), var(--shadow-primary);
    border-color: rgba(59, 130, 246, 0.3);
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-item i {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: block;
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-item p {
    color: var(--text-secondary, #64748b);
    line-height: 1.7;
}

/* Testimonials */
.testimonials {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
}

.testimonials h2 {
    color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.course-card {
    transition: all 0.3s ease !important;
}

.course-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2) !important;
}

.testimonial-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.testimonial-item p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.testimonial-item cite {
    font-style: normal;
    opacity: 0.9;
    font-weight: 600;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 0;
}

.cta h2 {
    color: white;
    margin-bottom: 1.5rem;
}

/* Footer */

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ===== COURSE CARDS - Modern & Vibrant ===== */
.course-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 250, 251, 0.98) 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 0;
    border-radius: 20px;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-2xl), var(--shadow-primary);
    border-color: rgba(59, 130, 246, 0.4);
}

.course-card:hover::before {
    opacity: 0.03;
}

.course-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-base);
    position: relative;
    z-index: 1;
}

.course-card:hover img {
    transform: scale(1.1);
}

.course-card-content {
    padding: 1.75rem;
    position: relative;
    z-index: 1;
    background: inherit;
}

.course-card h3 {
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.course-card p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid rgba(226, 232, 240, 0.5);
}

.course-price {
    font-weight: 800;
    font-size: 1.35rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer styles moved to assets/css/footer.css for better organization */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links li {
        margin-left: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    /* Footer responsive styles moved to footer.css */
}
