/* ========== المتغيرات الأساسية ========== */
:root {
  --bg: #f3e8dd;
  --ink: #2b2320;
  --muted: #6a5b52;
  --gold: #b9924a;
  --gold-light: #e7d2a3;
  --gold-dark: #8b6a2b;
  --stroke: rgba(120, 90, 60, 0.25);
  --card: rgba(255, 255, 255, 0.85);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.15);
  --radius: 24px;
  --radius-sm: 16px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1400px;
}

/* ألوان المستويات */
.level-badge {
  display: inline-block;
  padding: 0.25rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  margin-right: 0.5rem;
}

.level-beginner {
  background: linear-gradient(135deg, #28a745, #20c997);
}

.level-intermediate {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.level-advanced {
  background: linear-gradient(135deg, #dc3545, #c82333);
}

.level-expert {
  background: linear-gradient(135deg, #6f42c1, #6610f2);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Cairo",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8f2e9 0%, #f3e8dd 50%, #efe0d2 100%);
  min-height: 100vh;
  line-height: 1.7;
}

/* ========== NAVIGATION ========== */
      .imgLogo {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-content: center;
        justify-content: center;
        align-items: center;
        overflow: hidden;
      }

      .navbar {
        position: sticky;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1000;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--stroke);
        padding: 1.25rem 0;
        transition: var(--transition);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
      }

      .navbar.scrolled {
        padding: 0.75rem 0;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
      }

      .nav-container {
        max-width: var(--max-width);
        margin: 0 auto;
        padding: 0 2rem;
        display: flex;
        align-items: center;
        /*justify-content: space-evenly;*/
      }

      .nav-logo {
        display: flex;
        align-items: center;
        gap: 1rem;
        text-decoration: none;
      }

      .nav-logo-img {
        width: 75px;
        height: 75px;
        border-radius: 12px;
        overflow: hidden;
        border: 2px solid var(--gold-light);
        box-shadow: 0 8px 20px rgba(139, 106, 43, 0.15);
      }

      .nav-logo-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .logo-text h2 {
        font-size: 1.3rem;
        color: var(--gold-dark);
        margin-bottom: 0.25rem;
      }

      .logo-text span {
        font-size: 0.7rem;
        color: var(--muted);
        font-weight: 600;
      }

      .nav-menu {
        display: flex;
        align-items: center;
        gap: 2rem;
      }

      .nav-links {
        display: flex;
        list-style: none;
        gap: 1.5rem;
      }

      .nav-links a {
        color: var(--ink);
        text-decoration: none;
        font-weight: 700;
        font-size: 1rem;
        position: relative;
        padding: 0.5rem 0;
        transition: var(--transition);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-wrap: nowrap;
      }

      .nav-links a i {
        font-size: 0.875rem;
        color: var(--gold);
      }

      .nav-links a::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, var(--gold), var(--gold-dark));
        transition: var(--transition);
      }

      .nav-links a:hover::after,
      .nav-links a.active::after {
        width: 100%;
      }

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

      .nav-cta .btn {
        padding: 0.75rem 1.75rem;
        font-size: 0.95rem;
      }

      .hamburger {
        display: none;
        flex-direction: column;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0.5rem;
      }

      .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--gold-dark);
        margin: 3px 0;
        transition: var(--transition);
        border-radius: 2px;
      }

/* ========== الأزرار ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  gap: 0.75rem;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  box-shadow: 0 15px 35px rgba(185, 146, 74, 0.25);
  border: 1px solid rgba(139, 106, 43, 0.3);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(185, 146, 74, 0.35);
}

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

.btn-outline:hover {
  background: var(--gold-light);
  transform: translateY(-3px);
}

/* ========== قسم الهيدر ========== */
.hero-courses {
  min-height: 40vh;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
  background:
    radial-gradient(
      ellipse at 20% 50%,
      rgba(185, 146, 74, 0.15) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 20%,
      rgba(231, 210, 163, 0.1) 0%,
      transparent 50%
    );
  text-align: center;
}

.hero-courses-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 2rem;
  position: relative;
  z-index: 1;
}

.hero-courses-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--gold-dark);
}

.hero-courses-subtitle {
  font-size: 1.5rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.hero-courses-semester {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero-quote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink);
  max-width: 700px;
  margin: 1.5rem auto 0;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  border: 1px solid var(--gold-light);
}

/* ========== قسم الفلتر والبحث ========== */
.filters-section {
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);
}

.filters-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.filters-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid var(--gold-light);
  border-radius: 50px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  border-color: var(--gold);
  transform: translateY(-3px);
}

.search-box {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 3.5rem;
  border: 2px solid var(--gold-light);
  border-radius: 50px;
  font-size: 1rem;
  background: white;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(185, 146, 74, 0.2);
}

