/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: #fff;
    color: #000000;
    line-height: 1.5;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

.user-menu {
    list-style: none;
    display: flex;
    /* يخلي العناصر جنب بعض */
    gap: 15px;
    /* مسافة بينهم */
    margin: 0;
    padding: 0;
    align-items: center;
}

.user-menu li a {
    text-decoration: none;
    color: #fff;           /* غيرها حسب لون النافبار */
    font-weight: 600;
    transition: color 0.3s;
}

.user-menu li a:hover {
    color: #d9924a;        /* لون عند الهوفر */
}
/* Header */
.main-header {
    background-color: #452a06;
    color: #fff;
    padding: 15px 0;
}

.main-header a {
    color: #fff;
    text-decoration: none;
}

.main-header a:hover {
    color: #ffcf85;
}

.user-menu li {
    list-style: none;
    margin: 0 10px;
}

.user-icon {
    width: 30px;
    height: 30px;
    margin-left: 10px;
}


.logout-menu {
    display: none;
    position: absolute;
    right: 0;
    margin-top: 10px;
    background-color: #222;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.logout-button {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.logout-button:hover {
    background-color: #c9302c;
}

.user-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .main-header nav {
        padding: 8px 10px;
    }

}

/* Hero */
.hero-logo {
    max-width: 300px;
    /* صغرنا اللوجو */
    height: auto;
    margin: 0 0 20px auto;
    /* خليه يزق نحية اليمين */
    display: block;
}

.hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 40px 20px;
    background-size: cover;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero .text {
    flex: 1 1 400px;
    padding: 10px 20px;
    position: relative;
    z-index: 2;
    text-align: right;
    /* خلى الكلام واللوجو لليمين */
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    opacity: 0.08;
    z-index: 1;
}


.hero .text h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #5C3A21;
}

.hero .text p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #6e4a2e;
}

.hero .text a.btn {
    display: inline-block;
    background: #d9924a;
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    transition: background 0.3s;
}

.hero .text a.btn:hover {
    background: #b07a3c;
}

.hero .image {
    flex: 1 1 300px;
    text-align: center;
    position: relative;
    z-index: 2;
}


.hero .text a.btn.brown-btn {
    background: #5c2a0e;
}

.hero .text a.btn.brown-btn:hover {
    background: #46220b;
}

.hero .image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* على الموبايل */
/* على الموبايل */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
    }

    .hero .image img {
        max-width: 120%;
        /* تكبير الصورة */
        margin: 0;
        /* شيل الأوتو */
        transform: translateX(10%);
        /* تزقها يمين */
    }
}

/* Full Background Section */
.full-bg-section {
    width: 100%;
    background-size: cover;
    padding: 30px 10px;
    overflow: hidden;
}

.full-bg-section .image-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.animated-img {
    width: 200px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1.2s ease;
}

.animated-img.show {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .animated-img {
        width: 100px;
    }
}

/* Study Years Slider */
.study-years-slider {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.study-year-card {
    flex: 1 1 30%;
    background: #5C3A21;
    color: #fff;
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.study-year-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;

}

.study-year-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    border-bottom: 2px solid #d9924a;
    display: inline-block;
    padding-bottom: 8px;
}

.study-year-card p {
    font-size: 1.1rem;
    line-height: 1.4;
    color: #f0e1c6;
}

@media (max-width: 768px) {
    .study-years-slider {
        flex-direction: column;
        align-items: center;
    }

    .study-year-card {
        width: 90%;
    }

    .study-year-card:active {
        transform: scale(0.97);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    }

    .study-year-card.expanded {
        background-color: #5C3A21;
        padding-bottom: 20px;
        transition: all 0.3s ease-in-out;
    }

}

/* General Section */
section {
    padding: 40px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

section h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #5C3A21;
    text-align: center;
}

