  /* =========================================================
   AYAT AL-QURAN — الواجهة الرئيسية
   هوية بصرية: أخضر داكن + ذهبي + كريمي
   ملاحظة: هذا الملف للتنسيق فقط ولا يغيّر وظائف Laravel.
========================================================= */

/* =========================
   1) الهوية العامة
========================= */
:root{
    --green-950:#063F30;
    --green-900:#07513D;
    --green-800:#0B5D46;
    --green-700:#11745A;
    --green-100:#EAF3EE;

    --gold-700:#A97F20;
    --gold-600:#B8891D;
    --gold-500:#C79B2E;
    --gold-300:#E4C675;
    --gold-100:#F8F0D9;

    --cream:#FCF9F2;
    --cream-2:#F7F1E5;
    --white:#FFFFFF;

    --text:#24323A;
    --muted:#6B7370;
    --border:#E8DDC7;

    --shadow-sm:0 5px 16px rgba(6,63,48,.06);
    --shadow-md:0 12px 30px rgba(6,63,48,.10);
    --shadow-lg:0 20px 45px rgba(6,63,48,.14);

    --radius-sm:10px;
    --radius-md:16px;
    --radius-lg:24px;
}

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

html{
    scroll-behavior:smooth;
}

body{
    direction:rtl;
    font-family:Tahoma, Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(199,155,46,.045), transparent 24%),
        radial-gradient(circle at 90% 35%, rgba(11,93,70,.035), transparent 28%),
        var(--cream);
    color:var(--text);
    line-height:1.7;
    min-height:100vh;
}

a{
    color:inherit;
    text-decoration:none;
    transition:.25s ease;
}

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

button,
input,
textarea,
select{
    font:inherit;
}

.container-custom{
    width:92%;
    max-width:1400px;
    margin-inline:auto;
}

/* زخرفة خفيفة جدًا دون الحاجة لصورة خارجية */
.section-title::before,
.section-title::after,
.lessons-header::after{
    box-sizing:border-box;
}


/* =========================
   2) الهيدر
========================= */
.top-header{
    background:rgba(255,255,255,.97);
    border-bottom:1px solid var(--border);
    box-shadow:0 2px 14px rgba(6,63,48,.035);
    position:relative;
    z-index:20;
}

.header-wrapper{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:14px 2%;
}

.logo{
    display:flex;
    align-items:center;
    gap:14px;
}

.logo img{
    width:68px;
    height:auto;
    object-fit:contain;
}

.logo h2{
    color:var(--green-900);
    font-size:29px;
    font-weight:800;
    line-height:1.2;
}

.logo p{
    margin-top:3px;
    color:var(--gold-600);
    font-size:14px;
    font-weight:700;
}


/* =========================
   3) القائمة الرئيسية
========================= */
.main-navbar{
    background:#fff;
    border-bottom:1px solid var(--border);
}

.main-navbar ul{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:10px 20px;
    list-style:none;
}

.main-navbar li{
    padding:5px 0;
}

.main-navbar a{
    display:flex;
    align-items:center;
    gap:7px;
    position:relative;
    padding:8px 22px;
    color:var(--text);
    font-size:16px;
    font-weight:700;
    border-radius:50px;
    transition:.25s ease;
}

.main-navbar a::after{
    display:none;
}

.main-navbar a:hover{
    background-color: var(--cream-2);
    color:var(--green-800);
}

.main-navbar a.active{
    background-color: var(--gold-600);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(184, 137, 29, 0.2);
}

.main-navbar a.active i {
    color: #ffffff !important;
}

.main-navbar i{
    font-size:14px;
    color:var(--green-800);
}


/* =========================
   4) Hero — التصميم الأساسي
========================= */
.hero{
    padding:28px 0 10px;
}

.hero-box{
    position:relative;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:25px;
    min-height:360px;
    padding:35px 45px;
    background:
        radial-gradient(circle at 80% 50%, rgba(255,255,255,.95), transparent 34%),
        linear-gradient(120deg,#F6EEDC 0%,#FFFDF8 50%,#F7F0E2 100%);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    overflow:hidden;
    box-shadow:var(--shadow-sm);
}

.hero-box::before{
    content:"";
    position:absolute;
    inset:10px;
    border:1px solid rgba(199,155,46,.18);
    border-radius:18px;
    pointer-events:none;
}

.hero-image,
.hero-mosque{
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
    position:relative;
    z-index:1;
}

.hero-image img{
    width:240px;
    transition:.35s ease;
}

.hero-mosque img{
    width:330px;
    max-width:100%;
    transition:.35s ease;
}

.hero-image img:hover{
    transform:scale(1.04);
}

.hero-mosque img:hover{
    transform:scale(1.025);
}

.hero-text{
    flex:1.35;
    position:relative;
    z-index:2;
    text-align:center;
}

.hero-text h1{
    margin-bottom:8px;
    color:var(--green-900);
    font-size:clamp(35px,4.3vw,58px);
    font-weight:900;
    line-height:1.3;
}

.hero-text h3{
    margin-bottom:12px;
    color:var(--gold-600);
    font-size:clamp(21px,2.2vw,30px);
    font-weight:800;
}

.hero-text::after{
    content:"✦";
    display:block;
    width:170px;
    height:26px;
    margin:13px auto 16px;
    color:var(--gold-500);
    font-size:18px;
    line-height:18px;
    border-top:2px solid rgba(199,155,46,.65);
    border-bottom:2px solid rgba(199,155,46,.20);
}

.hero-button,
.btn-hero-dark{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    min-width:210px;
    padding:12px 30px;
    background:var(--green-800);
    border:1px solid var(--green-800);
    border-radius:50px;
    color:#fff !important;
    font-size:17px;
    font-weight:800;
    box-shadow:0 8px 20px rgba(11,93,70,.16);
}

.hero-button:hover,
.btn-hero-dark:hover{
    background:var(--green-950);
    border-color:var(--gold-500);
    transform:translateY(-2px);
}


/* =========================
   5) Hero البديل
========================= */
.new-hero-section{
    position:relative;
    width:100%;
    min-height:400px;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:42px 20px;
    direction:rtl;
    overflow:hidden;
    background:
        linear-gradient(90deg,rgba(252,249,242,.96),rgba(255,255,255,.78),rgba(252,249,242,.96));
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-sm);
}