.search-icon {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
}

/* ========== قسم الكورسات ========== */
.courses-section {
  padding: 4rem 0;
}

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

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--gold-dark);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 700px;
  margin: 1rem auto 0;
}

/* ========== شبكة الكورسات ========== */
.courses-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

/* ========== بطاقة الكورس ========== */
.course-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

/* صورة الكورس */
.course-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

/* رأس البطاقة مع الترقيم */
.course-header {
  background: linear-gradient(
    135deg,
    rgba(185, 146, 74, 0.1),
    rgba(231, 210, 163, 0.2)
  );
  padding: 1.5rem;
  border-bottom: 3px solid var(--gold);
}

.course-number {
  display: inline-block;
  background: var(--gold);
  color: white;
  padding: 0.25rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.course-title-arabic {
  color: var(--gold-dark);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  font-weight: 800;
}

.course-title-english {
  color: var(--gold-dark);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* معلومات سريعة */
.course-quick-info {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.quick-info-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.quick-info-item i {
  color: var(--gold);
}

/* محتوى الكورس */
.course-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-description {
  color: var(--ink);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  font-size: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--stroke);
}

.course-description small {
  color: var(--muted);
  font-size: 0.9rem;
}

/* قسم المدرب */
.instructor-box {
  background: rgba(231, 210, 163, 0.1);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid var(--gold-light);
}

.instructor-box h4 {
  color: var(--gold-dark);
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.instructor-box h4 i {
  color: var(--gold);
}

.instructor-item {
  margin-bottom: 1rem;
}

.instructor-item:last-child {
  margin-bottom: 0;
}

.instructor-name {
  font-weight: 800;
  color: var(--gold-dark);
  margin-bottom: 0.25rem;
}

.instructor-title {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.instructor-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold-light),
    transparent
  );
  margin: 1rem 0;
}

/* شارات إضافية */
.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.course-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(185, 146, 74, 0.1);
  border: 1px solid var(--gold-light);
  border-radius: 50px;
  font-size: 0.8rem;
  color: var(--gold-dark);
}

/* زر التفاصيل */
.details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  margin-top: 0.5rem;
}

.details-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(185, 146, 74, 0.4);
}

.details-btn i {
  font-size: 1.1rem;
}

/* ========== التذييل ========== */
.footer {
  background: linear-gradient(135deg, #2b2320 0%, #3a302c 100%);
  color: var(--gold-light);
  padding-top: 4rem;
  margin-top: 4rem;
  border-top: 4px solid var(--gold);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  padding-bottom: 0.75rem;
}

.footer-col h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 50px;
  height: 2px;
  background: var(--gold);
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: var(--gold-light);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-links a:hover {
  color: white;
  transform: translateX(-5px);
}

.footer-links a i {
  font-size: 0.75rem;
  color: var(--gold);
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--gold-light);
}

.footer-contact i {
  color: var(--gold);
  margin-top: 0.25rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 44px;
  height: 44px;
  background: rgba(185, 146, 74, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(185, 146, 74, 0.3);
}

.social-links a:hover {
  background: var(--gold);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(231, 210, 163, 0.7);
  font-size: 0.875rem;
}

.footer-bottom p {
  margin-bottom: 0.5rem;
}

.footer-legal {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.footer-legal a {
  color: rgba(231, 210, 163, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-legal a:hover {
  color: var(--gold-light);
}

/* ========== التجاوب مع الشاشات ========== */
@media (max-width: 1024px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }

  .hero-courses-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    right: -100%;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 1.5rem;
    transition: var(--transition);
    border-top: 3px solid var(--stroke);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: right;
    gap: 1rem;
  }

  .nav-cta {
    width: 100%;
    margin-top: 1rem;
  }

  .nav-cta .btn {
    width: 100%;
  }

  .hero-courses {
    padding-top: 80px;
  }

  .hero-courses-title {
    font-size: 2rem;
  }

  .hero-courses-subtitle {
    font-size: 1.2rem;
  }

  .hero-courses-semester {
    font-size: 1.4rem;
  }

  .hero-quote {
    font-size: 1rem;
    padding: 1rem;
  }

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

  .course-image {
    height: 180px;
  }

  .footer-grid {
    gap: 2rem;
  }

  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }

  .logo-text h2 {
    font-size: 1rem;
  }

  .logo-text span {
    font-size: 0.6rem;
  }

  .filters-grid {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
    text-align: center;
  }

  .course-image {
    height: 160px;
  }

  .course-header {
    padding: 1rem;
  }

  .course-title-arabic {
    font-size: 1.2rem;
  }
}
