/* استدعاء خط Inter من Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

html,
body {
  overflow-x: clip; /* يمنع السكرول الأفقي وفي نفس الوقت لا يعطل position: sticky للكارت الأيمن */
  background-color: #ffffff;
  color: #313131;
}

/* ================= شريط التنقل العلوي لصفحة تفاصيل الكورس (Navbar Section) ================= */
.single-course-nav-section {
  width: 100%;
  padding: 24px 40px 0 40px;
  background-color: #ffffff;
}

/* ================= تنسيقات صفحة تفاصيل الكورس (Course Details Section) ================= */
.course-details-section,
.course-details-section * {
  box-sizing: border-box;
}

.course-details-section {
  background-color: #ffffff;
  padding: 30px 40px 100px 40px;
  width: 100%;
  /* مهم جداً: عدم وضع overflow: hidden هنا حتى يعمل الـ sticky sidebar بنجاح */
  overflow: visible;
}

.course-details-container {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 55px;
  align-items: start; /* ضروري جداً لعمل position: sticky للعمود الأيمن */
}

/* ================= العمود الأيسر (الصورة والوصف والسكاشن) ================= */
.course-main-content {
  width: 100%;
  min-width: 0;
}

/* حاوية الصورة الرئيسية */
.course-hero-media {
  position: relative;
  width: 100%;
  height: 410px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 28px;
  background-color: #f2efe9;
}

.course-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* البادج الأبيض العائم أسفل يسار الصورة */
.feedback-floating-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 12px 20px 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14);
  max-width: 90%;
}

.feedback-icon-wrapper {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.feedback-badge-text h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #313131;
  margin: 0 0 3px 0;
  line-height: 1.2;
}

.feedback-badge-text p {
  font-size: 11.5px;
  color: #727272;
  margin: 0;
  line-height: 1.3;
}

/* شارة Course Overview البرتقالية الفاتحة */
.overview-pill-badge {
  display: inline-block;
  background-color: #fdf0d5;
  color: #e09200;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

/* العنوان الرئيسي للكورس */
.course-main-heading {
  font-size: 40px;
  font-weight: 700;
  color: #313131;
  line-height: 1.18;
  margin: 0 0 22px 0;
  letter-spacing: -0.5px;
}

/* النصوص الوصفية */
.course-description-text p {
  font-size: 15.5px;
  line-height: 1.65;
  color: #464545b2;
  margin: 0 0 18px 0;
  font-weight: 400;
}

.course-description-text p:last-child {
  margin-bottom: 0;
}

/* ================= العمود الأيمن الثابت (Sticky Sidebar Card) ================= */
.course-sticky-sidebar {
  position: sticky;
  top: 28px; /* المسافة من أعلى الشاشة أثناء عمل Scroll */
  z-index: 20;
  width: 100%;
}

.course-details-card {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 28px 26px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.06);
}

/* هيدر الكارت */
.details-card-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.details-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #9e9e9e;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.details-card-title {
  font-size: 20px;
  font-weight: 800;
  color: #313131;
  margin: 0;
  letter-spacing: -0.3px;
}

.live-badge {
  background-color: #e6f2f2;
  color: #046868;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
}

/* قائمة تفاصيل الكورس */
.details-specs-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.details-specs-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f2f2f2;
  font-size: 13px;
}

.details-specs-list li:last-child {
  border-bottom: none;
}

.spec-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7d7d7d;
  font-weight: 400;
}

.spec-icon {
  width: 16px;
  height: 16px;
  color: #046868;
  flex-shrink: 0;
}

.spec-value {
  color: #313131;
  font-weight: 700;
  text-align: right;
}

/* صندوق السعر (Transparent Tuition) */
.tuition-box {
  background-color: #f7f7f7;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
  margin-bottom: 20px;
}

.tuition-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #4a4a4a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tuition-price-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-bottom: 8px;
}

.price-from {
  font-size: 23px;
  font-weight: 800;
  color: #06575b;
}