/* Courses List */
.courses-list {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.course-card {
    flex: 1 1 calc(33.333% - 20px);
    background: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    transition: transform 0.3s;
    text-align: center;
}

.course-card:hover {
    transform: scale(1.02);
}

.course-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


.course-card .content {
    padding: 20px;
}

.course-card h3 {
    font-size: 1.4rem;
    color: #5C3A21;
    margin-bottom: 10px;
}

.course-card p {
    font-size: 1rem;
    color: #555;
}

@media (max-width: 768px) {
    .courses-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .course-card {
        width: 100%;
    }
}

/* Footer */
.custom-footer {
    position: relative;
    background-image: url('/assets/img/footer2.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 200px 20px 150px;
    overflow: hidden;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    max-width: 400px;
    z-index: 2;
}

.footer-content {
    position: relative;
    z-index: 3;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.social-icons img {
    width: 40px;
    height: 40px;
}

.footer-menu a {
    color: #fff;
    text-decoration: none;
    margin: 0 5px;
}

@media (max-width: 768px) {
    .footer-overlay {
        width: 300px;
    }
}

/* سييي بتاع الريجيستر */
/* Login Page Styles */
.login-container {
    display: flex;
    flex-direction: row-reverse;
    /* الصورة يمين */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 20px;
}

.login-form {
    flex: 1 1 400px;
    max-width: 500px;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.login-image {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-image img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        padding: 20px;
    }

    .login-form,
    .login-image {
        width: 100%;
        max-width: 100%;
    }

    .login-image {
        order: -1;
        /* تخلي الصورة فوق */
    }

    .login-image img {
        max-width: 90%;
        height: auto;
    }
}


/* سييي بتاع ملف الكورسات */

main {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 600px;
}

.video-section {
    flex: 1 1 65%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.video-section video {
    width: 100%;
    height: 400px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgb(0 0 0 / 0.15);
    background: black;
}

.lecture-title {
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 10px;
}

.lecture-list-container {
    background: #fff3e6;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
    padding: 15px 20px;
    max-height: 300px;
    overflow-y: auto;
}

.lecture-list {
    list-style: none;
    padding: 0;
}

.lecture-list li {
    padding: 10px;
    border-bottom: 1px solid #e8d3b0;
    cursor: pointer;
}

.lecture-list li:hover {
    background: #ffdca3;
}

.lecture-list li.active {
    background: #f5b637;
    color: white;
}


.lecture-list li.active {
    background: #d9924a;
    color: white;
}

.lesson-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    /* مسافة بين الصور */
    justify-content: center;
    margin-top: 30px;
}

.lesson-image {
    width: 80%;
    max-width: 80%;
    cursor: pointer;
    display: block;
}

.lesson-box {
    flex: 0 0 45%;
    max-width: 45%;
}


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

.type-options button {
    margin-right: 5px;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.azhar-btn {
    background-color: #ffcf85;
    color: #211009;
    font-weight: bold;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.aam-btn {
    background-color: #211009;
    color: #ffcf85;
    font-weight: bold;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.azhar-btn:hover {
    background-color: #e6b873;
}

.aam-btn:hover {
    background-color: #3a1d0c;
}

.type-options {
    margin-right: 10px;
    display: inline-flex;
    gap: 8px;
}

.toggle-btn:hover {
    color: #f5b637;
}

.toggle-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.toggle-arrow.open {
    transform: rotate(90deg);
}

.instructor-section {
    flex: 1 1 35%;
    background: #fff3e6;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgb(0 0 0 / 0.1);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.instructor-section img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgb(0 0 0 / 0.15);
}

.recommended-courses {
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

.recommended-courses h3 {
    color: #5C3A21;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 22px;
}

.courses-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.courses-list a {
    flex: 1 1 200px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgb(0 0 0 / 0.1);
    color: #5C3A21;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.3s;
}

.courses-list a:hover {
    box-shadow: 0 6px 15px rgb(0 0 0 / 0.2);
}

.courses-list img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    height: 120px;
    object-fit: cover;
}

/* Scrollbar for lecture list */
.lecture-list-container::-webkit-scrollbar {
    width: 8px;
}

.lecture-list-container::-webkit-scrollbar-thumb {
    background-color: #f7a600;
    border-radius: 10px;
}

.lecture-list-container::-webkit-scrollbar-track {
    background: #fff3e6;
}

.courses-list a {
    flex: 1 1 250px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgb(0 0 0 / 0.1);
    color: #5C3A21;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.3s;
    font-size: 18px;
}

.courses-list img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
    height: 160px;
    object-fit: cover;
}

/* حجز الدرس */

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

.main-header .logo img {
    height: 60px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 60px 20px;
    flex-wrap: wrap;
}

.login-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.login-form h2 {
    margin-bottom: 20px;
    color: #5C3A21;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-form input,
.login-form select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.login-form button {
    width: 100%;
    padding: 14px;
    background-color: #5C3A21;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.login-form button:hover {
    background-color: #7a4e2b;
}

.login-image img {
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}


.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons img {
    width: 50px;
    height: 50px;
}

/* صفحه الكورسات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

.main-header .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header .logo img {
    height: 45px;
    width: auto;
}

/* Courses Section */
.courses-container {
    padding: 40px;
    background-color: #f9f9f9;
    direction: rtl;
    /* لأن المحتوى بالعربي */
}

.courses-title {
    font-size: 2rem;
    color: #5C3A21;
    text-align: right;
    /* أو center حسب التصميم */
    margin-bottom: 30px;
    font-weight: bold;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.course-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.course-image {
    width: 100%;
    height: auto;
}

.course-content {
    padding: 15px;
}

.course-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.course-description {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #666;
}

.course-button {
    display: inline-block;
    background-color: #3a2311;
    /* اللون الأساسي للزرار */
    color: #fff;
    /* لون الخط */
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s ease;
}

.course-button:hover {
    background-color: #5c3520;
    /* لون أغمق عند الوقوف */
}


/* === تفرعات الألوان === */
.course-button.orange {
    background-color: #FF8C00;
}

.course-button.orange:hover {
    background-color: #e67e00;
}

.course-button.brown {
    background-color: #d9924a;
}

.course-button.brown:hover {
    background-color: #b07a3c;
}

a.course-button {
    display: inline-block;
    background-color: #3a2311 !important;
    /* اللون الأساسي */
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}

a.course-button:hover {
    background-color: #5c3520 !important;
    /* أغمق عند المرور */
}

/* ملف الكورسات المتاحه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

.main-header .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header .logo img {
    height: 45px;
    width: auto;
}

/* Courses Section */
.courses-title {
    text-align: center;
    color: #5C3A21;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.course-card {
    background: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgb(0 0 0 / 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-8px);
}

.course-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.course-content {
    padding: 20px 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-weight: 700;
    font-size: 1.3rem;
    color: #5C3A21;
    margin-bottom: 12px;
}

.course-description {
    flex-grow: 1;
    font-size: 1rem;
    color: #5a4b3d;
    margin-bottom: 15px;
}

/* كونتاكت */
.register-page {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 40px 20px;
    max-width: 1100px;
    margin: 40px auto;
    gap: 30px;
}

.register-form {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.register-form h2 {
    margin-bottom: 20px;
    color: #5C3A21;
}

.register-form label {
    margin-top: 10px;
    font-weight: bold;
}

.register-form input,
.register-form select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

.register-form button {
    margin-top: 20px;
    padding: 12px;
    background-color: #d9924a;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.register-form button:hover {
    background-color: #b07a3c;
}

.register-page {
    display: flex;
    flex-direction: row-reverse;
    /* الصورة يمين على الشاشات الكبيرة */
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 20px;
}

.register-form {
    flex: 1 1 400px;
    max-width: 500px;
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.register-image {
    flex: 1 1 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.register-image img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ✅ على الموبايل: خلي الصورة فوق */
@media (max-width: 768px) {
    .register-page {
        display: flex;
        flex-direction: column;
        /* يجعل الصورة فوق الفورم */
        align-items: center;
        padding: 20px;
        gap: 20px;
    }

    .register-image {
        order: -1;
        /* يجعل الصورة تظهر قبل الفورم */
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .register-image img {
        max-width: 90%;
        height: auto;
        object-fit: contain;
    }

    .register-form {
        width: 100%;
        max-width: 500px;
    }
}


/* ادمين */
h1,
h2 {
    text-align: center;
    color: #333;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
}

.stat-box {
    flex: 1;
    background-color: #f7a600;
    margin: 0 10px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-box h3 {
    font-size: 28px;
    color: #5C3A21;
    margin: 0;
}

.stat-box p {
    margin-top: 10px;
    font-size: 16px;
    color: #555;
}

form {
    display: flex;
    flex-direction: column;
}

form label {
    margin-top: 15px;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

form input[type="text"],
form select,
form textarea,
form input[type="file"] {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
}

form textarea {
    resize: vertical;
    min-height: 100px;
}

form button[type="submit"],
button[type="button"] {
    margin-top: 25px;
    padding: 12px;
    background-color: #5C3A21;
    color: #fff;
    border: none;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form button[type="submit"]:hover,
button[type="button"]:hover {
    background-color: #b07a3c;
}

/* نجاح */
.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
}

/* خطأ */
.alert-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 600;
}

.alert-error ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* شبكة مرنة لعرض الكورسات بشكل منظم */
.courses-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    justify-content: center;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 15px;
}

/* شكل الكارت */
.courses-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    justify-content: center;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 15px;
}

.course-item {
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.course-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.course-item img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.course-item:hover img {
    transform: scale(1.05);
}

/* ===== Students Table Custom Styles ===== */
.students-table-wrapper {
    background: #fff3e6;
    /* نفس خلفية النماذج الأخرى. */
    border: 2px solid #d9924a;
    /* نفس البرتقالي-البني الأساسى. */
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, .12);
    padding: 2rem 1.5rem;
}

.students-table-wrapper h4 {
    color: #5C3A21;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.students-table thead {
    background: #5C3A21;
    color: #fff;
}

.students-table tbody tr:nth-child(even) {
    background: #fff8f0;
}

.students-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.students-table tbody tr:hover {
    background: #d9924a;
    color: #fff;
    transition: background .3s ease;
}

.students-table .badge {
    background: #f7a600;
    color: #5C3A21;
    padding: .45rem 1.1rem;
    font-size: .9rem;
    border-radius: 50px;
}

.swap-container {
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
}

.swap-container img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.swap-container:hover .img1 {
    transform: translateX(-100%);
}

.swap-container:hover .img2 {
    transform: translateX(0);
}

.img1 {
    transform: translateX(0);
    z-index: 2;
}

.img2 {
    transform: translateX(100%);
    z-index: 1;
}

/* التحكم في مقاس كلمه الكورسات المكقترحه*/
@media (max-width: 768px) {
    section[aria-label="سنوات الدراسة"] img {
        max-width: 90% !important;
    }
}

@media (max-width: 768px) {
    section[aria-label="الدورات المتاحه"] img {
        max-width: 90% !important;
    }
}

.blocked-button {
    background-color: #d9924a;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .course-item img {
        margin-right: 10px;
    }
}

#video-container {
    width: 100%;
    min-height: 220px;
    /* 👈 ارتفاع ثابت يمنع الانكماش */
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding: 10px;
    position: relative;
}

#video-container p {
    margin: 0;
    font-size: 18px;
    color: #555;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 نسبة الفيديو */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {

    #video-container iframe,
    #video-container video {
        aspect-ratio: 16 / 9;
        width: 100%;
        height: auto;
    }

    .video-section {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    .video-section+div {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .lecture-list {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

.korsatna-img {
    display: block;
    margin: 10px auto 20px auto;
    max-width: 50%;
    height: auto;
}

/* للموبايلات */
@media (max-width: 576px) {
    .korsatna-img {
        max-width: 100%;
    }
}

/* للأجهزة المتوسطة - تابلت مثلاً */
@media (min-width: 577px) and (max-width: 991px) {
    .korsatna-img {
        max-width: 60%;
    }
}

/* لأجهزة الديسكتوب */
@media (min-width: 992px) {
    .korsatna-img {
        max-width: 40%;
    }
}

@media (max-width: 768px) {
    .video-section {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }

    section[aria-label="الدورات المتاحه"] {
        margin-top: -180px !important;
        padding-top: 0 !important;
    }
}

.type-options button {
    padding: 4px 12px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    transition: background 0.3s;
}

.type-options button:first-child {
    background-color: #d9924a;
    /* أزهر */
}

.type-options button:first-child:hover {
    background-color: #d17e00;
}

.type-options button:last-child {
    background-color: #d9924a;
    /* عام */
}

.type-options button:last-child:hover {
    background-color: #d17e00;
}

.type-options {
    display: inline-flex;
    gap: 20px;
    /* المسافة بين الزرين */
    margin-right: 15px;
    /* المسافة بين الزرار وكلمة "حل الأسئلة" */
    vertical-align: middle;
}

.lecture-list li {
    cursor: pointer;
    padding: 10px 15px;
    list-style: none;
    border-bottom: 1px solid #ddd;
}

.lecture-list li.active {
    background-color: #d9924a;
    color: white;
    font-weight: bold;
}

@media (min-width: 768px) {
    .lesson-box {
        flex: 0 0 30%;
        max-width: 30%;
    }
}

@media (min-width: 992px) {
    .lesson-images {
        margin-top: 100px !important;
    }
}

@keyframes perspectiveDownReturn {
    0% {
        transform: perspective(800px) rotateX(180deg);
        transform-origin: center top;
        opacity: 0;
    }

    100% {
        transform: perspective(800px) rotateX(0deg);
        transform-origin: center top;
        opacity: 1;
    }
}

.perspectiveDownReturn {
    animation-name: perspectiveDownReturn;
    animation-duration: 1s;
    animation-fill-mode: both;
}

.responsive-img {
    width: 190px;
}

@media (max-width: 768px) {
    .responsive-img {
        width: 45%;
    }

    /* ترتيب الصور على الموبايل */
    .order-0 {
        order: 0;
        width: 90%;
        margin: 0 auto;
    }

    /* صورة 3 في الأول لوحدها */
    .order-1 {
        order: 1;
    }

    .order-2 {
        order: 2;
    }

    .order-4 {
        order: 3;
    }

    .order-5 {
        order: 4;
    }
}

.year-box {
    width: 310px;
    cursor: pointer;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.5s ease;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.year-img {
    width: 100%;
    transition: all 0.3s ease;
}

.year-options {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px;
    transition: all 0.5s ease;
}

.year-box.expanded {
    padding-bottom: 20px;
    background-color: #f8f9fa;
}

.year-box.expanded .year-options {
    max-height: 100px;
    opacity: 1;
    margin-top: 10px;
}

.option-btn {
    background-color: #7a4e2b;
    color: white;
    padding: 10px 0;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.option-btn:hover {
    background-color: #7a4e2b;
}

@media (max-width: 768px) {
    .courses-section {
        padding-top: 80px !important;
    }

    .courses-section>div:first-child {
        margin-top: 30px;
    }
}

.exam-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    max-width: 750px;
    margin: 30px auto;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.exam-container h2 {
    text-align: center;
    color: #222;
    font-size: 24px;
    margin-bottom: 20px;
}

.instructions {
    background: #e6f4ff;
    padding: 12px;
    border-left: 5px solid #00ADB5;
    border-radius: 8px;
    margin-bottom: 25px;
    color: #333;
    font-size: 15px;
}

.question {
    background: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 18px;
    transition: box-shadow 0.3s ease;
}

.question:hover {
    box-shadow: 0 3px 10px rgba(0, 173, 181, 0.15);
}

.question-title {
    font-weight: bold;
    margin-bottom: 12px;
    color: #333;
    font-size: 16px;
}

.question label {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.question label:hover {
    background: #f0f8ff;
}

.question input[type="radio"] {
    accent-color: #d9924a;
    margin-right: 8px;
}

.feedback {
    margin-top: 8px;
    font-weight: bold;
    font-size: 14px;
    display: none;
}

.feedback.correct {
    color: #28a745;
    display: block;
}

.feedback.incorrect {
    color: #dc3545;
    display: block;
}

#submitQuiz {
    background: #d9924a;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    display: block;
    margin: 25px auto 0;
    transition: background 0.3s ease, transform 0.1s ease;
}

#submitQuiz:hover {
    background: #d9924a;
    transform: scale(1.03);
}

.exam-result {
    text-align: center;
    font-size: 19px;
    margin-top: 20px;
    font-weight: bold;
    color: #333;
}

section .image {
    margin-left: auto;
    margin-right: 0;
}
.exam-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.exam-result.error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين للموبايل */
@media (max-width: 768px) {
    .exam-container {
        margin: 15px;
        padding: 20px;
    }

    .exam-container h2 {
        font-size: 20px;
    }

    .question {
        padding: 12px;
    }

    #submitQuiz {
        width: 100%;
        padding: 15px;
    }
}