/* 1. إعدادات الخطوط والتنسيق العام */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    overflow-x: hidden;
}

/* 2. شريط التنقل العلوي (Navbar) */
.navbar-container {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* خانة البحث */
.search-box {
    display: flex;
    align-items: center;
    background-color: #f1f1f1;
    border-radius: 25px;
    padding: 5px 15px;
    width: 300px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    padding: 8px;
    width: 100%;
    font-size: 14px;
}

.search-btn {
    border: none;
    background: none;
    color: #7b1fa2;
    cursor: pointer;
    font-size: 16px;
}

/* روابط التنقل */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #7b1fa2;
}

/* القائمة المنسدلة (Dropdown) */
.dropdown {
    position: relative;
}

.dropdown-toggle i {
    font-size: 12px;
    margin-right: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    list-style: none;
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    display: none; /* مخفية تلقائياً */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    color: #333;
}

.dropdown-menu li a:hover {
    background-color: #f5f0f8;
    color: #7b1fa2;
}

/* إظهار القائمة عند تمرير الماوس */
.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 3. واجهة الموقع (Hero Section) */
.content {
    background: linear-gradient(135deg, #4a0e4e, #7b1fa2);
    color: white;
    text-align: center;
    padding: 100px 20px;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.content h1 {
    font-size: 42px;
    margin-bottom: 15px;
    font-weight: 700;
}

.content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-about {
    display: inline-block;
    padding: 12px 40px;
    background-color: white;
    color: #7b1fa2;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-about:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* 4. قسم الكورسات (Courses Section) */
.courses-section {
    padding: 60px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.main-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #222;
    position: relative;
}

.courses-grid-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

/* كرت الكورس */
.course-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    width: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 25px;
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

.course-info span {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
}

.course-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    height: 70px; /* لتوحيد حجم النصوص */
    overflow: hidden;
}

/* أزرار اشترك الآن موف وفخمة */
.btn-buy {
    display: inline-block;
    background-color: #7b1fa2;
    color: white;
    text-decoration: none;
    padding: 10px 35px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-buy:hover {
    background-color: #4a0e4e;
    transform: scale(1.05);
}

/* 5. الفوتر (Footer) */
footer {
    background-color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid #eee;
}

.footer-content h3 {
    color: #7b1fa2;
    margin-bottom: 10px;
}

.footer-content p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-links a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.footer-links a:hover {
    color: #7b1fa2;
}

.copyright {
    font-size: 12px;
    color: #aaa !important;
}

.scroll-top-btn{
    position: fixed;
    bottom: 30px;
    left:30px;
    background-color: #7b1fa2;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}
.scroll-top-btn:hover {
    background-color: #4a0e4e;
}

/* التوافق مع الشاشات الصغيرة (Responsive) */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    .search-box {
        width: 100%;
    }
    .nav-links {
        gap: 15px;
    }
    .content h1 {
        font-size: 30px;
    }
}