@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    --bg-main: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-alt: #F1F5F9;
    
    --primary-blue: #2563EB;
    --primary-purple: #7C3AED;
    --primary-cyan: #06B6D4;
    --primary-teal: #14B8A6;
    
    --accent-orange: #F97316;
    --accent-yellow: #FACC15;
    --accent-green: #22C55E;
    --accent-pink: #EC4899;
    
    --text-dark: #111827;
    --text-med: #374151;
    --text-light: #6B7280;

    --font-main: 'Tajawal', sans-serif;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-med);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Header & Navigation */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-purple);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--primary-cyan);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-med);
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-blue);
}

.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: var(--bg-white);
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    transform: translateY(-2px);
    color: var(--bg-white);
}

.btn-secondary {
    background-color: var(--bg-alt);
    color: var(--primary-blue);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-pink));
    color: var(--bg-white);
}

.btn-accent:hover {
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
    color: var(--bg-white);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(to bottom right, var(--bg-white), var(--bg-alt));
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image-container {
    position: relative;
}

.hero-image {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.hero-shape {
    position: absolute;
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-teal));
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    z-index: 1;
    top: -50px;
    right: -50px;
}

/* Section Styling */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.service-card:nth-child(1):hover { border-color: var(--primary-blue); }
.service-card:nth-child(2):hover { border-color: var(--primary-purple); }
.service-card:nth-child(3):hover { border-color: var(--accent-orange); }
.service-card:nth-child(4):hover { border-color: var(--primary-teal); }
.service-card:nth-child(5):hover { border-color: var(--accent-pink); }
.service-card:nth-child(6):hover { border-color: var(--accent-yellow); }
.service-card:nth-child(7):hover { border-color: var(--primary-cyan); }
.service-card:nth-child(8):hover { border-color: var(--accent-green); }

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Course Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.course-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-orange);
    color: var(--bg-white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.course-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.course-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--bg-alt);
}

.course-price {
    font-weight: 800;
    color: var(--primary-blue);
    font-size: 1.25rem;
}

/* Learning Paths */
.path-card {
    display: flex;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.path-card:hover {
    box-shadow: var(--shadow-md);
}

.path-img {
    width: 300px;
    object-fit: cover;
}

.path-content {
    padding: 2rem;
    flex-grow: 1;
}

.path-stats {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--bg-alt);
    border-bottom: 1px solid var(--bg-alt);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: 800;
    color: var(--primary-purple);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Success Stories */
.testimonials {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    color: var(--bg-white);
    padding: 5rem 0;
}

.testimonials .section-header h2,
.testimonials .section-header p {
    color: var(--bg-white);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.student-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.student-details h4 {
    margin: 0;
    color: var(--bg-white);
}

.student-details p {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

.rating {
    color: var(--accent-yellow);
    margin-bottom: 1rem;
}

/* Internal Pages Header */
.page-header {
    background: linear-gradient(to right, var(--bg-alt), var(--bg-white));
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--bg-alt);
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

/* Forms & Contact */
.contact-container {
    max-width: 800px;
    margin: -3rem auto 0;
    background: var(--bg-white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 2rem;
    color: var(--text-light);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--primary-teal);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Text Content Pages (Terms & Privacy) */
.text-content {
    background: var(--bg-white);
    padding: 4rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: -3rem;
}

.text-content h2 {
    color: var(--primary-purple);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.text-content p {
    margin-bottom: 1.5rem;
}

.text-content ul {
    margin-bottom: 1.5rem;
    padding-inline-start: 1.5rem;
    list-style-type: disc;
}

.text-content li {
    margin-bottom: 0.5rem;
}

/* Course Detail Page */
.course-hero {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 4rem 0;
}

.course-hero h1 {
    color: var(--bg-white);
    font-size: 3rem;
}

.course-hero p {
    color: #9ca3af;
    font-size: 1.2rem;
    max-width: 800px;
}

.course-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    padding: 4rem 0;
}

.course-sidebar {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
}

.course-price-large {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    text-align: center;
}

.course-includes {
    margin-top: 2rem;
}

.course-includes h4 {
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--bg-alt);
    padding-bottom: 0.5rem;
}

.course-includes li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-med);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: #f3f4f6;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about .logo {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.footer-about p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul a {
    color: #9ca3af;
}

.footer-links ul a:hover {
    color: var(--primary-cyan);
    padding-inline-start: 5px;
}

.newsletter p {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: none;
    font-family: var(--font-main);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-shape {
        display: none;
    }

    .course-detail-layout {
        grid-template-columns: 1fr;
    }
    
    .path-card {
        flex-direction: column;
    }
    
    .path-img {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .text-content {
        padding: 2rem;
    }
}

/* Typography & Direction Utilities */
.dir-ltr {
    direction: ltr;
    unicode-bidi: embed;
}