body {
    font-family: 'Cairo', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f7f7f7;
    direction: rtl;
}

header {
    background: #222;
    color: #fff;
    padding: 20px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

nav h1 {
    font-size: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff9800;
}

.hero {
    background: linear-gradient(120deg, #ff9800 0%, #ff5722 100%);
    color: #fff;
    padding: 80px 0 60px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.hero-content button {
    background: #fff;
    color: #ff5722;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.hero-content button:hover {
    background: #ff5722;
    color: #fff;
}

.about,
.contact {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.about h2,
.contact h2 {
    color: #ff5722;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form input,
form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

form button {
    background: #ff9800;
    color: #fff;
    border: none;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

form button:hover {
    background: #ff5722;
}

footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    margin-top: 40px;
}

#darkModeToggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 10px;
    transition: color 0.3s;
}

#darkModeToggle:hover {
    color: #ff9800;
}

.courses {
    max-width: 1000px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.courses h2 {
    color: #ff5722;
    text-align: center;
    margin-bottom: 30px;
}

.courses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.course-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fafafa;
    border-radius: 18px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    padding: 20px 16px 24px 16px;
    width: 320px;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
    margin-bottom: 10px;
}

.course-card:hover {
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.15);
    transform: translateY(-5px) scale(1.03);
}

.course-card h3 {
    color: #ff9800;
    margin-bottom: 10px;
}

.course-img-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #ff9800 60%, #fff3e0 100%);
    border-radius: 18px 18px 0 0;
    overflow: hidden;
    height: 220px;
}

.course-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    border: 4px solid #fff;
    background: #fff;
}

.course-price {
    font-size: 1.2rem;
    color: #388e3c;
    font-weight: bold;
    margin: 10px 0 5px 0;
}

.enroll-btn {
    background: #388e3c;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 22px;
    font-size: 1rem;
    margin: 8px 0 0 0;
    cursor: pointer;
    transition: background 0.3s;
    font-family: inherit;
    font-weight: bold;
    letter-spacing: 1px;
}

.enroll-btn:hover {
    background: #2e7031;
}

body.dark-mode .enroll-btn {
    background: #43a047;
    color: #fff;
}

body.dark-mode .enroll-btn:hover {
    background: #2e7031;
}

body.dark-mode .course-price {
    color: #7fff7f;
}

body.dark-mode {
    background: #18191a;
    color: #e4e6eb;
}

body.dark-mode header,
body.dark-mode footer {
    background: #242526;
    color: #e4e6eb;
}

body.dark-mode nav ul li a {
    color: #e4e6eb;
}

body.dark-mode nav ul li a:hover {
    color: #ff9800;
}