.new-hero-content{
    position:relative;
    z-index:3;
    text-align:center;
    max-width:820px;
    margin:0 auto;
}

.new-hero-title{
    color:var(--green-900);
    font-size:clamp(36px,5vw,64px);
    font-weight:900;
    line-height:1.3;
    margin-bottom:8px;
}

.new-hero-subtitle{
    color:var(--gold-600);
    font-size:clamp(22px,2.5vw,34px);
    font-weight:800;
    margin-bottom:24px;
}

.btn-hero-dark{
    padding:12px 38px;
}

.hero-deco-mosque{
    position:absolute;
    bottom:0;
    left:0;
    width:32%;
    max-width:430px;
    z-index:1;
}

.hero-deco-quran{
    position:absolute;
    bottom:15px;
    right:4%;
    width:25%;
    max-width:300px;
    z-index:1;
}

.hero-deco-lantern{
    position:absolute;
    top:8px;
    right:15%;
    width:9%;
    max-width:110px;
    z-index:1;
}


/* =========================
   6) العناوين والأقسام
========================= */
.grades,
.services,
.lessons{
    padding:58px 0;
}

.section-title{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    margin-bottom:38px;
    color:var(--green-900);
    text-align:center;
    font-size:clamp(30px,3.2vw,42px);
    font-weight:900;
}

.section-title::before,
.section-title::after{
    content:"✦";
    color:var(--gold-500);
    font-size:18px;
    font-weight:400;
}

.section-title::before{
    transform:scaleX(-1);
}

/* =========================
   7) بطاقات الصفوف
========================= */

.grades-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:18px;
    align-items:stretch;
}


/* =========================
   بطاقة الصف
========================= */

.grade-card{
    display:flex;
    flex-direction:column;
    align-items:center;

    min-height:300px;

    padding:18px 14px 16px;

    background:rgba(255,255,255,.94);

    border:1px solid var(--border);
    border-radius:18px;

    text-align:center;

    box-shadow:var(--shadow-sm);

    transition:
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;

    position:relative;
    overflow:hidden;
}


/* الخط العلوي */

.grade-card::before{
    content:"";

    position:absolute;

    top:0;
    right:0;
    left:0;

    height:4px;

    background:
        linear-gradient(
            90deg,
            var(--green-800),
            var(--gold-500)
        );

    opacity:.9;
}


/* حركة البطاقة */

.grade-card:hover{
    transform:translateY(-6px);

    border-color:rgba(11,93,70,.28);

    box-shadow:var(--shadow-md);
}


/* =========================
   شعار الموقع داخل البطاقة
========================= */

.grade-logo{
    width:92px;
    height:92px;

    margin:4px auto 6px;

    object-fit:contain;

    display:block;

    flex-shrink:0;
}


/* =========================
   رقم الصف
========================= */

.grade-number{
    margin-bottom:5px;

    color:var(--green-800);

    font-size:34px;

    font-weight:900;

    line-height:1;
}


/* =========================
   اسم الصف
========================= */

.grade-card h4{
    margin:0 0 13px;

    color:var(--text);

    font-size:17px;

    font-weight:800;

    line-height:1.4;
}


/* =========================
   منطقة أزرار الفصول
========================= */

.grade-terms{
    width:100%;

    display:flex;
    flex-direction:column;

    margin-top:auto;
}


/* =========================
   أزرار الفصول
========================= */

.grade-btn{
    display:flex;

    justify-content:center;
    align-items:center;

    gap:7px;

    width:100%;

    min-height:42px;

    margin-top:6px;

    padding:10px 8px;

    border-radius:9px;

    color:#fff !important;

    font-size:13px;

    font-weight:800;

    text-decoration:none;

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background .25s ease;

    flex-shrink:0;
}


.grade-btn:hover{
    color:#fff !important;

    transform:translateY(-2px);

    text-decoration:none;
}


/* =========================
   الفصل الأول
========================= */

.first-term{
    background:var(--green-800);
}


.first-term:hover{
    background:var(--green-950);

    box-shadow:
        0 5px 12px rgba(11,93,70,.20);
}


/* =========================
   الفصل الثاني
========================= */

.second-term{
    background:var(--gold-500);
}


.second-term:hover{
    background:var(--gold-700);

    box-shadow:
        0 5px 12px rgba(184,137,29,.20);
}


/* =====================================================
   بطاقة لديها فصل واحد فقط
   الفصل الأول يكون في الوسط بشكل واضح
===================================================== */

.grade-card.single-term{
    min-height:300px;
}


/*
   منطقة الزر تتمدد لتجعل الزر في منتصف المساحة
*/

.grade-card.single-term .grade-terms{
    flex:1;

    justify-content:center;

    align-items:center;

    margin-top:0;
}


/*
   زر الفصل الوحيد يصبح أكبر وأوضح
*/

.grade-card.single-term .first-term{
    width:100%;

    min-height:52px;

    margin-top:8px;
    margin-bottom:8px;

    padding:12px 10px;

    font-size:14px;

    border-radius:10px;
}


/* =====================================================
   بطاقة لديها فصلان
   تعود للشكل الطبيعي
===================================================== */

.grade-card.two-terms .grade-terms{
    margin-top:auto;
}


.grade-card.two-terms .first-term{
    margin-top:6px;
}


.grade-card.two-terms .second-term{
    margin-top:6px;
    margin-bottom:2px;
}


/* =========================
   الشاشات المتوسطة
========================= */

@media (max-width:1200px){

    .grades-grid{
        grid-template-columns:repeat(4,minmax(0,1fr));
    }

}


/* =========================
   الأجهزة اللوحية
========================= */

@media (max-width:900px){

    .grades-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:15px;
    }

    .grade-logo{
        width:86px;
        height:86px;
    }

}


/* =========================
   الجوال
========================= */

@media (max-width:600px){

    .grades-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:12px;
    }

    .grade-card{
        min-height:285px;

        padding:
            16px 10px 13px;
    }

    .grade-logo{
        width:78px;
        height:78px;

        margin-top:3px;
    }

    .grade-number{
        font-size:30px;
    }

    .grade-card h4{
        font-size:15px;
    }

    .grade-btn{
        font-size:12px;

        min-height:40px;
    }

    .grade-card.single-term .first-term{
        min-height:48px;

        font-size:13px;
    }

}


/* =========================
   الجوال الصغير جدًا
========================= */

