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

body {
    background: #121212;
    color: #f5f0e1;
    line-height: 1.5;
    direction: rtl
}

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

.glow {
    animation: glow-effect 1.5s infinite alternate
}

@keyframes glow-effect {
    0% {
        box-shadow: 0 0 5px #d4af37, 0 0 10px #d4af37, 0 0 15px #d4af37
    }

    100% {
        box-shadow: 0 0 15px #ffd789, 0 0 20px #ffd789, 0 0 25px #ffd789
    }
}

.main-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 999;
    background: rgba(18, 18, 18, 0.95);
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0)
}

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

.main-header .logo img {
    height: 60px;
    width: auto;
    display: block
}

.main-header nav ul {
    list-style: none;
    display: flex;
    gap: 10px
}

.main-header nav ul li a {
    color: #ffd789;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s
}

.main-header nav ul li a:hover {
    color: #d4af37
}

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

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

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

.hero .text {
    flex: 1 1 400px;
    padding: 10px 20px;
    position: relative;
    z-index: 2
}

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

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

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

.hero .text a.btn:hover {
    background: #bfa330
}

.hero .text a.btn.brown-btn {
    background: #d4af37
}

.hero .text a.btn.brown-btn:hover {
    background: #bfa330
}

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

.hero .image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px
}

@media (max-width:768px) {
    .hero {
        flex-direction: column-reverse
    }
}

.full-bg-section {
    width: 100%;
    background-color: #1e1e1e;
    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: 320px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-in-out
}

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

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

.animated-img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 20px #ffd789);
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 2
}

.study-years-slider {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px
}

.study-year-card {
    flex: 1 1 30%;
    background: #1e1e1e;
    color: #f5f0e1;
    border-radius: 15px;
    padding: 30px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s
}

.study-year-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6)
}

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

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

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

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

.courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px
}

.course-card {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5)
}

.course-card img {
    width: 100%;
    height: auto;
    object-fit: contain
}

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

.course-card .content h3 {
    color: #d4af37;
    margin-bottom: 10px;
    font-size: 1.2rem
}

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

.custom-footer {
    position: relative;
    background-image: url('/assets/img/شريط-2.png');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 100px 20px 80px;
    overflow: hidden
}

.footer-logo {
    position: relative;
    top: -80px;
    /* رفع اللوجو لفوق */
    margin-bottom: 10px;
}

.footer-overlay {
    width: 300px;
    height: auto;
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10
}

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

.footer-logo-second {
    max-width: 400px;
    height: auto;
    margin: -200px auto 55px;
    display: block;
    position: relative;
    z-index: 5;
    transform: scale(1) translateY(50px);
    transform-origin: center
}


.social-icons {
    display: flex;
    justify-content: center;
    gap: 40px;
    /* كان 150px */
    flex-wrap: wrap;
    margin: 0 auto 30px;
    /* رفعهم لفوق */
    position: relative;
    top: -100px;
}

.social-icons img {
    width: 30px;
    height: 30px;
    position: relative;
    top: 0;
    /* إلغاء التحريك بالسالب */
}


.social-icons a {
    z-index: 21;
    position: relative
}

.footer-menu a {
    color: #d4af37;
    text-decoration: none;
    margin: 0 5px;
    background: url('images/bacg.png') no-repeat center center
}

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

@media (max-width:768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 20px 10px
    }

    .hero .text h1 {
        font-size: 1.6rem
    }

    .hero .text p {
        font-size: 1rem
    }

    .hero .text a.btn {
        width: 90%;
        margin: 10px auto;
        display: block
    }

    .hero .image img {
        max-width: 90%;
        margin: 0 auto
    }
}

.full-bg-section.no-padding {
    padding: 0
}

.full-square-image {
    width: 100%;
    height: auto;
    display: block
}

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

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

@media (max-width:768px) {
    .courses-list {
        grid-template-columns: 1fr
    }

    .course-card img {
        height: auto
    }
}

@media (max-width:768px) {
    .custom-footer {
        padding: 50px 10px 30px;
        background-position: center top;
        text-align: center;
    }

    .footer-logo {
        position: relative;
        top: 0;
        margin-bottom: 20px;
    }

    .social-icons {
        position: relative;
        top: 0;
    }


    .footer-logo-second {
        order: 2;
        max-width: 200px;
        /* تكبير اللوجو الثاني */
        transform: scale(1.15) translateY(-15px);
        margin: 0 auto 30px;
    }

    .footer-menu {
        font-size: 0.9rem;
        margin-top: 20px;
    }

    .footer-menu a {
        display: inline-block;
        margin: 0 8px;
    }

    .footer-overlay-inside {
        width: 100px;
        margin-bottom: 10px;
    }
}


@media (max-width:768px) {
    img[alt="السنوات الدراسية"] {
        max-width: 80% !important
    }
}

.footer-overlay-inside {
    width: 120px;
    height: auto;
    margin-bottom: 15px;
    object-fit: contain
}

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

.register-form {
    flex: 1 1 420px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6)
}

.register-form h2 {
    color: #d4af37;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center
}

.register-form label {
    display: block;
    color: #ffd789;
    margin-bottom: 6px;
    font-weight: 600
}

.register-form input,
.register-form select {
    width: 100%;
    background: #121212;
    color: #f5f0e1;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    transition: border 0.3s
}

.register-form input:focus,
.register-form select:focus {
    border-color: #d4af37;
    outline: none
}

.register-form button {
    width: 100%;
    background: #d4af37;
    color: #121212;
    border: none;
    border-radius: 30px;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 14px
}

