/* Typography System - نظام الخطوط الموحد */

/* Font Family */
:root {
    --font-primary: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-secondary: 'Tajawal', 'Arial', sans-serif;
    --font-mono: 'Courier New', monospace;
}

/* Typography Scale */
:root {
    /* Font Sizes */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */
    --text-6xl: 3.75rem;   /* 60px */
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
}

/* Base Typography */
body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    font-weight: var(--font-normal);
    color: var(--text-dark);
}

/* Headings */
h1, .h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-black);
    line-height: var(--leading-tight);
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

h2, .h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
    margin-bottom: 1.25rem;
    color: var(--text-dark);
}

h3, .h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-snug);
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h4, .h4 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-snug);
    margin-bottom: 0.875rem;
    color: var(--text-dark);
}

h5, .h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

h6, .h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Paragraphs */
p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Text Sizes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }
.text-6xl { font-size: var(--text-6xl); }

/* Font Weights */
.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }
.font-black { font-weight: var(--font-black); }

/* Line Heights */
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-loose { line-height: var(--leading-loose); }

/* Text Colors */
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-accent { color: var(--accent-color); }
.text-dark { color: var(--text-dark); }
.text-light { color: var(--text-light); }
.text-muted { color: var(--text-muted); }
.text-white { color: var(--white); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-right: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: var(--leading-relaxed);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Special Text Elements */
.hero-title {
    font-size: var(--text-6xl);
    font-weight: var(--font-black);
    line-height: var(--leading-tight);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-extrabold);
    line-height: var(--leading-tight);
    margin-bottom: 1.5rem;
    text-align: center;
}

.card-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    line-height: var(--leading-snug);
    margin-bottom: 1rem;
}

/* Numbers and Statistics */
.stat-number {
    font-size: var(--text-5xl);
    font-weight: var(--font-black);
    line-height: var(--leading-tight);
    color: var(--primary-color);
}

.stat-label {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-light);
}

/* Responsive Typography */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;    /* 40px */
        --text-4xl: 2rem;      /* 32px */
        --text-3xl: 1.5rem;    /* 24px */
        --text-2xl: 1.25rem;   /* 20px */
    }
    
    .hero-title {
        font-size: var(--text-5xl);
    }
    
    .section-title {
        font-size: var(--text-3xl);
    }
    
    .stat-number {
        font-size: var(--text-4xl);
    }
}

@media (max-width: 480px) {
    :root {
        --text-5xl: 2rem;      /* 32px */
        --text-4xl: 1.75rem;   /* 28px */
        --text-3xl: 1.375rem;  /* 22px */
    }
    
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .section-title {
        font-size: var(--text-2xl);
    }
    
    .stat-number {
        font-size: var(--text-3xl);
    }
}

/* Arabic Typography Enhancements */
.arabic-text {
    font-family: var(--font-primary);
    direction: rtl;
    text-align: right;
}

/* Consistent Spacing for Typography */
.typography-spacing {
    margin-bottom: 1.5rem;
}

.typography-spacing-sm {
    margin-bottom: 1rem;
}

.typography-spacing-lg {
    margin-bottom: 2rem;
}
