/* إعدادات المتغيرات والألوان */
:root {
    --primary-color: #0f172a;
    /* كحلي غامق - يعبر عن الاحترافية */
    --accent-color: #c29545;
    /* ذهبي - يعبر عن التميز */
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --card-bg: #ffffff;
    --transition: all 0.3s ease;
}

body.dark-mode {
    --primary-color: #f1f5f9;
    --text-dark: #f8fafc;
    --text-light: #cbd5e1;
    --bg-light: #0f172a;
    --white: #1e293b;
    --card-bg: #1e293b;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-right: 15px;
    padding: 5px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--accent-color);
    background-color: rgba(194, 149, 69, 0.1);
}

/* إعادة تعيين التنسيقات الأساسية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

/* تنسيق الترويسة (Header) */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

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

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

.cta-btn-nav {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    font-weight: 700;
    transition: var(--transition);
}

.cta-btn-nav:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* User Menu Styles */
#user-menu {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    background: none;
    border: 2px solid var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    transition: var(--transition);
}

.user-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.user-icon {
    font-size: 1.2rem;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid #f1f5f9;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--accent-color);
}

/* قسم الواجهة الرئيسية (Hero Section) */
.hero {
    padding: 80px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
}

.hero-content {
    flex: 1;
    padding-left: 50px;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(194, 149, 69, 0.1);
    color: var(--accent-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(194, 149, 69, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    border-radius: 50%;
}

.hero-image img {
    max-width: 85%;
    height: auto;
    /* Styles for transparent PNG */
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.25));
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 30px 50px rgba(194, 149, 69, 0.4));
}

/* تنسيق قسم الدورات (Courses Section) */
.courses {
    padding: 80px 0;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

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

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

.course-card {
    background-color: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    top: 0;
}

.course-card:hover {
    top: -10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.course-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.course-content {
    padding: 20px;
}

.course-category {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
}

.course-title {
    font-size: 1.25rem;
    margin: 10px 0;
    color: var(--primary-color);
}

.course-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

.course-price {
    font-weight: 700;
    color: var(--primary-color);
}

.course-link {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-link:hover {
    text-decoration: underline;
}

/* Loading and Error Messages */
.loading-message,
.no-courses {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #ef4444;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* الفوتر (Footer) */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 20px;
    text-align: center;
}

.footer-content {
    margin-bottom: 30px;
}

.social-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--accent-color);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* تنسيق للشاشات الصغيرة */
@media (max-width: 992px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 40px;
    }

    .hero-content {
        padding-left: 0;
        margin-top: 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* يمكن استبداله بقائمة هامبرغر في نسخة متقدمة */
    }

    /* قائمة بسيطة للجوال بدلاً من القائمة المخفية */
    nav {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 0.9rem;
    }

    .cta-btn-nav {
        display: none;
        /* إخفاء الزر الكبير في الجوال لتوفير المساحة */
    }
}/* Services Section */
.section-padding {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--accent-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text-dark);
}

/* About & Contact */
.about,
.contact {
    background-color: var(--bg-light);
}

.social-links-large .social-icon {
    font-size: 1.2rem;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.social-links-large .social-icon:hover {
    background: var(--accent-color);
}