/* ════════════════════════════════════════
   متغيرات خط Cairo - أكاديمية نور الهدى
   ════════════════════════════════════════ */
:root {
    --primary: #1B6B4A;
    --primary-light: #2D9B6E;
    --primary-dark: #0D4B32;
    --secondary: #C8A96E;
    --secondary-light: #E8D5A8;
    --bg-primary: #FAFAF5;
    --bg-secondary: #F0EDE4;
    --bg-card: #FFFFFF;
    --bg-dark: #1A1A2E;
    --text-primary: #2C2C2C;
    --text-secondary: #666666;
    --text-light: #999999;
    --danger: #dc3545;
    --success: #198754;
    --warning: #ffc107;
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(27,107,74,0.15);
    --radius-md: 12px;

    /* ── الخط الأساسي ── */
    --font-primary: 'Cairo', 'Segoe UI', 'Tahoma', sans-serif;

    /* ── أوزان الخط ── */
    --font-thin:        200;
    --font-light:       300;
    --font-regular:     400;
    --font-medium:      500;
    --font-semibold:    600;
    --font-bold:        700;
    --font-extrabold:   800;
    --font-black:       900;

    /* ── أحجام الخط (Scale متناسق) ── */
    --text-xs:    0.75rem;    /*  12px  - نص صغير جداً (تذييلات، حالات) */
    --text-sm:    0.875rem;   /*  14px  - نص صغير (ملاحظات، تسميات) */
    --text-base:  1rem;       /*  16px  - نص أساسي */
    --text-md:    1.125rem;   /*  18px  - نص متوسط */
    --text-lg:    1.25rem;    /*  20px  - نص كبير */
    --text-xl:    1.5rem;     /*  24px  - عنوان صغير */
    --text-2xl:   1.875rem;   /*  30px  - عنوان متوسط */
    --text-3xl:   2.25rem;    /*  36px  - عنوان كبير */
    --text-4xl:   3rem;       /*  48px  - عنوان ضخم */
    --text-5xl:   3.75rem;    /*  60px  - عنوان Hero */
    --text-6xl:   4.5rem;     /*  72px  - عنوان Hero كبير */

    /* ── تباعد الأسطر (Line Height) ── */
    --leading-tight:    1.25;   /* عناوين قصيرة */
    --leading-snug:     1.375;  /* عناوين متوسطة */
    --leading-normal:   1.5;    /* نصوص عادية */
    --leading-relaxed:  1.625;  /* نصوص طويلة */
    --leading-loose:    2;      /* نصوص مريحة جداً */

    /* ── تباعد الأحرف (Letter Spacing) ── */
    --tracking-tight:   -0.025em;
    --tracking-normal:   0em;
    --tracking-wide:     0.025em;
    --tracking-wider:    0.05em;
    --tracking-widest:   0.1em;
}

/* ════════════════════════════════════════
   ١. إعدادات الجذر والأساس
   ════════════════════════════════════════ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-regular);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    width: 100%;
}

/* ════════════════════════════════════════
   ٢. العناوين - Headings
   ════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6, .font-amiri {
    font-family: var(--font-primary) !important;
    color: var(--primary);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-top: 0;
}

h1 { font-size: var(--text-4xl); font-weight: var(--font-black); }
h2 { font-size: var(--text-3xl); font-weight: var(--font-extrabold); }
h3 { font-size: var(--text-2xl); font-weight: var(--font-bold); }
h4 { font-size: var(--text-xl); font-weight: var(--font-semibold); }
h5 { font-size: var(--text-lg); font-weight: var(--font-semibold); }
h6 { font-size: var(--text-md); font-weight: var(--font-medium); }

/* ════════════════════════════════════════
   ٣. النصوص والروابط
   ════════════════════════════════════════ */

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

