/* ================== Courses page ================== */
html:has(body.courses-page),
body.courses-page {
  background: #ffffff;
}

body.courses-page .content {
  padding-top: 0;
  padding-bottom: 32px;
}

.courses-intro {
  max-width: 860px;
  margin: 0 auto 40px;
  text-align: center;
}

.courses-intro h2 {
  font-family: "EasaFalaGalan", "Faruma", "MV Boli", Arial, sans-serif;
  color: #165493;
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: normal;
  margin: 0 0 20px;
  line-height: 1.45;
}

.courses-intro p {
  color: #3a4a5e;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 2;
  margin: 0;
}

/* Player left, thumbnails right (RTL grid) */
.courses-stage {
  display: grid;
  grid-template-columns: minmax(140px, 175px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.courses-main {
  order: 2;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 10px 32px rgba(14, 60, 106, 0.10);
  padding: 22px 22px 26px;
  min-width: 0;
}

.courses-thumbs {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-main-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.course-badge {
  display: inline-block;
  flex-shrink: 0;
  background: #e8f5ee;
  color: #0e6b3a;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  line-height: 1.4;
}

.courses-main h3 {
  font-family: "Faruma", "MV Boli", Arial, sans-serif;
  color: #165493;
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: normal;
  margin: 0;
  line-height: 1.5;
}

.course-player-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  border-radius: 14px;
  overflow: hidden;
  background: #0a1628;
  aspect-ratio: 16 / 9;
}

.course-player-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.course-fs-btn {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(14, 22, 40, 0.72);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.course-fs-btn:hover {
  background: rgba(22, 84, 147, 0.9);
  transform: scale(1.05);
}

.course-note {
  margin: 14px 0 0;
  color: #5a6b7e;
  font-size: 15px;
  line-height: 1.7;
}

.course-thumb {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  padding: 5px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(14, 60, 106, 0.08);
  cursor: pointer;
  text-align: center;
  font-family: "Faruma", "MV Boli", Arial, sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.course-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(14, 60, 106, 0.14);
}

.course-thumb.is-active {
  border-color: #165493;
  box-shadow: 0 8px 22px rgba(22, 84, 147, 0.18);
}

.course-thumb-preview {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  overflow: hidden;
  background: #0a1628;
  line-height: 0;
}

.course-thumb-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.course-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.28);
  pointer-events: none;
}

.course-thumb-play::after {
  content: "";
  width: 0;
  height: 0;
  margin-right: -3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #fff;
}

.course-thumb-label {
  font-size: 12px;
  line-height: 1.4;
  color: #165493;
}

.courses-cta {
  max-width: 640px;
  margin: 52px auto 0;
  text-align: center;
  padding: 28px 24px;
  background: linear-gradient(135deg, #f4f8fc 0%, #eef4fa 100%);
  border-radius: 18px;
  border: 1px solid rgba(22, 84, 147, 0.12);
}

.courses-cta p {
  color: #3a4a5e;
  font-size: 17px;
  line-height: 1.9;
  margin: 0 0 18px;
}

.courses-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 12px;
  font-family: "Faruma", "MV Boli", Arial, sans-serif;
  font-size: 17px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.courses-wa-btn:hover {
  background: #1da851;
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .courses-stage {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .courses-main {
    order: 1;
  }

  .courses-thumbs {
    order: 2;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .course-thumb {
    flex: 0 0 min(160px, 58vw);
    scroll-snap-align: start;
  }

  .course-player-wrap {
    max-width: none;
  }
}

@media (max-width: 768px) {
  body.courses-page .content,
  body.courses-page main.content {
    margin-right: 0;
    max-width: 100%;
    width: 100%;
    padding: 12px 12px 32px;
    overflow-x: hidden;
  }

  .courses-intro {
    padding: 0 8px;
    margin-bottom: 28px;
  }

  .courses-stage {
    padding: 0 4px;
  }

  .courses-main {
    padding: 16px 14px 20px;
  }

  .courses-wa-btn {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
  }
}
