/* ==========================================================================
   1. المتغيرات والتهيئة العامة (Variables & Reset)
   ========================================================================== */
:root {
    --primary-color: #2563eb;       /* الأزرق الرئيسي */
    --primary-hover: #1d4ed8;       /* أزرق داكن عند التمرير */
    --secondary-color: #0f172a;     /* الكحلي للعنوان والأساسيات */
    --accent-color: #f59e0b;        /* البرتقالي/الذهبي للتأكيد */
    --bg-light: #f8fafc;            /* خلفية الأقسام الفاتحة */
    --bg-white: #ffffff;            /* خلفية البطاقات والواجهة */
    --text-dark: #1e293b;           /* لون النصوص الرئيسي */
    --text-muted: #64748b;          /* لون النصوص الفرعية */
    --border-color: #e2e8f0;        /* لون الحدود */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --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);
    --transition: all 0.3s ease;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.7;
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

ul {
    list-style: none;
}

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

/* ==========================================================================
   2. العناوين والأقسام العامة (Section Titles & Common)
   ========================================================================== */
.section-title {
    text-align: center;
    margin-bottom: 45px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* ==========================================================================
   3. الهيدر و القائمة (Header & Navigation)
   ========================================================================== */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 800;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 25px;
}

nav ul li a {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.login-btn {
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 9px 22px;
    border-radius: 30px;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

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

.menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

/* ==========================================================================
   4. قسم الواجهة الرئيسية (Hero Section)
   ========================================================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 120px 20px;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-content h1 span {
    color: var(--primary-color);
}

.hero-content p {
    font-size: 1.2rem;
    color: #cbd5e1;
    margin-bottom: 35px;
}

.hero .buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn1, .btn2 {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
}

.btn1 {
    background-color: var(--primary-color);
    color: #fff;
}

.btn1:hover {
    background-color: var(--primary-hover);
}

.btn2 {
    background-color: transparent;
    color: #fff;
    border: 2px solid #ffffff40;
}

.btn2:hover {
    background-color: #ffffff20;
    border-color: #fff;
}

/* ==========================================================================
   5. قسم الخدمات والبطاقات (Services)
   ========================================================================== */
.services, .why-us, .teachers, .testimonials, .news, .contact-home {
    padding: 80px 0;
}

.service-grid, .why-grid, .teacher-grid, .testimonial-grid, .news-grid, .contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.card, .why-card, .contact-card {
    background-color: var(--bg-white);
    padding: 30px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover, .why-card:hover, .contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card i, .why-card i, .contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card h3, .why-card h3, .contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.card p, .why-card p, .contact-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   6. الإحصائيات (Statistics)
   ========================================================================== */
.statistics {
    background-color: var(--primary-color);
    padding: 60px 0;
    color: #fff;
}

.statistics .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-box i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.stat-box h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

.stat-box p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   7. قسم الأساتذة وآراء الطلاب والكتل الإخبارية (Cards Extra)
   ========================================================================== */
/* الأساتذة */
.teacher-card {
    background-color: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.teacher-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    margin-bottom: 15px;
}

.teacher-card h3 {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.teacher-card span {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* آراء الطلاب */
.testimonial-card {
    background-color: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-right: 4px solid var(--primary-color);
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.testimonial-card h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* الأخبار */
.news-card {
    background-color: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-card h3 {
    font-size: 1.15rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.news-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.news-card a {
    color: var(--primary-color);
    font-weight: 700;
}

/* ==========================================================================
   8. دعوة للتسجيل (CTA)
   ========================================================================== */
.cta {
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)), var(--primary-color);
    text-align: center;
    padding: 80px 20px;
    color: #fff;
}

.cta h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta p {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 30px;
}

.btn-register {
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 35px;
    border-radius: 30px;
    font-weight: 700;
    display: inline-block;
}

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

/* ==========================================================================
   9. الفوتر (Footer)
   ========================================================================== */
footer {
    background-color: var(--secondary-color);
    color: #cbd5e1;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #334155;
}

footer h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

footer ul li {
    margin-bottom: 10px;
}

footer ul li a:hover {
    color: #fff;
    padding-right: 5px;
}

.social {
    display: flex;
    gap: 15px;
}

.social a {
    width: 40px;
    height: 40px;
    background-color: #1e293b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.social a:hover {
    background-color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ==========================================================================
   10. التجاوب مع الهواتف والأجهزة اللوحية (Responsive Design)
   ========================================================================== */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    .service-grid, .why-grid, .teacher-grid, .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header .container {
        position: relative;
    }

    .menu {
        display: block;
        font-size: 1.6rem;
        cursor: pointer;
        color: var(--secondary-color);
        z-index: 1001;
    }

    nav {
        position: absolute;
        top: 80px;
        right: 0;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: var(--shadow-md);
        padding: 20px;
        
        /* تأثير الظهور والترتيب */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    /* القائمة عند الضغط وتفعيل زر المنيو */
    nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 8px 0;
    }

    .login-btn {
        display: inline-block;
        text-align: center;
        margin-top: 10px;
    }

    .service-grid, .why-grid, .teacher-grid, .news-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero .buttons {
        flex-direction: column;
        gap: 10px;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }
}

