/* CSS Variables */
:root {
    --primary: #1a1a2e;
    --secondary: #16213e;
    --accent: #ff9e44;
    --light: #f0f0f0;
    --dark: #0f0f1e;
    --text: #333333;
    --text-light: #ffffff;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text);
    background-color: var(--light);
    line-height: 1.6;
    direction: rtl;
}

h1, h2, h3, h4 {
    font-family: 'Amiri', serif;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--primary);
    color: var(--text-light);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin-right: 10px;
}

.logo-icon {
    font-size: 2rem;
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-right: 30px;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent);
}

.auth-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: 'Cairo', sans-serif;
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--text-light);
}

.btn-primary {
    background: var(--accent);
    color: var(--text-light);
}

.btn-primary:hover {
    background: #ff8a2e;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(26, 26, 46, 0.8), rgba(26, 26, 46, 0.8)), url('https://images.unsplash.com/photo-1511379938547-c1f69419868d?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: var(--text-light);
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Lessons Section */
.lessons {
    padding: 80px 0;
    background-color: var(--light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    display: inline-block;
}

.section-title h2:after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background: var(--accent);
    margin: 10px auto;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.video-card:hover {
    transform: translateY(-10px);
}

.video-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.premium-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--accent);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.video-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 0.85rem;
}

/* Video Player Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    width: 90%;
    max-width: 900px;
    position: relative;
}

.video-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: black;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
}

.video-details {
    padding: 20px;
}

.premium-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px;
}

.premium-overlay i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.premium-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.premium-overlay p {
    margin-bottom: 20px;
    max-width: 400px;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--primary);
    color: var(--text-light);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.about-image img {
    width: 100%;
    display: block;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--accent);
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
    background: var(--light);
}

.pricing-cards {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.pricing-card {
    background: white;
    border-radius: 10px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.featured {
    background: var(--secondary);
    color: white;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured:before {
    content: 'الأكثر شعبية';
    position: absolute;
    top: 20px;
    left: -35px;
    background: var(--accent);
    color: white;
    padding: 5px 40px;
    transform: rotate(-45deg);
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin: 20px 0;
}

.pricing-card.featured .price {
    color: white;
}

.pricing-features {
    list-style: none;
    margin: 20px 0;
    text-align: right;
}

.pricing-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.pricing-features li i {
    color: var(--accent);
    margin-left: 10px;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--text-light);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #888;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        flex-direction: column;
    }
    
    .about-image, .about-text {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    nav ul li {
        margin-right: 0;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured:before {
        left: -25px;
        padding: 5px 30px;
    }
}

/* RTL Specific Adjustments */
[dir="rtl"] .video-duration {
    right: auto;
    left: 10px;
}

[dir="rtl"] .premium-badge {
    right: auto;
    left: 10px;
}

[dir="rtl"] .close-modal {
    right: auto;
    left: 10px;
}

[dir="rtl"] .pricing-card.featured:before {
    right: -35px;
    left: auto;
    transform: rotate(45deg);
}

[dir="rtl"] .pricing-features {
    text-align: right;
}

[dir="rtl"] .pricing-features li i {
    margin-right: auto;
    margin-left: 10px;
}