@media (max-width:400px){

    .grades-grid{
        grid-template-columns:1fr;
    }

    .grade-card{
        min-height:280px;
    }

}
/* =========================
   8) الخدمات والموارد
========================= */

.services-grid{
    display:grid;

    /*
     * توزيع ديناميكي:
     * البطاقات تتمدد تلقائيًا عند قلة العدد
     * وتنكمش بشكل مناسب عند زيادة العدد
     */
    grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));

    gap:22px;

    margin-bottom:24px;

    justify-content:center;
    align-items:stretch;
}


/* =========================
   بطاقة الخدمة
========================= */

.service-card{
    width:100%;
    min-height:285px;

    padding:24px 18px 20px;

    background:#fff;

    border:1px solid var(--border);
    border-top:4px solid var(--service-color, #168B8B);

    border-radius:18px;

    text-align:center;

    box-shadow:var(--shadow-sm);

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;

    position:relative;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
}


/* حركة البطاقة */

.service-card:hover{
    transform:translateY(-6px);

    box-shadow:var(--shadow-md);
}


/* =========================
   أيقونة الخدمة
========================= */

.service-icon{
    display:flex;

    align-items:center;
    justify-content:center;

    width:70px;
    height:70px;

    margin:0 auto 16px;

    border-radius:50%;

    background:color-mix(
        in srgb,
        var(--service-color, #168B8B) 12%,
        #fff
    );

    flex-shrink:0;
}


.service-icon i{
    color:var(--service-color, #168B8B);

    font-size:31px;

    transition:.25s ease;
}


.service-card:hover .service-icon i{
    transform:scale(1.1);
}


/* =========================
   عنوان الخدمة
========================= */

.service-card h3{
    margin:0 0 9px;

    color:var(--text);

    font-size:20px;

    font-weight:900;

    line-height:1.55;
}


/* =========================
   وصف الخدمة
========================= */

.service-card p{
    width:100%;

    min-height:65px;

    margin:0 0 16px;

    color:var(--muted);

    font-size:14px;

    line-height:1.8;

    flex:1;

    display:flex;

    align-items:center;
    justify-content:center;
}


/* =========================
   زر الخدمة
========================= */

.service-btn{
    display:inline-flex;

    justify-content:center;
    align-items:center;

    gap:7px;

    padding:10px 20px;

    border-radius:9px;

    background:var(--service-color, #168B8B);

    color:#fff !important;

    font-size:14px;

    font-weight:900;

    text-decoration:none;

    transition:
        opacity .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.service-btn:hover{
    color:#fff !important;

    opacity:.92;

    transform:translateY(-2px);

    box-shadow:0 5px 12px
        color-mix(
            in srgb,
            var(--service-color, #168B8B) 25%,
            transparent
        );
}


/* =========================
   9) البطاقات العريضة
========================= */

.services-bottom{
    display:grid;

    grid-template-columns:
        repeat(auto-fit, minmax(360px, 1fr));

    gap:22px;

    justify-content:center;

    align-items:stretch;
}


.wide-card{
    display:flex;

    align-items:center;
    justify-content:space-between;

    gap:25px;

    min-height:155px;

    padding:27px 32px;

    background:#fff;

    border:1px solid var(--border);

    border-right:5px solid var(--service-color, #168B8B);

    border-radius:18px;

    box-shadow:var(--shadow-sm);

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}


.wide-card:hover{
    transform:translateY(-5px);

    box-shadow:var(--shadow-md);
}


/* أيقونة البطاقة العريضة */

.wide-icon{
    display:flex;

    align-items:center;
    justify-content:center;

    flex-shrink:0;

    width:70px;
    height:70px;

    border-radius:50%;

    background:color-mix(
        in srgb,
        var(--service-color, #168B8B) 12%,
        #fff
    );
}


.wide-icon i{
    color:var(--service-color, #168B8B);

    font-size:48px;
}


/* محتوى البطاقة العريضة */

.wide-content{
    flex:1;

    text-align:center;
}


.wide-card h3{
    margin:0 0 7px;

    color:var(--text);

    font-size:25px;

    font-weight:900;

    line-height:1.5;
}


.wide-card p{
    margin:0 0 13px;

    color:var(--muted);

    font-size:15px;

    line-height:1.7;
}


/* زر البطاقة العريضة */

.wide-card .service-btn{
    display:inline-flex;

    padding:10px 25px;

    border-radius:10px;
}


/* =========================
   لا توجد خدمات
========================= */

.services-empty{
    width:100%;

    padding:45px 20px;

    margin-bottom:25px;

    background:#fff;

    border:1px solid var(--border);

    border-radius:18px;

    text-align:center;

    color:var(--muted);

    font-size:17px;

    font-weight:700;
}


/* =========================
   10) Breadcrumb
========================= */

.breadcrumb{
    display:flex;

    justify-content:center;
    align-items:center;

    flex-wrap:wrap;

    gap:9px;

    margin:25px 0;

    padding:11px 18px;

    background:rgba(255,255,255,.75);

    border:1px solid var(--border);

    border-radius:50px;

    font-size:15px;

    font-weight:700;
}


.breadcrumb a{
    color:var(--green-800);
}


.breadcrumb a:hover{
    color:var(--gold-600);
}


.breadcrumb span{
    color:#888;
}


.breadcrumb .active{
    color:var(--gold-600);
}


/* =====================================================
   الأجهزة اللوحية
===================================================== */

@media(max-width:1100px){

    .services-grid{
        grid-template-columns:
            repeat(auto-fit, minmax(200px, 1fr));

        gap:18px;
    }

}


/* =====================================================
   الهاتف
===================================================== */

@media(max-width:600px){

    .services-grid{
        grid-template-columns:1fr;

        gap:15px;
    }


    .service-card{
        min-height:250px;

        padding:21px 16px;
    }


    .service-icon{
        width:62px;
        height:62px;
    }


    .service-icon i{
        font-size:28px;
    }


    .service-card h3{
        font-size:18px;
    }


    .service-card p{
        font-size:13px;

        min-height:55px;
    }


    .service-btn{
        font-size:13px;

        padding:9px 18px;
    }


    .services-bottom{
        grid-template-columns:1fr;

        gap:15px;
    }


    .wide-card{
        min-height:140px;

        padding:20px;

        gap:15px;
    }


    .wide-icon{
        width:58px;
        height:58px;
    }


    .wide-icon i{
        font-size:38px;
    }


    .wide-card h3{
        font-size:20px;
    }


    .wide-card p{
        font-size:13px;
    }

}

/* =========================
   11) صفحة الدروس
========================= */
.lessons-page{
    padding:45px 0 65px;
    background:transparent;
    min-height:70vh;
}

.lessons-header{
    margin-bottom:40px;
    text-align:center;
}

.lessons-header h1{
    margin-bottom:8px;
    color:var(--green-900);
    font-size:clamp(30px,3.5vw,46px);
    font-weight:900;
}

.lessons-header h3{
    margin-bottom:10px;
    color:var(--gold-600);
    font-size:25px;
    font-weight:800;
}

.lessons-header p{
    color:var(--muted);
    font-size:17px;
}

.lessons-header::after{
    content:"✦";
    display:block;
    width:180px;
    height:28px;
    margin:16px auto 0;
    border-top:2px solid rgba(199,155,46,.55);
    color:var(--gold-500);
    font-size:17px;
    line-height:19px;
}

.lessons-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:25px;
}

.lesson-card{
    overflow:hidden;
    padding:18px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    box-shadow:var(--shadow-sm);
    transition:.3s ease;
}

.lesson-card:hover{
    transform:translateY(-5px);
    border-color:rgba(11,93,70,.28);
    box-shadow:var(--shadow-md);
}

.lesson-card img{
    width:100%;
    height:200px;
    object-fit:cover;
    background:#f3f3f3;
    border-radius:13px;
}

.lesson-number{
    display:inline-block;
    margin:0 0 12px;
    padding:6px 14px;
    background:var(--green-800);
    border-radius:50px;
    color:#fff;
    font-size:13px;
    font-weight:800;
}

.lesson-body{
    padding:18px 4px 4px;
    text-align:center;
}

.lesson-body h3,
.lesson-card h2{
    margin-bottom:17px;
    min-height:50px;
    color:var(--text);
    font-size:20px;
    font-weight:900;
    line-height:1.6;
}


/* =========================
   12) فيديو الدروس
========================= */
.lesson-thumbnail{
    position:relative;
    width:100%;
    aspect-ratio:16 / 9;
    overflow:hidden;
    margin-bottom:16px;
    background:#111;
    border-radius:13px;
    cursor:pointer;
}

.lesson-thumbnail img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.35s ease;
}

.thumbnail-overlay{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(0,0,0,.15);
    transition:.25s ease;
}

.play-button{
    width:66px;
    height:66px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:var(--green-800);
    color:#fff;
    font-size:25px;
    box-shadow:0 7px 20px rgba(0,0,0,.3);
    transition:.25s ease;
}

.play-button i{
    margin-right:-3px;
}

.lesson-thumbnail:hover img{
    transform:scale(1.05);
}

.lesson-thumbnail:hover .thumbnail-overlay{
    background:rgba(0,0,0,.28);
}

.lesson-thumbnail:hover .play-button{
    transform:scale(1.1);
    background:var(--green-900);
}

.video-wrapper{
    position:relative;
    width:100%;
    aspect-ratio:16 / 9;
    overflow:hidden;
    background:#000;
    border-radius:13px;
}

.video-wrapper iframe{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    border:0;
}

.video-error{
    padding:18px;
    background:#f8d7da;
    color:#842029;
    text-align:center;
    border-radius:10px;
}

.lesson-card.selected{
    border:2px solid var(--green-800);
    box-shadow:0 8px 30px rgba(11,93,70,.16);
}

.lesson-card.selected .lesson-number{
    background:var(--green-950);
}


/* =========================
   13) ملفات المعلمين
========================= */
.teachers-page{
    padding-bottom:70px;
}

.teachers-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:22px;
    margin-top:35px;
}

.teacher-card{
    padding:28px 22px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    text-align:center;
    box-shadow:var(--shadow-sm);
    transition:.3s ease;
}

.teacher-card:hover{
    transform:translateY(-5px);
    border-color:rgba(11,93,70,.3);
    box-shadow:var(--shadow-md);
}

.teacher-card i{
    display:block;
    margin-bottom:15px;
    color:var(--gold-600);
    font-size:48px;
}

.teacher-card h3{
    margin-bottom:8px;
    color:var(--green-800);
    font-size:21px;
    font-weight:900;
}

.teacher-card p{
    min-height:50px;
    margin-bottom:16px;
    color:var(--muted);
    line-height:1.8;
}


/* أزرار صفحات الدروس والمعلمين */
.teacher-card .service-btn,
.lesson-body .service-btn{
    display:inline-flex;
    justify-content:center;
    align-items:center;
    gap:7px;
    padding:10px 22px;
    background:var(--green-800);
    border:1px solid var(--green-800);
    border-radius:10px;
    color:#fff !important;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 5px 14px rgba(11,93,70,.14);
}

.teacher-card .service-btn:hover,
.lesson-body .service-btn:hover{
    background:var(--green-950);
    border-color:var(--gold-500);
    color:#fff !important;
    transform:translateY(-2px);
}

.teacher-card .service-btn i,
.lesson-body .service-btn i{
    display:inline;
    margin:0;
    color:#fff !important;
    font-size:inherit;
}


/* =========================
   14) جدول خطة التوزيع
========================= */
.plan-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    overflow:hidden;
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow-sm);
}

.plan-table th{
    padding:15px;
    background:var(--green-800);
    color:#fff;
    font-size:17px;
}

.plan-table td{
    padding:15px;
    text-align:center;
    font-size:16px;
    border-bottom:1px solid #ECE8DD;
}

.plan-table tr:last-child td{
    border-bottom:0;
}

.plan-table tr:hover{
    background:#FCF8EF;
}


/* =========================
   15) الفوتر 
========================= */
.site-footer{
    position:relative;
    margin-top:70px;
    padding:58px 0 24px;
    overflow:hidden;
    background:
        radial-gradient(circle at 15% 30%,rgba(255,255,255,.06),transparent 20%),
        linear-gradient(135deg,var(--green-950),var(--green-800));
    color:#fff;
    border-top:4px solid var(--gold-500);
}

.site-footer::before{
    content:"";
    position:absolute;
    inset:auto 0 0;
    height:80px;
    background:
        linear-gradient(to top,rgba(0,0,0,.12),transparent);
    pointer-events:none;
}

.footer-container{
    position:relative;
    z-index:2;
    width:92%;
    max-width:1400px;
    margin:auto;
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* تنسيقات إضافية مقترحة لإكمال الفوتر الناقص */
.footer-column h4 {
    color: var(--gold-500);
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 800;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: rgba(255,255,255,0.8);
    transition: 0.3s;
}

.footer-column ul li a:hover {
    color: var(--gold-300);
    padding-right: 5px;
}

.footer-copyright {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}


/* =========================================================
   الخدمات العريضة - FINAL
   يجب أن تكون في آخر style.css
========================================================= */

.services .modern-actions-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    margin: 35px auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.services .modern-actions-container .action-pill {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;

    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    height: 82px !important;

    margin: 0 !important;
    padding: 10px 16px !important;

    box-sizing: border-box !important;

    background: #ffffff !important;
    border: 1px solid #e5ebe7 !important;
    border-radius: 18px !important;

    text-decoration: none !important;

    box-shadow: 0 5px 18px rgba(11, 93, 70, 0.08) !important;

    transition: all 0.25s ease !important;
}

.services .modern-actions-container .action-pill:hover {
    transform: translateY(-4px) !important;
    border-color: var(--service-color) !important;
    box-shadow: 0 12px 28px rgba(11, 93, 70, 0.14) !important;
}

.services .modern-actions-container .pill-icon {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 0 0 14px !important;
    padding: 0 !important;

    border-radius: 50% !important;

    background: var(--service-color) !important;
    color: #ffffff !important;

    font-size: 23px !important;
    line-height: 1 !important;

    flex-shrink: 0 !important;

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12) !important;
}

.services .modern-actions-container .pill-text {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;

    min-width: 0 !important;
    flex: 1 !important;

    text-align: right !important;
}

.services .modern-actions-container .pill-title {
    display: block !important;

    color: #0B5D46 !important;

    font-family: Tahoma, Arial, sans-serif !important;

    font-size: 15px !important;
    font-weight: 700 !important;

    line-height: 1.5 !important;
}

.services .modern-actions-container .pill-subtitle {
    display: block !important;

    margin-top: 3px !important;

    color: #7b8580 !important;

    font-family: Tahoma, Arial, sans-serif !important;

    font-size: 11px !important;
    line-height: 1.4 !important;
}

@media (max-width: 600px) {

    .services .modern-actions-container {
        padding: 0 15px !important;
        gap: 12px !important;
    }

    .services .modern-actions-container .action-pill {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 340px !important;
        height: 72px !important;
    }

    .services .modern-actions-container .pill-icon {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        max-width: 50px !important;
        font-size: 21px !important;
    }
}

/* =========================================================
   الكتب المدرسية - التصميم الحديث
========================================================= */

.school-books-page {
    padding: 55px 0 80px;
    background: #FFFDF7;
}

.school-books-header {
    text-align: center;
    margin-bottom: 45px;
}

.school-books-kicker {
    display: inline-block;
    color: #0B5D46;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.school-books-header h1 {
    margin: 0;
    color: #24323A;
    font-size: 36px;
    font-weight: 800;
}

.school-books-header p {
    margin: 12px 0 0;
    color: #7A8589;
    font-size: 16px;
}

/* شبكة الصفوف */

.school-grades-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

/* بطاقة الصف */

.school-grade-card {
    background: #fff;
    border: 1px solid #EAE6DC;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 8px 28px rgba(30, 60, 50, .07);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
}

.school-grade-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 35px rgba(30, 60, 50, .11);
}

/* رأس الصف */

.school-grade-header {
    display: flex;
    align-items: center;
    gap: 13px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid #EEEAE1;
}

.school-grade-number {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #0B5D46;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 800;
}

.school-grade-header span {
    display: block;
    color: #89918F;
    font-size: 12px;
    margin-bottom: 2px;
}

.school-grade-header h2 {
    margin: 0;
    color: #24323A;
    font-size: 20px;
}

/* كتب الفصل */

.school-grade-books {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.school-book-item {
    background: #FAF9F5;
    border: 1px solid #EEEAE1;
    border-radius: 17px;
    overflow: hidden;
}

.school-book-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #F1EFE8;
    overflow: hidden;
}

.school-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.school-book-item:hover .school-book-cover img {
    transform: scale(1.025);
}

.school-book-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B5D46;
    font-size: 42px;
}

.school-book-content {
    padding: 14px;
}

.school-term-label {
    display: inline-block;
    color: #0B5D46;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
}

.school-book-content h3 {
    margin: 0 0 13px;
    color: #26363A;
    font-size: 15px;
    line-height: 1.7;
    min-height: 25px;
}

.school-book-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 11px;
    background: #0B5D46;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.school-book-button:hover {
    background: #084A39;
    transform: translateY(-1px);
}

/* لا كتب */

.school-books-empty {
    max-width: 600px;
    margin: 30px auto;
    padding: 55px 25px;
    text-align: center;
    background: #fff;
    border: 1px solid #EAE6DC;
    border-radius: 22px;
}

.school-books-empty i {
    font-size: 42px;
    color: #0B5D46;
    margin-bottom: 15px;
}

.school-books-empty h2 {
    margin: 0 0 8px;
    color: #24323A;
}

.school-books-empty p {
    margin: 0;
    color: #7A8589;
}

/* =========================================================
   لوحة التحكم - الكتب
========================================================= */

.books-admin-page {
    max-width: 1250px;
    margin: 0 auto;
}

.books-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.books-admin-header h1 {
    margin: 0 0 6px;
}

.books-admin-header p {
    margin: 0;
    color: #777;
}

.books-add-btn,
.books-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
}