.price-amount {
  font-size: 27px;
  font-weight: 800;
  color: #e39a06;
}

.price-unit {
  font-size: 12px;
  color: #888888;
  font-weight: 500;
}

.tuition-subtext {
  font-size: 11px;
  line-height: 1.45;
  color: #555555;
  margin: 0;
}

/* أزرار الحجز والواتساب */
.sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.btn-book-trial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background-color: #e39a06;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 50px;
  transition:
    background-color 0.25s ease,
    transform 0.2s ease;
}

.btn-book-trial:hover {
  background-color: #cc8400;
  transform: translateY(-2px);
}

.btn-ask-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background-color: #046868;
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 50px;
  transition:
    background-color 0.25s ease,
    transform 0.2s ease;
}

.btn-ask-whatsapp:hover {
  background-color: #034344;
  transform: translateY(-2px);
}

.whatsapp-btn-icon {
  width: 16px;
  height: 16px;
}

/* قائمة المميزات السفلية */
.sidebar-perks-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-perks-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #7a7a7a;
}

.check-mark {
  color: #046868;
  font-weight: 800;
  font-size: 12px;
}

/* ================= التجاوب مع الشاشات المتوسطة والموبايل ================= */
@media (max-width: 992px) {
  .single-course-nav-section {
    padding: 18px 20px 0 20px;
  }
  .course-details-section {
    padding: 25px 20px 70px 20px;
  }
  .course-details-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .course-sticky-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .single-course-nav-section {
    padding: 15px 15px 0 15px;
  }
  .course-details-section {
    padding: 20px 15px 60px 15px;
  }
  .course-hero-media {
    height: 270px;
  }
  .course-main-heading {
    font-size: 28px;
  }
  .feedback-floating-badge {
    bottom: 12px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ==========================================================================
   1. تنسيقات السكشن الأول: What you will learn
   ========================================================================== */
.curriculum-learn-section {
  margin-top: 65px; /* مسافة فاصلة كبيرة من النص الذي يسبقه */
  margin-bottom: 75px; /* مسافة فاصلة بينه وبين السكشن الذي يليه */
  width: 100%;
}

.curriculum-pill-badge {
  display: inline-block;
  background-color: #fdf0d5;
  color: #e09200;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.curriculum-section-title {
  font-size: 34px;
  font-weight: 700;
  color: #313131;
  line-height: 1.2;
  margin: 0 0 28px 0;
  letter-spacing: -0.4px;
}

/* شبكة الكروت الـ 6 (عمودين × 3 صفوف) */
.learn-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.learn-item-card {
  background-color: #ffffff;
  border: 1px solid #eae6df; /* إطار ناعم ومحدد كما في التصميم الأصلي */
  border-radius: 18px;
  padding: 22px 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.035);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.learn-item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.07);
}

.learn-check-wrapper {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #eaf3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.learn-check-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #06575b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.learn-card-text h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: #313131;
  line-height: 1.3;
  margin: 0 0 6px 0;
}

.learn-card-text p {
  font-size: 12.5px;
  line-height: 1.55;
  color: #757575;
  margin: 0;
  font-weight: 400;
}

/* Media Query للسكشن الأول */
@media (max-width: 768px) {
  .curriculum-learn-section {
    margin-top: 45px;
    margin-bottom: 50px;
  }
  .curriculum-section-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .learn-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ==========================================================================
   2. تنسيقات السكشن الثاني: Course structure & progression
   ========================================================================== */
.course-progression-section {
  margin-top: 75px; /* مسافة فاصلة كبيرة تضمن عدم الالتصاق بالسكشن العلوي */
  margin-bottom: 40px;
  width: 100%;
}

.progression-timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  padding-left: 6px;
}

.timeline-step {
  display: flex;
  align-items: stretch;
  gap: 20px;
  position: relative;
}

.timeline-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 34px;
}

.timeline-step:not(:last-child) .timeline-marker::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 2.5px;
  background-color: #e39a06;
}