body.dark-mode .hero {
    background: linear-gradient(120deg, #333 0%, #222 100%);
    color: #fff;
}

body.dark-mode .about,
body.dark-mode .contact,
body.dark-mode .courses {
    background: #242526;
    color: #e4e6eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

body.dark-mode .course-card {
    background: #18191a;
    color: #e4e6eb;
    box-shadow: 0 1px 6px rgba(255, 152, 0, 0.08);
}

body.dark-mode .course-link,
body.dark-mode form button,
body.dark-mode .hero-content button {
    background: #ff9800;
    color: #fff;
}

body.dark-mode .course-link:hover,
body.dark-mode form button:hover,
body.dark-mode .hero-content button:hover {
    background: #ff5722;
}

body.dark-mode form input,
body.dark-mode form textarea {
    background: #222;
    color: #e4e6eb;
    border: 1px solid #444;
}

.course-link {
    display: inline-block;
    margin-top: 10px;
    color: #fff;
    background: linear-gradient(90deg, #ff9800 60%, #ff5722 100%);
    padding: 10px 28px;
    border-radius: 22px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.10);
    transition: background 0.3s, transform 0.2s;
    letter-spacing: 1px;
}

.course-link:hover {
    background: linear-gradient(90deg, #ff5722 60%, #ff9800 100%);
    color: #fff;
    transform: scale(1.06);
}

body.dark-mode .course-link {
    background: linear-gradient(90deg, #ff9800 60%, #ff5722 100%);
    color: #fff;
}

body.dark-mode .course-link:hover {
    background: linear-gradient(90deg, #ff5722 60%, #ff9800 100%);
}

body.course-page {
    background: #10182b;
    color: #fff;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', Arial, sans-serif;
}

.header-bar {
    background: #181f32;
    padding: 0;
    border-bottom: 3px solid #1e88e5;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
}

.site-logo,
.footer-logo {
    height: 48px;
    width: auto;
}

.header-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #1e88e5;
}

.header-actions .login-btn {
    background: #1e88e5;
    color: #fff;
    border: none;
    border-radius: 18px;
    padding: 8px 22px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.header-actions .login-btn:hover {
    background: #1565c0;
}

.course-hero {
    background: #23243a;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    max-width: 900px;
    margin: 32px auto 0 auto;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    position: relative;
}

.course-hero-img-wrap {
    flex: 1 1 350px;
    min-width: 320px;
    max-width: 420px;
    position: relative;
    background: #181f32;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.course-hero-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 0 0 0 0;
    display: block;
}

.course-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: #e53935;
    color: #fff;
    padding: 7px 22px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.13);
    z-index: 2;
}

.course-hero-info {
    flex: 2 1 400px;
    padding: 32px 28px 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-hero-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #fff;
}

.course-hero-desc {
    font-size: 1.1rem;
    color: #e0e0e0;
    margin-bottom: 22px;
}

.course-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.enroll-btn.big {
    background: #43a047;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 22px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.enroll-btn.big:hover {
    background: #2e7031;
}

.course-link.big {
    background: #ff4081;
    color: #fff;
    border-radius: 18px;
    padding: 12px 32px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(255, 64, 129, 0.10);
}

.course-link.big:hover {
    background: #c51162;
    color: #fff;
    transform: scale(1.06);
}

.course-content-section {
    background: #181f32;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.13);
    max-width: 900px;
    margin: 32px auto;
    padding: 0 0 24px 0;
}

.course-content-header {
    padding: 24px 32px 0 32px;
}

.course-content-header h2 {
    color: #1e88e5;
    font-size: 1.3rem;
    margin: 0 0 12px 0;
}

.course-content-list {
    padding: 0 32px;
}

.accordion {
    background: none;
    border-radius: 12px;
    margin-top: 12px;
}

.accordion-item {
    background: #23243a;
    border-radius: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(30, 136, 229, 0.07);
}

.accordion-title {
    width: 100%;
    background: #b71c1c;
    color: #fff;
    border: none;
    outline: none;
    padding: 16px 18px;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: right;
    cursor: pointer;
    transition: background 0.2s;
}

.accordion-title:hover {
    background: #d32f2f;
}

.accordion-content {
    background: #181f32;
    color: #fff;
    padding: 16px 18px;
    font-size: 1rem;
    display: none;
}

.accordion-item.active .accordion-content {
    display: block;
}

.footer-bar {
    background: #1565c0;
    color: #fff;
    padding: 32px 0 18px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.footer-logo {
    height: 48px;
    width: auto;
}

.footer-social {
    display: flex;
    gap: 18px;
}

.social-icon {
    color: #fff;
    background: #23243a;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background 0.2s;
}

.social-icon:hover {
    background: #1e88e5;
}

.footer-copy {
    color: #fff;
    font-size: 1rem;
    margin-top: 8px;
}

.search-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

#courseSearchInput {
    width: 320px;
    max-width: 90vw;
    padding: 12px 18px;
    border: 2px solid #ff9800;
    border-radius: 25px;
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.08);
    background: #fffbe7;
    color: #ff5722;
    margin-bottom: 0;
    direction: rtl;
}

#courseSearchInput:focus {
    border-color: #ff5722;
    box-shadow: 0 2px 12px rgba(255, 87, 34, 0.13);
    background: #fff3e0;
}

body.dark-mode #courseSearchInput {
    background: #232323;
    color: #ff9800;
    border-color: #ff9800;
}

body.dark-mode #courseSearchInput:focus {
    background: #18191a;
    border-color: #ff5722;
}

@media (max-width: 700px) {
    nav {
        flex-direction: column;
        gap: 10px;
    }

    .about,
    .contact {
        padding: 15px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 900px) {
    .courses-list {
        flex-direction: column;
        align-items: center;
    }

    .course-card {
        width: 95%;
    }

    .course-img {
        width: 160px;
        height: 160px;
    }

    .course-img-wrap {
        height: 170px;
    }

    .course-hero,
    .course-content-section {
        max-width: 99vw;
    }

    .header-content,
    .footer-content {
        max-width: 99vw;
        padding: 0 8px;
    }

    .course-hero-img {
        height: 180px;
    }
}

@media (max-width: 600px) {
    .course-hero {
        flex-direction: column;
    }

    .course-hero-img {
        height: 120px;
    }

    .course-hero-info {
        padding: 18px 10px 12px 10px;
    }

    .course-content-header,
    .course-content-list {
        padding: 0 8px;
    }
}