.books-add-btn {
    background: #0B5D46;
    color: #fff !important;
}

.books-back-btn {
    background: #EEF2EF;
    color: #0B5D46 !important;
}

.books-alert {
    padding: 15px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.books-alert-success {
    background: #E7F5EC;
    color: #17683D;
    border: 1px solid #C8E8D2;
}

.books-alert-error {
    background: #FFF0F0;
    color: #8A2630;
    border: 1px solid #F2C9CD;
}

.books-alert ul {
    margin: 8px 0 0;
    padding-right: 20px;
}

.book-form {
    background: #fff;
    border: 1px solid #E8E5DD;
    border-radius: 18px;
    padding: 25px;
}

.book-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.book-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-field-full {
    grid-column: 1 / -1;
}

.book-field label {
    font-weight: 700;
    color: #26363A;
}

.book-field input,
.book-field select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #D9D8D2;
    border-radius: 10px;
    padding: 12px 13px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
}

.book-field input:focus,
.book-field select:focus {
    outline: none;
    border-color: #0B5D46;
    box-shadow: 0 0 0 3px rgba(11, 93, 70, .08);
}

.book-field small {
    color: #8A9290;
    font-size: 12px;
}

.book-check {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    background: #F8F8F5;
    padding: 13px;
    border-radius: 10px;
}

