/* ==========================================================================
   تعريف الخطوط المحلية (Local Fonts - Thmanyah Typeface)
   ========================================================================== */

/* --- خط ثمانية للمتون والفقرات (ThmanyahSans) --- */
@font-face {
    font-family: 'ThmanyahSans';
    src: url('../fonts/thmanyahsans/woff2/thmanyahsans-Light.woff2') format('woff2'),
         url('../fonts/thmanyahsans/otf/thmanyahsans-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSans';
    src: url('../fonts/thmanyahsans/woff2/thmanyahsans-Regular.woff2') format('woff2'),
         url('../fonts/thmanyahsans/otf/thmanyahsans-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSans';
    src: url('../fonts/thmanyahsans/woff2/thmanyahsans-Medium.woff2') format('woff2'),
         url('../fonts/thmanyahsans/otf/thmanyahsans-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSans';
    src: url('../fonts/thmanyahsans/woff2/thmanyahsans-Bold.woff2') format('woff2'),
         url('../fonts/thmanyahsans/otf/thmanyahsans-Bold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSans';
    src: url('../fonts/thmanyahsans/woff2/thmanyahsans-Bold.woff2') format('woff2'),
         url('../fonts/thmanyahsans/otf/thmanyahsans-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSans';
    src: url('../fonts/thmanyahsans/woff2/thmanyahsans-Black.woff2') format('woff2'),
         url('../fonts/thmanyahsans/otf/thmanyahsans-Black.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSans';
    src: url('../fonts/thmanyahsans/woff2/thmanyahsans-Black.woff2') format('woff2'),
         url('../fonts/thmanyahsans/otf/thmanyahsans-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* --- خط ثمانية للعناوين الرئيسية (ThmanyahSerifDisplay) --- */
@font-face {
    font-family: 'ThmanyahSerifDisplay';
    src: url('../fonts/thmanyahserifdisplay/woff2/thmanyahserifdisplay-Light.woff2') format('woff2'),
         url('../fonts/thmanyahserifdisplay/otf/thmanyahserifdisplay-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSerifDisplay';
    src: url('../fonts/thmanyahserifdisplay/woff2/thmanyahserifdisplay-Regular.woff2') format('woff2'),
         url('../fonts/thmanyahserifdisplay/otf/thmanyahserifdisplay-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSerifDisplay';
    src: url('../fonts/thmanyahserifdisplay/woff2/thmanyahserifdisplay-Medium.woff2') format('woff2'),
         url('../fonts/thmanyahserifdisplay/otf/thmanyahserifdisplay-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSerifDisplay';
    src: url('../fonts/thmanyahserifdisplay/woff2/thmanyahserifdisplay-Bold.woff2') format('woff2'),
         url('../fonts/thmanyahserifdisplay/otf/thmanyahserifdisplay-Bold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSerifDisplay';
    src: url('../fonts/thmanyahserifdisplay/woff2/thmanyahserifdisplay-Bold.woff2') format('woff2'),
         url('../fonts/thmanyahserifdisplay/otf/thmanyahserifdisplay-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSerifDisplay';
    src: url('../fonts/thmanyahserifdisplay/woff2/thmanyahserifdisplay-Black.woff2') format('woff2'),
         url('../fonts/thmanyahserifdisplay/otf/thmanyahserifdisplay-Black.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ThmanyahSerifDisplay';
    src: url('../fonts/thmanyahserifdisplay/woff2/thmanyahserifdisplay-Black.woff2') format('woff2'),
         url('../fonts/thmanyahserifdisplay/otf/thmanyahserifdisplay-Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* الخطوط */
    --font-heading: 'ThmanyahSerifDisplay', 'ThmanyahSans', Georgia, serif;
    --font-body: 'ThmanyahSans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-ar: var(--font-body);
    --font-ar-alt: var(--font-body);
    --font-ar-display: var(--font-heading);
    --font-en: var(--font-body);

    /* المسافات القياسية (شبكة الرقم 8) */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* الزوايا المستديرة (Border Radius) */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* الحركات والانتقالات */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* الوضع الداكن - كقيمة افتراضية (Default Dark Theme) */
    --bg-primary: #080612;        /* بنفسجي ليلي داكن جداً */
    --bg-primary-rgb: 8, 6, 18;
    --bg-secondary: #0f0b21;      /* بطاقات غنية داكنة */
    --bg-tertiary: #171233;       /* عناصر التفاعل والمدخلات */
    --border-color: rgba(147, 51, 234, 0.15); /* حدود أرجوانية شفافة */
    --border-hover: rgba(147, 51, 234, 0.4);
    
    --text-primary: #f3f4f6;      /* أبيض ناصع بارد */
    --text-secondary: #9ca3af;    /* رمادي فاتح */
    --text-muted: #6b7280;        /* رمادي باهت */
    
    --color-primary: #9333ea;     /* بنفسجي نيون كهربائي */
    --color-primary-rgb: 147, 51, 234;
    --color-secondary: #a855f7;   /* أرجواني ساطع */
    --color-secondary-rgb: 168, 85, 247;
    --color-accent: #c084fc;      /* لافندر مشع */
    --color-accent-rgb: 192, 132, 252;
    
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    --neon-glow: 0 0 20px rgba(147, 51, 234, 0.35);
    --btn-shadow: 0 4px 14px 0 rgba(147, 51, 234, 0.4);
}

/* الوضع المضيء (Light Theme) */
[data-theme="light"] {
    --bg-primary: #f8f7fc;        /* أبيض لافندر ناعم ونظيف */
    --bg-primary-rgb: 248, 247, 252;
    --bg-secondary: #ffffff;      /* أبيض ناصع للبطاقات */
    --bg-tertiary: #f1eefc;       /* خلفيات تفاعلية فاتحة */
    --border-color: rgba(124, 58, 237, 0.1);  /* حدود خفيفة مائلة للبنفسجي */
    --border-hover: rgba(124, 58, 237, 0.3);
    
    --text-primary: #0f0b21;      /* كحلي/بنفسجي داكن جداً للتباين */
    --text-secondary: #4b5563;    /* رمادي غامق مقروء جداً */
    --text-muted: #8b93a5;        /* رمادي متوسط */
    
    --color-primary: #7c3aed;     /* بنفسجي ملكي عميق للتباين في الوضع المضيء */
    --color-primary-rgb: 124, 58, 237;
    --color-secondary: #6366f1;   /* إنديغو/أزرق نيلوفر */
    --color-secondary-rgb: 99, 102, 241;
    --color-accent: #4f46e5;      /* أزرق داكن */
    --color-accent-rgb: 79, 70, 229;
    
    --card-shadow: 0 10px 30px rgba(124, 58, 237, 0.06);
    --neon-glow: 0 0 20px rgba(124, 58, 237, 0.08);
    --btn-shadow: 0 4px 14px 0 rgba(124, 58, 237, 0.25);
}