.step-num-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: #e39a06;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(229, 148, 0, 0.28);
}

.timeline-content-card {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid #eae6df;
  border-radius: 18px;
  padding: 22px 26px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.035);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.timeline-content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.07);
}

.timeline-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.timeline-card-top h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: #313131;
  margin: 0;
  line-height: 1.3;
}

.step-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-teal {
  background-color: #046868;
  color: #ffffff;
}

.tag-grey {
  background-color: #f2f2f2;
  color: #4a4a4a;
}

.timeline-content-card p {
  font-size: 12.5px;
  line-height: 1.6;
  color: #757575;
  margin: 0;
  font-weight: 400;
}

/* Media Query للسكشن الثاني */
@media (max-width: 768px) {
  .course-progression-section {
    margin-top: 50px;
  }
  .timeline-step {
    gap: 12px;
  }
  .timeline-content-card {
    padding: 16px 18px;
  }
  .timeline-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ==========================================================================
   تنسيقات سكشن الكورسات البديلة (Check out another course)
   ========================================================================== */
.related-courses-section {
  background-color: #fdfcf9; /* خلفية مطابقة لسكشن Our courses لتبرز الكروت البيضاء */
  padding: 85px 40px 95px 40px;
  width: 100%;
}

.related-courses-container {
  max-width: 1160px;
  margin: 0 auto;
}

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

.related-pill-badge {
  display: inline-block;
  background-color: #eaf3f3;
  color: #06575b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 7px 18px;
  border-radius: 50px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.related-main-title {
  font-size: 42px;
  font-weight: 800;
  color: #313131;
  line-height: 1.18;
  margin: 0 0 14px 0;
  letter-spacing: -0.5px;
}

.related-subtitle {
  font-size: 15.5px;
  color: #727272;
  font-weight: 400;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.55;
}

/* شبكة الكروت (Flex + Wrap) - 3 في الصف */
.related-cards-grid {
  --related-gap-x: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* الكارت اللي لوحده في السطر الأخير يتسنتر */
  align-items: stretch; /* كل الكروت بنفس الارتفاع في نفس السطر */
  column-gap: var(--related-gap-x);
  row-gap: 35px;
  margin-bottom: 40px;
}

/* ضبط محاذاة واستقامة كروت الكورسات داخل الـ slots */
.course-card-slot {
  display: flex;
  flex-direction: column;
  flex: 0 1 calc((100% - 2 * var(--related-gap-x)) / 3);
  min-width: 0;
}

/* الـ placeholder (أو الكارت المحقون) يملأ الـ slot علشان الارتفاعات تتساوى */
.course-card-slot > * {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.course-card-slot .course-card {
  width: 100%;
  flex: 1;
}

/* زر Browse Courses السفلي */
.browse-btn-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.btn-browse-courses {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: #e39a06;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(229, 148, 0, 0.25);
  transition:
    background-color 0.25s ease,
    transform 0.2s ease;
}

.btn-browse-courses:hover {
  background-color: #cc8400;
  transform: translateY(-2px);
}

.browse-arrow-icon {
  width: 18px;
  height: 18px;
}

/* Media Query للتجاوب مع جميع أحجام الشاشات */
@media (max-width: 1024px) {
  .related-courses-section {
    padding: 65px 25px 80px 25px;
  }
  .related-cards-grid {
    --related-gap-x: 22px;
    row-gap: 28px;
  }
  /* كارتين في الصف، والتالت يتسنتر تحتهم */
  .course-card-slot {
    flex-basis: calc((100% - var(--related-gap-x)) / 2);
  }
}

@media (max-width: 680px) {
  .related-courses-section {
    padding: 50px 16px 65px 16px;
  }
  .related-main-title {
    font-size: 30px;
  }
  .related-cards-grid {
    row-gap: 24px;
  }
  /* كارت واحد في الصف */
  .course-card-slot {
    flex-basis: 100%;
    max-width: 480px;
  }
}