.book-check input {
    width: auto;
}

.book-form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

.book-save-btn,
.book-cancel-btn {
    border: 0;
    padding: 12px 22px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}

.book-save-btn {
    background: #0B5D46;
    color: #fff;
}

.book-cancel-btn {
    background: #EEF0EF;
    color: #45514D !important;
}

.book-current-thumbnail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #555;
    font-weight: 700;
}

.book-current-thumbnail img {
    width: 150px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #E4E1D9;
}

/* قائمة الإدارة */

.admin-grade-card {
    background: #fff;
    border: 1px solid #E8E5DD;
    border-radius: 18px;
    margin-bottom: 24px;
    overflow: hidden;
}

.admin-grade-title {
    padding: 16px 20px;
    background: #F7F8F5;
    border-bottom: 1px solid #E8E5DD;
    color: #0B5D46;
    font-size: 18px;
    font-weight: 800;
}

.admin-books-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding: 18px;
}

.admin-book-card {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    border: 1px solid #E8E5DD;
    border-radius: 14px;
    padding: 14px;
}

.admin-book-thumb {
    width: 85px;
    height: 112px;
    flex: 0 0 85px;
    object-fit: cover;
    border-radius: 9px;
    background: #F2F1EC;
}

.admin-book-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0B5D46;
    font-size: 28px;
}