.register-form button:hover {
    background: #bfa330
}

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

.register-image img {
    aspect-ratio: 3 / 4;
    height: 900px;
    border-radius: 10px;
    object-fit: cover
}

@media (max-width:768px) {
    .register-page {
        padding: 40px 15px
    }

    .register-form {
        padding: 30px 20px
    }

    .register-image img {
        height: 400px
    }
}

.video-section {
    background: #1e1e1e;
    color: #f5f0e1;
    padding: 40px 20px;
    border-radius: 15px;
    max-width: 1100px;
    margin: 40px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6)
}

.video-section video {
    width: 100%;
    max-width: 900px;
    border: 1px solid #333;
    border-radius: 10px;
    display: block;
    margin: 20px auto;
    background: #000
}

.lecture-title {
    color: #d4af37;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.6rem
}

.lecture-list-container {
    max-width: 900px;
    margin: 0 auto
}

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

.lecture-list li {
    background: #121212;
    color: #ffd789;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background .3s
}

.lecture-list li:hover {
    background: #1e1e1e
}

.lecture-list li.active {
    background: #d4af37;
    color: #121212
}

.toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: #ffd789;
    font-weight: 700
}

.toggle-arrow {
    transition: transform .3s
}

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

.instructor-section {
    text-align: center;
    margin: 40px 0
}

.instructor-section img {
    max-width: 280px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .6)
}

.recommended-courses {
    background: #1e1e1e;
    padding: 40px 20px
}

.recommended-courses h3 {
    color: #d4af37;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.5rem
}

.recommended-courses .courses-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto
}

.recommended-courses .courses-list a {
    background: #121212;
    color: #f5f0e1;
    border: 1px solid #333;
    border-radius: 10px;
    text-align: center;
    padding: 15px 10px;
    transition: transform .3s;
    font-weight: 600
}

.recommended-courses .courses-list a:hover {
    transform: translateY(-6px)
}

.recommended-courses .courses-list img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px
}

footer {
    background: #000;
    color: #ffd789;
    text-align: center;
    padding: 25px 10px;
    margin-top: 40px;
    font-size: .95rem
}

.login-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1100px;
    margin: 50px auto
}

.login-form {
    flex: 1 1 420px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6)
}

.login-form h2 {
    color: #d4af37;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center
}

.login-form label {
    display: block;
    color: #ffd789;
    margin-bottom: 6px;
    font-weight: 600
}

.login-form input {
    width: 100%;
    background: #121212;
    color: #f5f0e1;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    transition: border 0.3s
}

.login-form input:focus {
    border-color: #d4af37;
    outline: none
}

.login-form button {
    width: 100%;
    background: #d4af37;
    color: #121212;
    border: none;
    border-radius: 30px;
    padding: 12px 0;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-bottom: 14px
}

.login-form button:hover {
    background: #bfa330
}

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

.login-image img {
    max-width: 100%;
    border-radius: 10px
}

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

    .login-form {
        padding: 30px 20px
    }
}

.scrollable-courses {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center
}

.course-card {
    flex: 1 1 calc(33.333% - 40px);
    box-sizing: border-box;
    max-width: calc(33.333% - 40px)
}

@media (max-width:992px) {
    .course-card {
        flex: 1 1 calc(50% - 40px);
        max-width: calc(50% - 40px)
    }
}

@media (max-width:576px) {
    .course-card {
        flex: 1 1 100%;
        max-width: 100%
    }
}

.scrollable-courses::-webkit-scrollbar {
    height: 8px
}

.scrollable-courses::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px
}

.course-card {
    min-width: 300px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s
}

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

.course-card img {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover
}

.course-card .content {
    padding: 15px
}

.course-card .content h3 {
    color: #d4af37;
    font-size: 1.2rem;
    margin-bottom: 10px
}

.course-card .content p {
    color: #f5f0e1;
    font-size: 1rem;
    margin-bottom: 12px
}

.course-button {
    background: #ffc844;
    color: #121212;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s
}

.course-button:hover {
    background: #bfa330
}

.arrow {
    cursor: pointer;
    transition: transform .3s ease;
    margin-right: 6px
}

.open>.arrow {
    transform: rotate(90deg)
}

.sub-lectures {
    display: none;
    margin-right: 20px
}

.sub-lectures li {
    margin: 4px 0
}

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: #ffc844
}

.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)
}

.course-button {
    display: inline-block;
    margin-top: 10px
}

.students-table-wrapper {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
    padding: 2rem 1.5rem;
    color: #f5f0e1
}

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

.students-table {
    color: #f5f0e1;
    border-color: #333
}

.students-table thead {
    background: #333;
    color: #ffd789
}

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

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

.students-table tbody tr:hover {
    background: #2e2e2e;
    color: #ffd789
}

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

.logout-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    z-index: 1000
}

.logout-menu .logout-button {
    background: none;
    border: none;
    color: #ffd789;
    cursor: pointer;
    font-weight: bold;
    padding: 5px 10px
}

.logout-menu .logout-button:hover {
    color: #d4af37
}

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

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

.branch-image {
    transition: transform 0.3s ease-in-out
}

.branch-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2)
}

.main-btn {
    background-color: #ffcf85;
    color: #211009;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease
}

.main-btn:hover {
    background-color: #e2b96d;
    color: #211009
}

.whatsapp-icon {
    width: 40px;
    height: auto;
    margin-top: -5px;
    /* ارفع الصورة لفوق */
}