/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    /* Colors */
    --color-bg-dark: #0A1628;
    --color-primary: #5e17eb;
    --color-accent: #00D4FF;
    --color-white: #FFFFFF;
    --color-gray-light: #F8F9FA;
    --color-gray-medium: #6B7280;
    --color-text-dark: #1F2937;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #5e17eb 0%, #00D4FF 100%);
    --gradient-hero: radial-gradient(circle at top right, #1e293b 0%, #0A1628 100%);
    --gradient-glow: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-arabic: 'Tajawal', sans-serif;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    --spacing-3xl: 64px;
    --spacing-4xl: 96px;

    /* 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-glow: 0 0 20px rgba(94, 23, 235, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.toggle-switch {
    background: #e2e8f0;
    border-radius: 30px;
    padding: 4px;
    display: inline-flex;
    position: relative;
    cursor: pointer;
}

.toggle-option {
    padding: 10px 32px;
    border-radius: 24px;
    font-weight: 600;
    color: var(--color-gray-medium);
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.toggle-option.active {
    color: white;
}

.toggle-bg {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 50%;
    /* Adjust based on option width */
    height: calc(100% - 8px);
    background: var(--color-primary);
    border-radius: 24px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

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

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

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(94, 23, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(94, 23, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(94, 23, 235, 0);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes slide-in-right {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text-dark);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

body.dark-mode {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Utility Classes */
.h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.h2 {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.h3 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.4;
}

.text-lg {
    font-size: 1.125rem;
}

.text-sm {
    font-size: 0.875rem;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-4xl) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-col {
    flex-direction: column;
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: #4a12bd;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--spacing-sm) 0;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-sm) 0;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-dark);
    margin-left: var(--spacing-lg);
}

.nav-link:hover {
    color: var(--color-primary);
}

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

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

/* Hero Section */
.hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: var(--spacing-4xl);
    background: var(--color-bg-dark);
    color: var(--color-white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    z-index: 0;
    background-size: 200% 200%;
    animation: gradient-shift 15s ease infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
}

/* Cards */
.card {
    background: var(--color-white);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: var(--spacing-xl);
    transition: var(--transition-normal);
}

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

.card i {
    transition: transform 0.3s ease;
}

.card:hover i {
    transform: scale(1.2) rotate(5deg);
    color: var(--color-accent);
}

/* Footer */
.footer {
    background: var(--color-bg-dark);
    color: var(--color-white);
    padding: var(--spacing-4xl) 0 var(--spacing-xl);
}

/* RTL Support */
[dir="rtl"] {
    font-family: var(--font-arabic);
}

[dir="rtl"] .nav-link {
    margin-left: 0;
    margin-right: var(--spacing-lg);
}

/* Responsive */
@media (max-width: 768px) {
    .h1 {
        font-size: 2.5rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Mobile menu needed */
}