.admin-book-info {
    flex: 1;
    min-width: 0;
}

.admin-book-term {
    display: inline-block;
    color: #0B5D46;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 5px;
}

.admin-book-info h3 {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.6;
}

.admin-status-active,
.admin-status-off {
    font-size: 12px;
    font-weight: 700;
}

.admin-status-active {
    color: #198754;
}

.admin-status-off {
    color: #C0392B;
}

.admin-book-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-book-actions a,
.admin-book-actions button {
    min-width: 78px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    text-align: center;
    text-decoration: none !important;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

.admin-open-btn {
    background: #E8F4EE;
    color: #0B5D46 !important;
}

.admin-edit-btn {
    background: #E8F0FF;
    color: #1761C9 !important;
}

.admin-delete-btn {
    background: #FCE9E9;
    color: #C0392B;
}

.admin-empty-books {
    background: #fff;
    border: 1px dashed #D9D7D0;
    border-radius: 18px;
    text-align: center;
    padding: 55px 20px;
    color: #777;
}

.admin-empty-books i {
    color: #0B5D46;
    font-size: 40px;
    margin-bottom: 12px;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1100px) {

    .school-grades-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 850px) {

    .school-grades-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-books-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 650px) {

    .school-books-page {
        padding: 35px 0 55px;
    }

    .school-books-header h1 {
        font-size: 28px;
    }

    .school-grades-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .school-grade-card {
        padding: 16px;
    }

    .book-form-grid {
        grid-template-columns: 1fr;
    }

    .book-field-full {
        grid-column: auto;
    }

    .books-admin-header {
        align-items: stretch;
        flex-direction: column;
    }

    .books-add-btn,
    .books-back-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .admin-book-card {
        flex-wrap: wrap;
    }

    .admin-book-actions {
        width: 100%;
        flex-direction: row;
    }

    .admin-book-actions a,
    .admin-book-actions button {
        flex: 1;
    }

}
/* =========================================================
   تحسين الشعار والهيدر
========================================================= */

.main-navbar {
    background: #FAF6ED;
    border-bottom: 1px solid #EBDCB8;
    padding: 10px 0;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    position: relative;
    z-index: 100;
}


.navbar-inner {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;
}


.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    flex-shrink: 0;
}


.navbar-logo {
    width: auto;
    height: 72px;

    max-width: 150px;

    object-fit: contain;

    display: block;

    transition: transform 0.25s ease;
}


.navbar-brand:hover .navbar-logo {
    transform: scale(1.03);
}


/* =========================================================
   قائمة الهيدر
========================================================= */

.navbar-menu {

    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 5px;

    list-style: none;

    margin: 0;

    padding: 0;

    flex-wrap: nowrap;
}


.navbar-menu li {
    margin: 0;

    white-space: nowrap;
}


.navbar-menu a {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 8px 16px;

    border-radius: 50px;

    text-decoration: none;

    color: #0B4635;

    font-family: 'Cairo', Tahoma, Arial, sans-serif;

    font-size: 13px;

    font-weight: 700;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.navbar-menu a:hover {

    background: rgba(192, 139, 50, 0.10);

    color: #A87524;

    transform: translateY(-1px);
}


.navbar-menu a.active {

    background: #C08B32;

    color: #ffffff;

    box-shadow:
        0 4px 12px rgba(11, 70, 53, 0.18);
}


.navbar-menu a i {

    font-size: 12px;
}


/* =========================================================
   التابلت
========================================================= */

@media (max-width: 900px) {

    .navbar-inner {
        gap: 15px;
    }


    .navbar-logo {
        height: 62px;

        max-width: 125px;
    }


    .navbar-menu {
        gap: 2px;
    }


    .navbar-menu a {

        padding: 7px 10px;

        font-size: 12px;
    }

}


/* =========================================================
   الجوال
========================================================= */

@media (max-width: 650px) {

    .main-navbar {

        padding: 8px 0;
    }


    .navbar-inner {

        width: 94%;

        flex-direction: column;

        justify-content: center;

        gap: 7px;
    }


    .navbar-brand {

        width: 100%;
    }


    .navbar-logo {

        height: 55px;

        max-width: 115px;
    }


    .navbar-menu {

        width: 100%;

        justify-content: center;

        overflow-x: auto;

        scrollbar-width: none;

        padding-bottom: 2px;
    }


    .navbar-menu::-webkit-scrollbar {
        display: none;
    }


    .navbar-menu a {

        padding: 6px 11px;

        font-size: 11px;

        gap: 5px;
    }


    .navbar-menu a i {

        font-size: 10px;
    }

}

/* =========================================================
   شعار الموقع - من لوحة التحكم
========================================================= */

.main-navbar {
    background: #FAF6ED;
    border-bottom: 1px solid #EBDCB8;
    padding: 10px 0;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
}


.navbar-inner {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;
}


.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    flex-shrink: 0;
}


