@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ================== المتغيرات (الألوان في مكان واحد) ================== */
:root{
    --dark: #0a0606;
    --text: #f3e9e9;
    --muted: #bfaaaa;
    --gold: #ffc400;
    --gold-light: #ffd84d;
    --beige: #120808;
    --line: #43191b;
}

/* ================== عام ================== */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', 'Poppins', sans-serif;
}
html{
    scroll-behavior: smooth;
}
body{
    min-height: 100vh;
    margin: 0;
    width: 100%;
    background: var(--beige);
    display: flex;
    flex-direction: column;
}
img,
video{
    max-width: 100%;
}
a:focus-visible,
button:focus-visible{
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ================== النافبار ================== */
nav{
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    height: 63px;
    background: var(--dark);
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.logo{
    width: 25%;
    height: 63px;
}
.img_adh{
    display: block;
    width: 100%;
    max-width: 370px;
    height: 63px;
    object-fit: contain;
    object-position: right center;
}
.start_1{
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 60%;
    gap: 20px;
}
.link{
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    color: white;
    text-decoration: none;
    font-size: 19px;
    font-weight: bold;
    padding: 8px 4px;
    transition: color 0.3s;
}
.link::before{
    content: '\F423';
    font-family: 'bootstrap-icons';
    font-weight: normal;
    margin-inline-end: 8px;
    transition-duration: 1s;
}
#link2::before{
    content: '\F194';
}
#link3::before{
    content: '\F32F';
}
.link:hover{
    text-shadow: 0 0 9px white;
}
/* الصفحة اللي انت فيها دلوقتي بتتلون بالدهبي */
.link[aria-current="page"]{
    color: var(--gold-light);
}

/* ================== الصفحة الرئيسية ================== */
.img{
    line-height: 0;
}
.img_wel{
    display: block;
    width: 100%;
    height: auto;
}
main{
    background-color: var(--beige);
    background-image: url('../image/WhatsApp Image 2026-10-15 at 8.52.57 AM.jpeg');
    background-size: cover;
    background-position: center top;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(28px, 5vw, 56px);
    padding: clamp(24px, 4vw, 44px) 16px clamp(40px, 6vw, 80px);
}
.text{
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}
.text_1,
.text_2{
    margin: auto;
}
.text_1{
    color: var(--text);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: bold;
}
.text_2{
    color: var(--muted);
}
.text_1::before{
    content: '\F27F';
    font-family: 'bootstrap-icons';
    color: var(--gold-light);
    margin-inline-end: 8px;
}
.text_1::after{
    content: '\F280';
    font-family: 'bootstrap-icons';
    color: var(--gold-light);
    margin-inline-start: 8px;
}

/* كروت المراحل */
.phase{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: min(1100px, 100%);
    justify-content: center;
    gap: clamp(20px, 5vw, 60px);
}
.child1,
.child2,
.child3{
    position: relative;
    flex: 1 1 240px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    border: 2px solid var(--line);
    padding: 30px;
    border-radius: 12px;
    background: var(--beige);
    transition: transform 0.3s, box-shadow 0.3s;
}
.child1:hover,
.child2:hover,
.child3:hover{
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(10,6,6, 0.12);
}
.icon1,
.icon2,
.icon3{
    text-align: center;
    font-size: 30px;
    line-height: 1.3;
}
.book{
    width: 30px;
}
.text_3,
.text_5,
.text_7{
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: var(--text);
}
.text_4,
.text_6,
.text_8{
    color: var(--muted);
    font-size: 16px;
}
.arrow{
    text-align: center;
    margin-top: 10px;
}
/* اللينك بيغطي الكارت كله عشان الكارت كله يبقى قابل للضغط */
.arrow a::after{
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
}
.arrow_1{
    display: block;
    width: 34px;
    padding: 5px;
    background: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 12px;
    transition-duration: 1s;
}
.child1:hover .arrow_1,
.child2:hover .arrow_1,
.child3:hover .arrow_1,
.arrow_1:hover{
    box-shadow: 0 0 7px 4px var(--gold);
}

/* مادة اللغة العربية */
.text1{
    display: flex;
    width: 100%;
    justify-content: center;
}
.text_9{
    color: var(--text);
    font-size: clamp(20px, 3vw, 28px);
    font-weight: bold;
    text-align: center;
}
.text_9::before{
    content: '\F27F';
    font-family: 'bootstrap-icons';
    color: var(--gold-light);
    margin-inline-end: 8px;
}
.text_9::after{
    content: '\F280';
    font-family: 'bootstrap-icons';
    color: var(--gold-light);
    margin-inline-start: 8px;
}
.arab{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: min(1100px, 100%);
    gap: clamp(14px, 3vw, 34px);
}
#img_1{
    display: block;
    width: clamp(180px, 22vw, 250px);
    height: auto;
}
.img_6{
    display: block;
    width: clamp(110px, 14vw, 165px);
    height: auto;
    transition: transform 0.3s;
}
.img_6:hover{
    transform: scale(1.05);
}

