:root {
    --primary: #43658b;
    --secondary: #4e89ae;
    --accent: #ed6663;
    --light: #f5f7fa;
    --dark: #2c3e50;
    --success: #4caf50;
    --warning: #ff9800;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --border-radius: 16px;
    --font-family: 'Poppins', 'Open Sans', sans-serif;
    --bg: linear-gradient(135deg, #f0f4f8 0%, #e6eef7 100%);
    --primary-dark: #2c3e50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

html,
body {
    height: 100%;
}

body {
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.6rem;
    font-weight: 600;
}

nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

nav a:hover {
    opacity: 0.9;
}

.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--primary);
}

.hero h2 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.2rem;
    margin: 0 auto 30px;
    max-width: 600px;
    color: #555;
}

.section-title {
    text-align: center;
    margin: 40px 0 30px;
    color: var(--primary);
    font-size: 2.2rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.chapter-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

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

.chapter-header {
    padding: 25px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.chapter-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.05));
    z-index: 1;
}

.chapter-header i {
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
}

.chapter-header h3 {
    position: relative;
    z-index: 2;
    font-size: 1.6rem;
}

.chapter-content {
    padding: 25px;
}

.chapter-content p {
    margin-bottom: 20px;
    color: #555;
    font-size: 1rem;
}

.lesson-list {
    list-style: none;
}

.lesson-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.lesson-list li:last-child {
    border-bottom: none;
}

.lesson-list li:hover {
    background: rgba(67, 101, 139, 0.05);
    padding-left: 10px;
    border-radius: 8px;
}

.lesson-list i {
    color: var(--success);
    font-size: 1.1rem;
}

.lesson-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.lesson-list a:hover {
    color: var(--accent);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    margin-top: 20px;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:hover {
    background: #ff7e79;
}

.chapter-1 .chapter-header {
    background: linear-gradient(135deg, #2e8b57 0%, #3cb371 100%);
}

.chapter-2 .chapter-header {
    background: linear-gradient(135deg, #1e90ff 0%, #4169e1 100%);
}

.chapter-3 .chapter-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.chapter-4 .chapter-header {
    background: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
}

.chapter-5 .chapter-header {
    background: linear-gradient(135deg, #9c88ff 0%, #667eea 100%);
}

.chapter-6 .chapter-header {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.chapter-7 .chapter-header {
    background: linear-gradient(135deg, #ff7675 0%, #fd79a8 100%);
}

.resources {
    background: linear-gradient(135deg, #5e81ac 0%, #81a1c1 100%);
    border-radius: var(--border-radius);
    padding: 50px 40px;
    box-shadow: var(--shadow);
    margin: 50px 0;
    color: white;
}

.resources h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
}

.resource-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
}

.resource-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    transition: var(--transition);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    min-width: 250px;
    max-width: 300px;
}

.resource-card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.resource-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
}

.resource-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.resource-card a {
    color: white;
    text-decoration: none;
}

footer {
    background-color: var(--primary);
    color: white;
    text-align: center;
    padding: 1.25rem;
    font-size: 0.9rem;
    margin-top: auto;
}

iframe {
    width: 1000px;
    height: 725px;
    border-radius: 15px;
}

.btn-back-index {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    background: white;
    color: var(--primary);
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.btn-back-index:hover {
    background: #f0f0f0;
}

.lesson-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.lesson-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex: 1 1 45%;
    padding: 1.2rem 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 280px;
    margin-bottom: 1.5rem;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.lesson-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    background: linear-gradient(120deg, #4e89ae, #6a9bc3);
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lesson-card a {
    display: block;
    margin: 0.5rem 0;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.6rem;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
}

.lesson-card a:hover {
    background: var(--primary);
    color: white;
}

.coming-box {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px 40px;
    max-width: 500px;
    width: 100%;
    animation: float 2.5s ease-in-out infinite alternate;
}

.coming-box h2 {
    font-size: 1.6rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.coming-box p {
    font-size: 1rem;
    color: var(--dark);
}

@keyframes float {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

.coming-page main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.coming-page h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.coming-page h1 span {
    color: var(--accent);
}

.coming-page>main>p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 40px;
    color: #444;
}

.rtl-page {
    direction: rtl;
    text-align: right;
}

.rtl-page header,
.rtl-page footer {
    text-align: center;
}

.fas.green {
    color: green;
}

@media (max-width: 900px) {
    .chapters-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .resource-grid {
        flex-direction: column;
        align-items: center;
    }

    iframe {
        width: 700px;
        height: 425px;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding-bottom: 10px;
    }

    header h1 {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
    }

    nav a {
        margin: 0.2rem 0 0;
        font-size: 0.95rem;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .chapters-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }

    .chapter-header {
        font-size: 1.2rem;
        padding: 20px;
    }

    .chapter-content {
        padding: 20px;
    }

    .lesson-list li {
        font-size: 0.95rem;
    }

    iframe {
        width: auto;
        height: 325px;
    }

    .lesson-card {
        flex: 1 1 100%;
        padding: 1rem;
    }

    .coming-page h1 {
        font-size: 2rem;
    }

    .coming-box {
        padding: 25px;
    }

    .coming-box h2 {
        font-size: 1.4rem;
    }

    .coming-box p {
        font-size: 0.95rem;
    }

    .btn-back-index {
        padding: 0.5rem 0.9rem;
    }
}

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