a {
    font-weight: var(--font-medium);
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

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

.text-primary-color { color: var(--primary) !important; }
.text-gold { color: var(--secondary) !important; }
.bg-primary-color { background-color: var(--primary) !important; }
.bg-gold { background-color: var(--secondary) !important; }


/* ════════════════════════════════════════
   ٤. الأزرار - Buttons
   ════════════════════════════════════════ */

.btn {
    font-family: var(--font-primary) !important;
    font-weight: var(--font-semibold);
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: var(--font-bold);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}

.btn-gold {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    font-weight: var(--font-bold);
}

.btn-gold:hover {
    background-color: #b09156;
    border-color: #b09156;
    color: #fff;
    transform: translateY(-2px);
}


/* ════════════════════════════════════════
   ٥. الهيدر والفوتر (Original Designs)
   ════════════════════════════════════════ */

/* Header */
.main-header, .site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.main-header.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-brand .logo-text, .site-logo-text {
    font-weight: var(--font-black);
    font-size: var(--text-2xl);
    color: var(--primary);
    letter-spacing: var(--tracking-tight);
}

.nav-link {
    font-weight: var(--font-semibold);
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
}

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

.nav-link:hover::after, .nav-link.active::after {
    width: 80%;
}

/* Footer */
.main-footer, .site-footer {
    background-color: var(--bg-dark);
    color: #fff;
    border-top: 5px solid var(--secondary);
    padding: 4rem 0 2rem;
}

.main-footer .logo-text, .footer-logo-text {
    font-weight: var(--font-black);
    font-size: var(--text-2xl);
    color: #fff;
}

.footer-title {
    color: var(--secondary);
    font-weight: var(--font-bold);
    font-size: var(--text-base);
    margin-bottom: 1.5rem;
}

.footer-links li { margin-bottom: 0.8rem; }
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.quran-quote {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(200,169,110,0.2);
    padding: 1.5rem;
    border-radius: 8px;
}


/* ════════════════════════════════════════
   ٦. الصفحة الرئيسية Hero Section
   ════════════════════════════════════════ */

.hero-section {
    position: relative;
    padding: 120px 0 100px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23c8a96e" fill-opacity="0.1"%3E%3Cpath d="M30 0l30 30-30 30L0 30z" /%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.5;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-black);
    color: #fff;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: var(--text-xl);
    font-weight: var(--font-light);
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease 0.2s 1 backwards;
    line-height: 1.8;
}

.hero-quran {
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    color: var(--secondary-light);
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease 0.4s 1 backwards;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.6s 1 backwards;
}


/* ════════════════════════════════════════
   ٧. مكونات الصفحة (Original Classes)
   ════════════════════════════════════════ */

/* Feature Cards */
.feature-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--secondary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(200, 169, 110, 0.1);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s;
}

.feature-card:hover .feature-icon {
    background: var(--secondary);
    color: #fff;
    transform: scale(1.1);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
    display: flex;
    justify-content: space-between;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--secondary-light);
    z-index: 1;
}

.timeline-item {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 25%;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border: 3px solid var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0 auto 1rem;
    font-weight: var(--font-bold);
}

/* Testimonials */
.testimonial-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    position: relative;
    margin: 1rem;
    height: 100%;
}

.quote-icon {
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 3rem;
    color: rgba(200, 169, 110, 0.2);
}

/* Counters */
.counter-box {
    text-align: center;
    padding: 20px;
}

.counter-number {
    font-size: 3.5rem;
    font-weight: var(--font-black);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.counter-title {
    font-size: 1.2rem;
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
}

/* Stat Cards */
.stat-card-number {
    font-weight: var(--font-black);
    font-size: var(--text-4xl);
    color: var(--primary);
}


/* ════════════════════════════════════════
   ٨. التنسيقات العامة والمتقدمة
   ════════════════════════════════════════ */

/* Bootstrap Overrides */
.modal-title, .swal2-title { font-weight: var(--font-bold) !important; }
.alert, .badge { font-family: var(--font-primary); }

.badge-beginner { background-color: var(--success); color: white;}
.badge-intermediate { background-color: var(--warning); color: #000;}
.badge-advanced { background-color: var(--danger); color: white;}

/* Forms */
.form-control, .form-select {
    padding: 0.8rem 1rem;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(27,107,74,0.15);
}

/* Global Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Utility (User Requested) */
.font-xs { font-size: var(--text-xs) !important; }
.font-sm { font-size: var(--text-sm) !important; }
.font-base { font-size: var(--text-base) !important; }
.font-md { font-size: var(--text-md) !important; }
.font-lg { font-size: var(--text-lg) !important; }
.font-xl { font-size: var(--text-xl) !important; }
.font-2xl { font-size: var(--text-2xl) !important; }
.font-3xl { font-size: var(--text-3xl) !important; }

.font-thin { font-weight: var(--font-thin) !important; }
.font-light { font-weight: var(--font-light) !important; }
.font-regular { font-weight: var(--font-regular) !important; }
.font-medium { font-weight: var(--font-medium) !important; }
.font-semibold { font-weight: var(--font-semibold) !important; }
.font-bold { font-weight: var(--font-bold) !important; }
.font-extrabold { font-weight: var(--font-extrabold) !important; }
.font-black { font-weight: var(--font-black) !important; }

.leading-tight { line-height: var(--leading-tight) !important; }
.leading-normal { line-height: var(--leading-normal) !important; }
.leading-relaxed { line-height: var(--leading-relaxed) !important; }
.leading-loose { line-height: var(--leading-loose) !important; }

.text-truncate-1 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.text-truncate-2 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.text-truncate-3 { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Responsive Hacks */
img { max-width: 100%; height: auto; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
