/* ========== المتغيرات الأساسية ========== */
: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);
  --success: #28a745;
  --error: #dc3545;
  --warning: #ffc107;
  --radius: 24px;
  --radius-sm: 16px;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1400px;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.15);
}

/* الألوان الخاصة بالمستويات */
.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);
}

.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);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--gold-dark);
  border: 2px solid var(--gold-light);
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 1rem;
}

.btn-back:hover {
  background: var(--gold-light);
  transform: translateX(5px);
}

/* ========== الهيدر ========== */
.page-header {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 80px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

.breadcrumb {
  max-width: var(--max-width);
  margin: 1rem auto 0;
  padding: 0 2rem;
  color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
  color: white;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ========== المحتوى الرئيسي ========== */
.main-content {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 2rem;
}

/* ========== زر العودة ========== */
.back-link {
  margin-bottom: 2rem;
}

/* ========== تبويبات التنقل بين الدورات ========== */
.course-tabs {
  background: white;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
}

.tabs-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.tab-btn {
  padding: 1rem 2rem;
  background: transparent;
  border: 2px solid var(--gold-light);
  border-radius: 50px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

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

/* ========== بطاقة الدورة الرئيسية ========== */
.course-main-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  margin-bottom: 2rem;
}

.course-header {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.course-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-header-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: 2rem;
}

.course-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--gold);
  border-radius: 50px;
  font-weight: 800;
  margin-bottom: 1rem;
}

.course-header h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.course-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.course-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(
    135deg,
    rgba(185, 146, 74, 0.05),
    rgba(231, 210, 163, 0.1)
  );
}

.info-item {
  text-align: center;
}

.info-item i {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.info-item .label {
  color: var(--muted);
  font-size: 0.9rem;
}

.info-item .value {
  color: var(--gold-dark);
  font-size: 1.3rem;
  font-weight: 800;
}

/* ========== رسالة الترحيب ========== */
.welcome-message {
  background: linear-gradient(
    135deg,
    rgba(185, 146, 74, 0.1),
    rgba(231, 210, 163, 0.2)
  );
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  border: 2px dashed var(--gold);
}

.welcome-message h3 {
  color: var(--gold-dark);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.welcome-message p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* ========== شبكة المستويات ========== */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* This creates exactly 2 equal columns */
  gap: 2rem;
  margin: 2rem 0;
}

.level-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  transition: var(--transition);
}

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

.level-header {
  padding: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.level-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.level-header > * {
  position: relative;
  z-index: 2;
}

.level-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.level-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.level-subtitle {
  font-size: 1rem;
  opacity: 0.9;
}

.level-content {
  padding: 2rem;
}

.level-details {
  margin-bottom: 1.5rem;
}

.level-detail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
}

.level-detail-item i {
  color: var(--gold);
  width: 20px;
}

.level-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-dark);
  margin: 1rem 0;
}

.level-price small {
  font-size: 1rem;
  color: var(--muted);
  font-weight: normal;
}

.learning-list {
  list-style: none;
  margin: 1.5rem 0;
}

.learning-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.learning-list li i {
  color: var(--gold);
}

/* ========== الدورات القصيرة (PS) ========== */
.short-courses-section {
  background: linear-gradient(
    135deg,
    rgba(185, 146, 74, 0.05),
    rgba(231, 210, 163, 0.1)
  );
  border-radius: var(--radius);
  padding: 2rem;
  margin: 3rem 0;
}

.short-courses-title {
  text-align: center;
  font-size: 2rem;
  color: var(--gold-dark);
  margin-bottom: 2rem;
}

.short-courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.short-course-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  border: 1px solid var(--gold-light);
  transition: var(--transition);
}

.short-course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--gold);
}

.short-course-code {
  display: inline-block;
  padding: 0.25rem 1rem;
  background: var(--gold-light);
  border-radius: 50px;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}

.short-course-title {
  font-size: 1.2rem;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.short-course-duration {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.short-course-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold-dark);
}

/* ========== قسم التسجيل ========== */
.enrollment-section {
  background: white;
  border-radius: var(--radius);
  padding: 3rem;
  margin: 3rem 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  text-align: center;
}

.enrollment-title {
  font-size: 2rem;
  color: var(--gold-dark);
  margin-bottom: 1rem;
}

.enrollment-subtitle {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.enrollment-highlight {
  background: linear-gradient(
    135deg,
    rgba(185, 146, 74, 0.1),
    rgba(231, 210, 163, 0.2)
  );
  border-radius: var(--radius-sm);
  padding: 2rem;
  margin: 2rem 0;
  border: 2px dashed var(--gold);
}

.enrollment-highlight i {
  font-size: 3rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.enrollment-highlight .email {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold-dark);
  direction: ltr;
}

.max-participants {
  display: inline-block;
  padding: 0.5rem 2rem;
  background: var(--error);
  color: white;
  border-radius: 50px;
  font-weight: 800;
  margin: 1rem 0;
}

/* ========== الفوتر ========== */
.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);
}

/* ========== إشعار ========== */
.notification {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: white;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(-150%);
  transition: transform 0.4s ease;
  z-index: 1000;
  border-right: 4px solid var(--gold);
}

.notification.show {
  transform: translateX(0);
}

.notification-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* ========== مؤشر التحميل ========== */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--gold-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== التجاوب ========== */
@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%;
    gap: 1rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .course-header h2 {
    font-size: 1.8rem;
  }

  .levels-grid {
    grid-template-columns: 1fr;
  }

  .enrollment-section {
    padding: 2rem 1rem;
  }

  .enrollment-highlight .email {
    font-size: 1.2rem;
  }

  .btn-back {
    width: 100%;
    justify-content: center;
  }
}
