/* Theme Variables */
:root {
    /* Colors - Light Theme (Egyptian Gold Palette) */
    --primary-color: #c19a53;
    /* غنى ذهبي */
    --primary-dark: #a67c1f;
    --primary-light: #e6d8b5;
    --primary-gradient: linear-gradient(135deg, #c19a53 0%, #e6d8b5 100%);

    --secondary-color: #2c3e50;
    --secondary-light: #34495e;
    --secondary-dark: #1a252f;

    --accent-sand: #d2b48c;
    --accent-nile: #48c9b0;
    --accent-sunset: #e67e22;
    --accent-red-sea: #3498db;
    --accent-pyramid: #f39c12;

    --background-color: #fefefe;
    --surface-color: #f8f9fa;
    --surface-dark: #f0f2f5;

    --text-primary: #2c3e50;
    --text-secondary: #5d6d7e;
    --text-tertiary: #85929e;

    --border-color: #e1e8ed;
    --border-light: #f0f0f0;
    --border-dark: #d5dbdb;

    --shadow-sm: 0 2px 8px rgba(193, 154, 83, 0.08);
    --shadow-md: 0 4px 16px rgba(193, 154, 83, 0.12);
    --shadow-lg: 0 8px 32px rgba(193, 154, 83, 0.16);
    --shadow-xl: 0 16px 48px rgba(193, 154, 83, 0.2);

    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);

    /* 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;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, 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: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;
    --font-size-hero: 3.5rem;

    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
    --z-toast: 1070;
}

/* Dark Theme - رمادي فاتح بدلاً من الأسود */
[data-theme="dark"] {
    --primary-color: #d4af37;
    --primary-dark: #b8941f;
    --primary-light: #f1e5bc;
    --primary-gradient: linear-gradient(135deg, #d4af37 0%, #f1e5bc 100%);

    --background-color: #1a1e23;
    /* رمادي غامق فاتح */
    --surface-color: #23272e;
    --surface-dark: #2d3138;

    --text-primary: #f0f0f0;
    --text-secondary: #b0b7c3;
    --text-tertiary: #8a94a6;

    --border-color: #3a3f4a;
    --border-light: #2d3138;
    --border-dark: #454a54;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);

    --glass-bg: rgba(35, 39, 46, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

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

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

body.rtl {
    direction: rtl;
    text-align: right;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(193, 154, 83, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 80% 20%, rgba(72, 201, 176, 0.02) 0%, transparent 20%);
    z-index: -1;
    pointer-events: none;
}

/* Selection */
::selection {
    background-color: var(--primary-light);
    color: var(--text-primary);
}

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

::-webkit-scrollbar-track {
    background: var(--surface-color);
    border-radius: var(--radius-full);
}

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

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--font-size-hero);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-sunset));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: var(--font-size-4xl);
    position: relative;
    display: inline-block;
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: 1.7;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
}

a:hover {
    color: var(--primary-dark);
}

small {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color) !important;
}

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

.bg-primary {
    background: var(--primary-gradient) !important;
}

.bg-secondary {
    background-color: var(--secondary-color);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* Glass Effect */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Section Styles */
section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
    position: relative;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: var(--space-md);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    animation: widthPulse 2s ease-in-out infinite;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: var(--font-size-lg);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes float {

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

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

@keyframes widthPulse {

    0%,
    100% {
        width: 80px;
    }

    50% {
        width: 100px;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(193, 154, 83, 0.3);
    }

    50% {
        box-shadow: 0 0 30px rgba(193, 154, 83, 0.5);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-base) forwards;
}

.animate-slide-left {
    animation: slideInLeft var(--transition-base) forwards;
}

.animate-slide-right {
    animation: slideInRight var(--transition-base) forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