.navbar-logo {
    display: block;

    width: auto;
    height: 72px;

    max-width: 150px;

    object-fit: contain;

    transition: transform 0.25s ease;
}


.navbar-brand:hover .navbar-logo {
    transform: scale(1.03);
}


/* =========================================================
   قائمة الموقع
========================================================= */

.navbar-menu {
    display: flex;

    align-items: center;
    justify-content: flex-start;

    gap: 5px;

    list-style: none;

    margin: 0;
    padding: 0;

    flex-wrap: nowrap;
}


.navbar-menu li {
    margin: 0;
    white-space: nowrap;
}


.navbar-menu a {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 8px 16px;

    border-radius: 50px;

    text-decoration: none;

    color: #0B4635;

    font-family: 'Cairo', Tahoma, Arial, sans-serif;

    font-size: 13px;
    font-weight: 700;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.navbar-menu a:hover {
    background: rgba(192, 139, 50, 0.10);
    color: #A87524;
    transform: translateY(-1px);
}


.navbar-menu a.active {
    background: #C08B32;
    color: #ffffff;

    box-shadow:
        0 4px 12px rgba(11, 70, 53, 0.18);
}


.navbar-menu a i {
    font-size: 12px;
}


/* =========================================================
   التابلت
========================================================= */

@media (max-width: 900px) {

    .navbar-inner {
        gap: 15px;
    }

    .navbar-logo {
        height: 62px;
        max-width: 125px;
    }

    .navbar-menu {
        gap: 2px;
    }

    .navbar-menu a {
        padding: 7px 10px;
        font-size: 12px;
    }
}


/* =========================================================
   الجوال
========================================================= */

@media (max-width: 650px) {

    .main-navbar {
        padding: 8px 0;
    }

    .navbar-inner {
        width: 94%;

        flex-direction: column;

        justify-content: center;

        gap: 7px;
    }

    .navbar-brand {
        width: 100%;
    }

    .navbar-logo {
        height: 55px;
        max-width: 115px;
    }

    .navbar-menu {
        width: 100%;

        justify-content: center;

        overflow-x: auto;

        scrollbar-width: none;

        padding-bottom: 2px;
    }

    .navbar-menu::-webkit-scrollbar {
        display: none;
    }

    .navbar-menu a {
        padding: 6px 11px;
        font-size: 11px;
        gap: 5px;
    }

    .navbar-menu a i {
        font-size: 10px;
    }
}
/* =========================================================
   1. إعدادات الشريط العلوي (Navbar)
========================================================= */
.main-navbar {
    padding: 10px 0 !important;
}

.navbar-inner {
    min-height: 80px !important;
    display: flex !important;
    align-items: center !important;
}

/* =========================================================
   2. الشعار الرئيسي (Main Logo) - تكبير وتناسق
========================================================= */
.navbar-logo {
    width: 220px !important; /* تكبير الشعار */
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    transition: width 0.3s ease !important; /* انتقال سلس عند تغيير حجم الشاشة */
}

/* =========================================================
   3. تحسينات بطاقات الصفوف (Grade Cards)
========================================================= */
.grade-card {
    background-color: #ffffff !important;
    border-radius: 16px !important; /* حواف دائرية ناعمة */
    padding: 25px 15px 20px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important; /* ظل خفيف */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    height: 100% !important; /* جعل جميع البطاقات بنفس الطول */
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* تأثير عند تمرير الماوس على البطاقة (للكمبيوتر) */
.grade-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

/* شعار المقررات داخل البطاقة */
.grade-card .grade-logo {
    width: 150px !important; /* تكبير الشعار داخل البطاقة */
    max-width: 85% !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto 15px !important; /* مسافة أفضل أسفل الشعار */
}

/* تقليل الفراغ بين النصوص وأزرار الفصول */
.grade-card h3, 
.grade-card h4 {
    margin: 5px 0 15px !important;
    text-align: center !important;
}

/* حاوية أزرار الفصول */
.grade-card .grade-terms {
    width: 100% !important;
    margin-top: auto !important; /* دفع الأزرار دائماً للأسفل لتوحيد شكل البطاقات */
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important; /* مسافة بين زر الفصل الأول والثاني */
}

/* =========================================================
   4. التجاوب مع الشاشات (Media Queries) - تم دمجها لتقليل الكود
========================================================= */

/* الشاشات المتوسطة والتابلت (أقل من 900px) */
@media (max-width: 900px) {
    .main-navbar { padding: 8px 0 !important; }
    .navbar-logo { width: 180px !important; }
    
    .grade-card { padding: 20px 12px 15px !important; }
    .grade-card .grade-logo { width: 130px !important; margin-bottom: 12px !important; }
}

/* الجوال (أقل من 650px) */
@media (max-width: 650px) {
    .navbar-inner { min-height: auto !important; gap: 8px !important; }
    .navbar-brand { 
        height: auto !important; 
        display: flex !important; 
        align-items: center !important; 
        justify-content: center !important; 
    }
    .navbar-logo { width: 155px !important; }
    
    .grade-card { border-radius: 12px !important; }
    .grade-card .grade-logo { width: 115px !important; margin-bottom: 10px !important; }
    .grade-card h3, .grade-card h4 { margin-bottom: 10px !important; font-size: 1.1rem !important; }
    .grade-card .grade-terms { gap: 8px !important; }
}

/* الجوال الصغير جدًا (أقل من 400px) */
@media (max-width: 400px) {
    .navbar-logo { width: 140px !important; }
    .grade-card .grade-logo { width: 100px !important; }
}
/* =========================================================
   TAJAWAL - نظام الخط الموحد للموقع
========================================================= */

html,
body {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 400;
}


/* النصوص العامة */

p,
span,
li,
label {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 400;
}


/* العناوين الرئيسية */

h1 {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 900 !important;
}


/* عناوين الأقسام */

h2,
.section-title {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 800 !important;
}


/* عناوين البطاقات */

h3,
h4,
h5,
h6,
.grade-card h4,
.service-card h3,
.lesson-title,
.pill-title {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 800 !important;
}


/* النصوص المتوسطة */

.subtitle,
.description,
.pill-subtitle {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 500 !important;
}


/* الأزرار والقوائم */

a,
button,
.grade-btn,
.service-btn,
.navbar-menu a {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 700 !important;
}


/* الأرقام */

.grade-number {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 700 !important;
}


/* الحقول */

input,
textarea,
select,
option {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 400 !important;
}


/* =========================================================
   HERO HTML
========================================================= */

.hero-html-title {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 900 !important;
}

.hero-html-subtitle {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 800 !important;
}

.hero-html-button {
    font-family: 'Tajawal', Tahoma, Arial, sans-serif !important;
    font-weight: 700 !important;
}
/* =========================================================
   تنسيق وتحسين بطاقات الصفوف (3 أعمدة في الجوال إجباري)
========================================================= */

/* فرض 3 أعمدة على حاوية البطاقات في الجوال */
@media (max-width: 650px) {
    .grades-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; /* 3 أعمدة جنباً إلى جنب */
        gap: 4px !important; /* مسافة ضيقة جداً ومناسبة للشاشات الصغيرة */
        width: 100% !important;
        padding: 0 4px !important;
    }

    /* تصغير حجم البطاقة بشكل كامل لتتاسب مع الأعمدة الثلاثة */
    .grades-grid .grade-card {
        background-color: #ffffff !important;
        border-radius: 8px !important;
        padding: 8px 3px 6px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: auto !important;
        min-height: 110px !important;
        margin: 0 !important;
    }

    /* شعار المقررات داخل البطاقة مصغر جداً */
    .grades-grid .grade-card .grade-logo {
        width: 45px !important;
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        margin: 0 auto 2px !important;
    }

    /* رقم الصف */
    .grades-grid .grade-card .grade-number {
        font-size: 0.75rem !important;
        font-weight: bold !important;
        margin-bottom: 1px !important;
        color: #0B4635 !important;
    }

    /* اسم الصف */
    .grades-grid .grade-card h3, 
    .grades-grid .grade-card h4 {
        margin: 0 0 5px !important;
        text-align: center !important;
        font-size: 0.65rem !important; /* خط صغيراً ومناسباً */
        line-height: 1.1 !important;
    }

    /* حاوية أزرار الفصول */
    .grades-grid .grade-card .grade-terms {
        width: 100% !important;
        margin-top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 3px !important;
    }

    /* أزرار الفصول مضغوطة لتناسب عرض الأعمدة الثلاثة */
    .grades-grid .grade-card .grade-terms .grade-btn,
    .grades-grid .grade-card .grade-terms a {
        padding: 3px 2px !important;
        font-size: 0.55rem !important;
        border-radius: 4px !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        white-space: nowrap !important;
    }

    .grades-grid .grade-card .grade-terms .grade-btn i {
        font-size: 0.5rem !important;
    }
}

/* =========================================================
الصفحات العامة الديناميكية
========================================================= */

.dynamic-page {
width: 100%;
padding: 45px 20px 70px;
direction: rtl;
}

.dynamic-page-container {
width: 95%;
max-width: 1050px;
margin: 0 auto;
}

/* =========================================================
العنوان
========================================================= */

.dynamic-page-header {
text-align: center;
margin-bottom: 30px;
}

.dynamic-page-label {
display: inline-flex;
align-items: center;
gap: 7px;
margin-bottom: 12px;
padding: 7px 15px;
border-radius: 30px;
background: rgba(11, 93, 70, .07);
color: #0B5D46;
font-size: 13px;
font-weight: 800;
}

.dynamic-page-header h1 {
margin: 0;
color: #24323A;
font-size: clamp(30px, 4vw, 44px);
line-height: 1.4;
font-weight: 900;
}

/* =========================================================
الصورة الرئيسية
========================================================= */

.dynamic-page-featured-image {
width: 100%;
margin-bottom: 28px;
text-align: center;
}

.dynamic-page-featured-image img {
width: auto;
max-width: 100%;
max-height: 500px;
object-fit: contain;
border-radius: 18px;
box-shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

/* =========================================================
المحتوى
========================================================= */

.dynamic-page-content {
padding: 35px;
background: #fff;
border: 1px solid rgba(0, 0, 0, .06);
border-radius: 20px;
box-shadow: 0 7px 28px rgba(0, 0, 0, .045);
color: #263238;
font-size: 17px;
line-height: 2;
text-align: right;
overflow-wrap: anywhere;
}

.dynamic-page-content p {
margin: 0 0 18px;
}

.dynamic-page-content h2 {
margin: 30px 0 13px;
color: #24323A;
font-size: 27px;
font-weight: 900;
line-height: 1.5;
}

.dynamic-page-content h3 {
margin: 25px 0 10px;
color: #24323A;
font-size: 22px;
font-weight: 900;
}

.dynamic-page-content h4 {
margin: 20px 0 8px;
font-size: 19px;
font-weight: 800;
}

.dynamic-page-content ul,
.dynamic-page-content ol {
margin: 18px 0;
padding-right: 30px;
}

.dynamic-page-content li {
margin-bottom: 8px;
}

.dynamic-page-content a {
color: #075c9c;
text-decoration: underline;
}

.dynamic-page-content img {
display: block;
max-width: 100%;
height: auto;
margin: 25px auto;
border-radius: 10px;
}

.dynamic-page-content blockquote {
margin: 25px 0;
padding: 15px 20px;
border-right: 4px solid #0B5D46;
background: #f6f8f9;
color: #555;
}

.dynamic-page-content table {
width: 100%;
border-collapse: collapse;
margin: 25px 0;
}

.dynamic-page-content th,
.dynamic-page-content td {
border: 1px solid #ddd;
padding: 10px;
}

.dynamic-page-content th {
background: #f5f7f6;
font-weight: 800;
}

/* =========================================================
الهاتف
========================================================= */

@media (max-width: 768px) {

```
.dynamic-page {
    padding: 30px 14px 50px;
}

.dynamic-page-container {
    width: 100%;
}

.dynamic-page-header {
    margin-bottom: 22px;
}

.dynamic-page-header h1 {
    font-size: 31px;
}

.dynamic-page-content {
    padding: 23px 18px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.9;
}

.dynamic-page-content h2 {
    font-size: 23px;
}

.dynamic-page-content h3 {
    font-size: 20px;
}

.dynamic-page-featured-image img {
    border-radius: 13px;
}
```

}