/* ================== صفحات المستويات ================== */
.parent{
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--beige);
}
aside{
    width: 22%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px 40px 40px 20px;
    align-self: flex-start;
    position: sticky;
    top: 83px;
    max-height: calc(100vh - 83px);
    overflow-y: auto;
}
.child10{
    width: 100%;
    background: transparent;
    font-size: 21px;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
    border: 2px solid var(--line);
    padding: 11px;
    border-radius: 18px;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.child10:hover{
    background: var(--card);
}
/* الزرار المختار دلوقتي */
.child10[aria-pressed="true"]{
    background: var(--dark);
    color: #fff;
    border-color: var(--dark);
}
/* سهم صغير على الزرار اللي ليه قايمة (بيلف لما القايمة تفتح) */
.child10[aria-expanded]::after{
    content: '\F229';
    font-family: 'bootstrap-icons';
    font-weight: normal;
    display: inline-block;
    font-size: 15px;
    margin-inline-start: 8px;
    transition: transform 0.3s;
}
.child10[aria-expanded="true"]::after{
    transform: rotate(180deg);
}

/* القايمة اللي بتفتح تحت كل سنة (النحو - الأدب - النصوص ...) */
.child4,
.child6,
.child8{
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sub4,
.sub6,
.sub8{
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-inline-start: 14px;
    padding-inline-start: 12px;
    border-inline-start: 2px solid var(--line);
}
.child11{
    width: 100%;
    background: transparent;
    font-size: 17px;
    font-weight: bold;
    color: var(--text);
    cursor: pointer;
    border: 2px solid transparent;
    padding: 8px 11px;
    border-radius: 12px;
    text-align: start;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.child11:hover{
    background: var(--card);
    border-color: var(--line);
}
/* القسم المختار دلوقتي */
.child11[aria-pressed="true"]{
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}
.line{
    width: 2px;
    flex-shrink: 0;
    align-self: stretch;
    background: var(--line);
}

/* المستويات: شبكة بتظبط عدد الأعمدة لوحدها */
.level1,
.level2,
.level3{
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    align-content: start;
    padding: 40px 30px 50px;
}
/* المستوى الأول ظاهر من الأول، والباقي بيظهر بالـ JS لما تدوس على الزرار */
.level2,
.level3{
    display: none;
}
/* كل قسم جوه السنة (part4_1 = أول سنة / أول قسم) بياخد الصف كله وجواه شبكة الفيديوهات */
[class^="part"]{
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    align-content: start;
}

/* كارت الفيديو (أي div جوه المستوى بياخد الشكل ده تلقائي) */
.level1 > div:not([class^="part"]),
.level2 > div:not([class^="part"]),
.level3 > div:not([class^="part"]),
[class^="part"] > div{
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(10,6,6, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}
.level1 > div:not([class^="part"]):hover,
.level2 > div:not([class^="part"]):hover,
.level3 > div:not([class^="part"]):hover,
[class^="part"] > div:hover{
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(10,6,6, 0.12);
}
.video1,
.video2,
.video3{
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
    border-radius: 10px;
}
.name1,
.name2,
.name3{
    color: var(--text);
    font-size: 16px;
    font-weight: bold;
    padding: 10px 6px 4px;
}

/* صور الامتحانات (exam1 = أولى / exam2 = تانية / exam3 = تالتة) */
.exam1,
.exam2,
.exam3{
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: var(--beige);
    border-radius: 10px;
}

/* مربع رفع ورقة الإجابة (up4_7 = أولى / امتحانات الشهر) */
[class^="up"]{
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
[class^="up"] > p{
    flex: 0 0 100%;
}
.user1,
.user2,
.user3,
.file1,
.file2,
.file3{
    flex: 1 1 180px;
    min-width: 0;
    padding: 10px 12px;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    font-size: 16px;
}
.file1,
.file2,
.file3{
    flex-basis: 240px;
    font-size: 15px;
    cursor: pointer;
}
.send1,
.send2,
.send3{
    padding: 10px 28px;
    background: var(--dark);
    color: #fff;
    border: 2px solid var(--dark);
    border-radius: 12px;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}
.send1:hover,
.send2:hover,
.send3:hover{
    background: var(--gold);
    border-color: var(--gold);
}
.note1,
.note2,
.note3{
    color: var(--muted);
    font-size: 14px;
    padding: 0 6px;
}
.note1:empty,
.note2:empty,
.note3:empty{
    display: none;
}
/* المربع ده مش بيتحرك لما الماوس يعدي عليه زي كروت الفيديو */
[class^="part"] > [class^="up"]:hover{
    transform: none;
    box-shadow: 0 4px 12px rgba(10,6,6, 0.06);
}

/* ================== الفوتر ================== */
.foot{
    width: 100%;
    margin-top: auto;
    padding: 28px 16px;
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
.foot_2{
    color: var(--gold-light);
    font-size: 20px;
    font-weight: bold;
}
.foot_3{
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: text-shadow 0.3s;
}
.foot_3:hover{
    text-shadow: 0 0 9px white;
}
.foot_4{
    color: #e3c6c6;
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce){
    *{
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* أيقونة رابط "حسابي" */
#link4::before{
    content: '\F4DA';
}

/* عنوان فرعي جوه قسم الامتحانات (امتحانات الشهر / امتحانات الحصة) ورسالة "مفيش حاجة لسه" */
.hd1,
.hd2,
.hd3{
    grid-column: 1 / -1;
    color: var(--text);
    font-size: 18px;
    margin: 6px 0 -6px;
}
.hint1,
.hint2,
.hint3{
    grid-column: 1 / -1;
    text-align: center;
    color: var(--muted);
    padding: 24px 8px;
}

/* الصورة التعريفية للكورس/الامتحان تملأ مربعها كله (بتتقص من الأطراف لو نسبتها مختلفة) */
img.cvr{
    object-fit: cover;
    background: var(--beige);
}
