/* ============================================================
   Components — buttons, chips, cards, nav, footer, forms.
   ============================================================ */

/* ── Buttons ─────────────────────────────────────────────── */
.kh-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-2);
  font-weight: 600;
  font-size: var(--kh-fs-md);
  line-height: 1;
  border-radius: var(--kh-r-pill);
  padding: 14px 24px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--kh-navy);
  font-family: inherit;
  text-decoration: none;
  transition: background var(--kh-dur) var(--kh-ease),
              color var(--kh-dur) var(--kh-ease),
              border-color var(--kh-dur) var(--kh-ease),
              transform var(--kh-dur-fast) var(--kh-ease),
              box-shadow var(--kh-dur) var(--kh-ease);
  white-space: nowrap;
}
.kh-btn svg { transition: transform var(--kh-dur) var(--kh-ease); }
.kh-btn:hover svg.kh-arrow { transform: translateX(3px); }
.kh-btn:active { transform: translateY(0); }
.kh-btn[disabled] { opacity: 0.45; pointer-events: none; }

/* Primary — navy */
.kh-btn--primary {
  background: var(--kh-navy);
  color: var(--kh-cream);
}
.kh-btn--primary:hover {
  background: var(--kh-navy-deep);
  transform: translateY(-1px);
  box-shadow: var(--kh-shadow-2);
}

/* Saffron — call to action on dark surfaces */
.kh-btn--saffron {
  background: var(--kh-saffron);
  color: var(--kh-navy-deep);
  font-weight: 700;
}
.kh-btn--saffron:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
  box-shadow: var(--kh-shadow-2);
}

/* Ghost — outlined */
.kh-btn--ghost {
  background: transparent;
  color: var(--kh-navy);
  border-color: var(--kh-line);
}
.kh-btn--ghost:hover {
  border-color: var(--kh-navy);
  background: var(--kh-paper);
}
.kh-btn--ghost-on-dark {
  color: var(--kh-cream);
  border-color: rgba(247,241,225,.25);
}
.kh-btn--ghost-on-dark:hover {
  border-color: var(--kh-cream);
  background: rgba(247,241,225,.06);
}

/* Cream — light secondary */
.kh-btn--cream {
  background: var(--kh-cream-2);
  color: var(--kh-navy-deep);
}
.kh-btn--cream:hover {
  background: var(--kh-paper);
  transform: translateY(-1px);
}

/* Sizes */
.kh-btn--sm { padding: 9px 16px; font-size: var(--kh-fs-sm); }
.kh-btn--lg { padding: 16px 30px; font-size: var(--kh-fs-md); }

/* Link button */
.kh-link {
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-2);
  font-weight: 600;
  font-size: var(--kh-fs-sm);
  color: var(--kh-navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--kh-dur) var(--kh-ease);
}
.kh-link:hover { border-bottom-color: var(--kh-navy); }
.kh-link svg { transition: transform var(--kh-dur) var(--kh-ease); }
.kh-link:hover svg { transform: translateX(3px); }

/* ── Chips ───────────────────────────────────────────────── */
.kh-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-2);
  background: var(--kh-paper);
  color: var(--kh-navy);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-pill);
  padding: 6px 12px;
  font-size: var(--kh-fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.kh-chip--coral   { background: var(--kh-coral);   color: var(--kh-navy-deep); border: none; }
.kh-chip--saffron { background: var(--kh-saffron); color: var(--kh-navy-deep); border: none; }
.kh-chip--teal    { background: var(--kh-teal);    color: var(--kh-navy-deep); border: none; }
.kh-chip--dark    { background: var(--kh-navy-deep); color: var(--kh-cream); border: none; }

/* ── Step mark (inline SVG sizing helper) ────────────────── */
.kh-stepmark { display: inline-block; flex-shrink: 0; }
.kh-stepmark--animated rect:nth-child(1) { animation: khStep1 3s var(--kh-ease) infinite; }
.kh-stepmark--animated rect:nth-child(2) { animation: khStep2 3.4s var(--kh-ease) infinite; }
.kh-stepmark--animated rect:nth-child(3) { animation: khStep3 3.2s var(--kh-ease) infinite; }
@keyframes khStep1 { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes khStep2 { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }
@keyframes khStep3 { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* ── Navbar ──────────────────────────────────────────────── */
.kh-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 225, 0.85);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--kh-dur) var(--kh-ease),
              background var(--kh-dur) var(--kh-ease);
}
.kh-nav.is-scrolled {
  border-bottom-color: var(--kh-line);
}
.kh-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
  gap: var(--kh-s-6);
}
.kh-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-3);
  text-decoration: none;
  color: var(--kh-navy-deep);
}
.kh-brand__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.kh-brand__ar {
  font-family: var(--kh-arabic);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  color: var(--kh-navy-deep);
}
.kh-brand__en {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(27,42,78,.65);
  margin-top: 3px;
}
.kh-nav__links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
.kh-nav__links a {
  font-size: var(--kh-fs-sm);
  font-weight: 500;
  color: var(--kh-navy-deep);
  opacity: 0.72;
  transition: opacity var(--kh-dur) var(--kh-ease);
  position: relative;
  padding-block: 4px;
}
.kh-nav__links a:hover { opacity: 1; }
.kh-nav__links a.is-active {
  opacity: 1;
  color: var(--kh-navy-deep);
}
.kh-nav__links a.is-active::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -6px;
  height: 2px;
  background: var(--kh-coral);
  border-radius: 2px;
}
.kh-nav__cta {
  display: flex;
  align-items: center;
  gap: var(--kh-s-3);
}
.kh-nav__lang {
  background: transparent;
  border: none;
  color: var(--kh-navy-deep);
  font-size: var(--kh-fs-sm);
  font-weight: 600;
  opacity: 0.72;
  letter-spacing: 0.06em;
}
.kh-nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-sm);
  padding: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--kh-navy-deep);
  flex-shrink: 0;
  transition: background var(--kh-dur) var(--kh-ease),
              border-color var(--kh-dur) var(--kh-ease);
}
.kh-nav__toggle:hover { background: var(--kh-cream-2); border-color: var(--kh-navy); }
.kh-nav__toggle svg { width: 22px; height: 22px; }

/* Mobile-only items inside the dropdown — hidden on desktop */
.kh-nav__mobile-only { display: none; }

@media (max-width: 900px) {
  /* Only logo + hamburger in the navbar — hide everything else.
     The hidden items are duplicated inside the dropdown menu. */
  .kh-nav__inner { gap: var(--kh-s-3); }
  .kh-nav__links { display: none; }
  .kh-nav__toggle { display: inline-flex; }
  .kh-nav__cta .kh-nav__lang,
  .kh-nav__cta .kh-btn { display: none; }

  /* Dropdown — full-width panel below the navbar */
  .kh-nav.is-open .kh-nav__links {
    display: flex;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--kh-paper);
    border-top: 1px solid var(--kh-line);
    padding: var(--kh-s-2) var(--kh-s-6) var(--kh-s-5);
    box-shadow: var(--kh-shadow-2);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .kh-nav.is-open .kh-nav__links li { display: list-item; list-style: none; }
  /* Each menu item: rounded tap zone with hover background.
     No divider lines — spacing + hover state does the visual job. */
  .kh-nav.is-open .kh-nav__links a {
    display: block;
    padding: 16px var(--kh-s-4);
    margin-block: 2px;
    border-radius: var(--kh-r-md);
    border-bottom: none;
    opacity: 1;
    font-size: var(--kh-fs-lg);
    font-weight: 600;
    text-decoration: none;
    color: var(--kh-navy-deep);
    transition: background var(--kh-dur) var(--kh-ease),
                color var(--kh-dur) var(--kh-ease);
  }
  .kh-nav.is-open .kh-nav__links a:hover,
  .kh-nav.is-open .kh-nav__links a:focus-visible {
    background: var(--kh-cream-2);
  }
  .kh-nav.is-open .kh-nav__links a.is-active {
    color: var(--kh-coral);
    background: rgba(240, 135, 98, 0.08);
  }
  .kh-nav.is-open .kh-nav__links a.is-active::after { display: none; }

  /* Mobile-only items appear inside the dropdown */
  .kh-nav.is-open .kh-nav__mobile-only { display: list-item; }
  .kh-nav__mobile-only { margin-top: var(--kh-s-3); }
  /* Language switch inside the dropdown — text + globe icon, lighter weight */
  .kh-nav__mobile-only .kh-nav__lang--mobile {
    display: flex !important;
    align-items: center;
    gap: 12px;
    color: var(--kh-fg-muted) !important;
    font-weight: 500 !important;
    text-align: start;
  }
  .kh-nav__lang-icon { flex-shrink: 0; opacity: 0.75; }
}

/* Very small phones — even tighter brand mark */
@media (max-width: 400px) {
  .kh-brand__ar { font-size: 22px; }
  .kh-stepmark { width: 28px !important; height: 28px !important; }
}

/* ── Footer ──────────────────────────────────────────────── */
.kh-footer {
  background: var(--kh-navy-deep);
  color: var(--kh-cream);
  padding: 64px 0 28px;
}
.kh-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(247,241,225,.1);
}
.kh-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--kh-s-3);
  margin-bottom: var(--kh-s-5);
}
.kh-footer__brand .kh-brand__ar { color: var(--kh-cream); font-size: 22px; }
.kh-footer__tagline {
  color: rgba(247,241,225,.7);
  font-size: var(--kh-fs-sm);
  line-height: 1.6;
  max-width: 320px;
}
.kh-footer__col-title {
  font-size: var(--kh-fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--kh-saffron);
  margin: 0 0 var(--kh-s-4);
}
.kh-footer__list {
  list-style: none;
  margin: 0; padding: 0;
}
.kh-footer__list li {
  margin-bottom: var(--kh-s-2);
}
.kh-footer__list a {
  font-size: var(--kh-fs-sm);
  color: rgba(247,241,225,.78);
  transition: color var(--kh-dur) var(--kh-ease);
}
.kh-footer__list a:hover { color: var(--kh-cream); }
.kh-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  font-size: var(--kh-fs-xs);
  color: rgba(247,241,225,.45);
  letter-spacing: 0.06em;
}
.kh-footer__bottom .kh-num { text-transform: uppercase; }

@media (max-width: 900px) {
  .kh-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 540px) {
  .kh-footer__grid { grid-template-columns: 1fr; }
  .kh-footer__bottom { flex-direction: column; gap: var(--kh-s-3); align-items: flex-start; }
}

/* ── Course card ─────────────────────────────────────────── */
.kh-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--kh-s-5);
}
@media (max-width: 1024px) { .kh-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .kh-card-grid { grid-template-columns: 1fr; } }

.kh-course {
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--kh-dur) var(--kh-ease),
              transform var(--kh-dur) var(--kh-ease),
              border-color var(--kh-dur) var(--kh-ease);
}
.kh-course:hover {
  box-shadow: var(--kh-shadow-2);
  transform: translateY(-2px);
  border-color: rgba(27,42,78,.18);
}
.kh-course__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--kh-cream-2);
}
.kh-course__media-grad {
  position: absolute;
  inset: 0;
}
.kh-course__media svg {
  position: absolute;
  inset-inline-end: 18px;
  inset-block-end: 14px;
  opacity: 0.95;
}
.kh-course__chips {
  position: absolute;
  inset-block-start: 12px;
  inset-inline: 12px;
  display: flex;
  justify-content: space-between;
  gap: var(--kh-s-2);
}
.kh-course__body {
  padding: var(--kh-s-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.kh-course__title {
  font-size: var(--kh-fs-lg);
  font-weight: 600;
  color: var(--kh-navy-deep);
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.kh-course__instructor {
  font-size: var(--kh-fs-sm);
  color: var(--kh-fg-muted);
  margin: 0 0 var(--kh-s-4);
}
.kh-course__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--kh-s-4);
  border-top: 1px solid var(--kh-line-soft);
  margin-top: auto;
}
.kh-course__meta .kh-num {
  font-size: var(--kh-fs-xs);
  color: var(--kh-fg-muted);
}
.kh-course__price {
  font-size: var(--kh-fs-md);
  font-weight: 700;
  color: var(--kh-navy-deep);
}
.kh-course__price--free {
  color: var(--kh-teal);
}

/* ── Category card ───────────────────────────────────────── */
.kh-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--kh-s-4);
}
@media (max-width: 900px) { .kh-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .kh-cat-grid { grid-template-columns: 1fr; } }

.kh-cat {
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-lg);
  padding: var(--kh-s-6);
  display: flex;
  flex-direction: column;
  gap: var(--kh-s-4);
  min-height: 180px;
  transition: box-shadow var(--kh-dur) var(--kh-ease),
              transform var(--kh-dur) var(--kh-ease);
}
.kh-cat:hover { box-shadow: var(--kh-shadow-2); transform: translateY(-2px); }
.kh-cat__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.kh-cat__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kh-cat__count { font-size: var(--kh-fs-xs); color: var(--kh-fg-muted); }
.kh-cat__title { font-size: var(--kh-fs-lg); font-weight: 600; color: var(--kh-navy-deep); margin: 0 0 6px; }
.kh-cat__desc  { font-size: var(--kh-fs-sm); color: var(--kh-fg-muted); margin: 0; line-height: 1.5; }

/* ── Filter bar (Courses page) ───────────────────────────── */
.kh-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--kh-s-4);
  padding: var(--kh-s-3) var(--kh-s-5);
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-pill);
  margin-bottom: var(--kh-s-8);
}
.kh-filter__list {
  display: flex;
  gap: var(--kh-s-2);
  flex-wrap: wrap;
}
.kh-filter__btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: var(--kh-r-pill);
  font-size: var(--kh-fs-sm);
  font-weight: 500;
  color: var(--kh-navy);
  cursor: pointer;
  transition: background var(--kh-dur) var(--kh-ease),
              color var(--kh-dur) var(--kh-ease);
}
.kh-filter__btn:hover { background: var(--kh-cream-2); }
.kh-filter__btn.is-active {
  background: var(--kh-navy-deep);
  color: var(--kh-cream);
}
.kh-filter__sort {
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-2);
  color: var(--kh-fg-muted);
  font-size: var(--kh-fs-sm);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .kh-filter { border-radius: var(--kh-r-lg); flex-direction: column; align-items: stretch; }
  .kh-filter__sort { justify-content: flex-end; }
}

/* ── Forms ───────────────────────────────────────────────── */
.kh-field { display: flex; flex-direction: column; gap: 6px; }
.kh-label {
  font-size: var(--kh-fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--kh-track-eyebrow);
  color: var(--kh-fg-muted);
}
.kh-input, .kh-textarea, .kh-select {
  font-family: inherit;
  font-size: var(--kh-fs-md);
  color: var(--kh-fg);
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-sm);
  padding: 12px 14px;
  width: 100%;
  transition: border-color var(--kh-dur) var(--kh-ease),
              box-shadow var(--kh-dur) var(--kh-ease);
}
.kh-input:focus, .kh-textarea:focus, .kh-select:focus {
  outline: none;
  border-color: var(--kh-navy);
  box-shadow: 0 0 0 3px rgba(244, 193, 61, 0.25);
}
.kh-textarea { min-height: 140px; resize: vertical; }

/* ── Stat strip (hero, about) ────────────────────────────── */
.kh-stats {
  display: flex;
  gap: var(--kh-s-8);
  flex-wrap: wrap;
  padding-top: var(--kh-s-6);
  border-top: 1px solid var(--kh-line-soft);
  margin-top: var(--kh-s-10);
}
.kh-stat__num {
  font-size: var(--kh-fs-2xl);
  font-weight: 700;
  color: var(--kh-navy-deep);
  letter-spacing: -0.02em;
  font-family: var(--kh-sans);
}
.kh-stat__label {
  font-size: var(--kh-fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--kh-track-eyebrow);
  color: var(--kh-fg-muted);
  margin-top: 4px;
}

/* ── Testimonial ─────────────────────────────────────────── */
.kh-testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--kh-s-5);
}
@media (max-width: 900px) { .kh-testimonial-grid { grid-template-columns: 1fr; } }

.kh-testimonial {
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-lg);
  padding: var(--kh-s-8);
  display: flex;
  flex-direction: column;
  gap: var(--kh-s-5);
}
.kh-testimonial__quote {
  font-size: var(--kh-fs-lg);
  line-height: 1.5;
  color: var(--kh-navy-deep);
  margin: 0;
  letter-spacing: -0.01em;
}
.kh-testimonial__quote::before { content: '“'; color: var(--kh-coral); font-family: var(--kh-serif); font-style: italic; font-size: 1.4em; line-height: 0; margin-inline-end: 4px; vertical-align: -0.2em; }
.kh-testimonial__person {
  display: flex;
  align-items: center;
  gap: var(--kh-s-3);
  margin-top: auto;
}
.kh-testimonial__avatar {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--kh-cream-2);
  color: var(--kh-navy-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--kh-fs-sm);
  letter-spacing: 0.02em;
}
.kh-testimonial__name { font-weight: 600; color: var(--kh-navy-deep); font-size: var(--kh-fs-sm); }
.kh-testimonial__role { font-size: var(--kh-fs-xs); color: var(--kh-fg-muted); }

/* ── Photo treatment ─────────────────────────────────────── */
/* Brand image treatment: warm-light, slightly desaturated,
   with a navy gradient overlay for legibility when text sits
   on top. Per the design system: avoid cool / blue / techy. */
.kh-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
}
.kh-photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--kh-r-lg);
  background: var(--kh-cream-2);
}
.kh-photo-frame--xl { border-radius: 28px; box-shadow: var(--kh-shadow-3); }
.kh-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15,26,51,.78));
  pointer-events: none;
}

/* ── Live dot ─────────────────────────────────────────────── */
.kh-live {
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-2);
  background: var(--kh-paper);
  color: var(--kh-navy-deep);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-pill);
  padding: 8px 14px;
  font-size: var(--kh-fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kh-live--floating {
  position: absolute;
  inset-block-start: 22px;
  inset-inline-start: 22px;
  z-index: 2;
  background: rgba(247,241,225,.94);
  backdrop-filter: blur(10px);
}
.kh-live__dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--kh-coral);
  box-shadow: 0 0 0 0 rgba(240, 135, 98, 0.6);
  animation: khPulse 1.8s var(--kh-ease) infinite;
}
@keyframes khPulse {
  0%   { box-shadow: 0 0 0 0   rgba(240, 135, 98, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(240, 135, 98, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(240, 135, 98, 0);   }
}

/* ── Floating photo caption (hero) ──────────────────────── */
.kh-photo-caption {
  position: absolute;
  inset-inline-end: 22px;
  inset-block-end: 22px;
  z-index: 2;
  max-width: 280px;
  background: rgba(247,241,225,.94);
  backdrop-filter: blur(10px);
  border-radius: var(--kh-r-md);
  padding: var(--kh-s-5);
  box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.kh-photo-caption__name {
  font-size: var(--kh-fs-md);
  font-weight: 700;
  color: var(--kh-navy-deep);
  margin: 6px 0 2px;
}
.kh-photo-caption__role {
  font-size: var(--kh-fs-xs);
  color: var(--kh-fg-muted);
  margin: 0;
}

/* Decorative climbing bars overlaid on a photo — keeps the
   step-mark motif present even when the literal panel is gone */
.kh-photo-bars {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: 50%;
  height: 100%;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: screen;
}

/* ── Course feature (single-course detail block) ────────── */
.kh-feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .kh-feature { grid-template-columns: 1fr; gap: 40px; }
}
.kh-feature__media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--kh-r-lg);
  overflow: hidden;
  background: var(--kh-cream-2);
  box-shadow: var(--kh-shadow-2);
}
.kh-feature__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--kh-s-3);
  margin-block: var(--kh-s-6);
}
.kh-feature__price {
  font-size: var(--kh-fs-2xl);
  font-weight: 800;
  color: var(--kh-navy-deep);
  letter-spacing: -0.02em;
}
.kh-feature__price-note {
  font-size: var(--kh-fs-sm);
  color: var(--kh-fg-muted);
}

/* ── Modules list (course syllabus) ─────────────────────── */
.kh-modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--kh-s-4);
  list-style: none;
  margin: 0; padding: 0;
}
@media (max-width: 720px) { .kh-modules { grid-template-columns: 1fr; } }

.kh-module {
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-md);
  padding: var(--kh-s-5);
  display: flex;
  gap: var(--kh-s-4);
  align-items: flex-start;
  transition: border-color var(--kh-dur) var(--kh-ease),
              transform var(--kh-dur) var(--kh-ease),
              box-shadow var(--kh-dur) var(--kh-ease);
}
.kh-module:hover {
  border-color: rgba(27,42,78,.22);
  transform: translateY(-2px);
  box-shadow: var(--kh-shadow-2);
}
.kh-module__num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--kh-cream-2);
  color: var(--kh-navy-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--kh-mono);
  font-size: var(--kh-fs-sm);
  font-weight: 600;
}
.kh-module:nth-child(3n+1) .kh-module__num { background: var(--kh-saffron); }
.kh-module:nth-child(3n+2) .kh-module__num { background: var(--kh-teal); }
.kh-module:nth-child(3n+3) .kh-module__num { background: var(--kh-coral); }
.kh-module__title {
  margin: 0 0 4px;
  font-size: var(--kh-fs-md);
  font-weight: 600;
  color: var(--kh-navy-deep);
}
.kh-module__desc {
  margin: 0;
  font-size: var(--kh-fs-sm);
  color: var(--kh-fg-muted);
  line-height: 1.55;
}

/* Avatar — also supports an <img> child */
.kh-testimonial__avatar { overflow: hidden; }
.kh-testimonial__avatar img,
.kh-team__avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.92);
  border-radius: 999px;
}
.kh-team__avatar { width: 72px; height: 72px; overflow: hidden; }

/* ── Price with strike-through (launch promo) ───────────── */
.kh-price-was {
  font-size: var(--kh-fs-xl);
  font-weight: 600;
  color: var(--kh-fg-muted);
  text-decoration: line-through;
  text-decoration-color: var(--kh-coral);
  text-decoration-thickness: 2px;
  letter-spacing: -0.01em;
}
.kh-price-promo {
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-2);
  padding: 4px 10px;
  border-radius: var(--kh-r-pill);
  background: var(--kh-coral);
  color: var(--kh-navy-deep);
  font-size: var(--kh-fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── FAQ accordion ──────────────────────────────────────── */
.kh-faq {
  display: grid;
  gap: var(--kh-s-3);
}
.kh-faq__item {
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-md);
  overflow: hidden;
  transition: border-color var(--kh-dur) var(--kh-ease),
              box-shadow var(--kh-dur) var(--kh-ease);
}
.kh-faq__item[open] {
  border-color: rgba(27,42,78,.22);
  box-shadow: var(--kh-shadow-2);
}
.kh-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kh-s-4);
  padding: var(--kh-s-5) var(--kh-s-6);
  cursor: pointer;
  list-style: none;
  font-size: var(--kh-fs-md);
  font-weight: 600;
  color: var(--kh-navy-deep);
  letter-spacing: -0.01em;
  user-select: none;
  transition: background var(--kh-dur) var(--kh-ease);
}
.kh-faq__q::-webkit-details-marker { display: none; }
.kh-faq__q:hover { background: var(--kh-cream); }
.kh-faq__icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--kh-cream-2);
  color: var(--kh-navy-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--kh-dur) var(--kh-ease),
              background var(--kh-dur) var(--kh-ease);
}
.kh-faq__item[open] .kh-faq__icon {
  background: var(--kh-saffron);
  transform: rotate(45deg);
}
.kh-faq__icon svg { width: 14px; height: 14px; }
.kh-faq__a {
  padding: 0 var(--kh-s-6) var(--kh-s-6);
  font-size: var(--kh-fs-md);
  line-height: 1.6;
  color: var(--kh-fg-2);
  margin: 0;
  animation: khFaqIn 220ms var(--kh-ease);
}
@keyframes khFaqIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal dialog (popup, e.g. unlock the syllabus) ──────
   Uses native <dialog>. Centered, rounded card, with a
   blurred backdrop and ESC-to-close out of the box. */
.kh-modal {
  border: none;
  background: var(--kh-paper);
  border-radius: var(--kh-r-xl);
  padding: 0;
  box-shadow: var(--kh-shadow-3);
  max-width: 480px;
  width: calc(100% - 32px);
  color: var(--kh-fg);
  font-family: inherit;
}
.kh-modal[open] {
  display: block;
  padding: var(--kh-s-10);
  animation: khModalIn 240ms var(--kh-ease);
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.kh-modal::backdrop {
  background: rgba(15, 26, 51, 0.55);
  backdrop-filter: blur(4px);
  animation: khBackdropIn 240ms var(--kh-ease);
}
@keyframes khModalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes khBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.kh-modal__close {
  position: absolute;
  top: var(--kh-s-4);
  inset-inline-end: var(--kh-s-4);
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--kh-fg-muted);
  transition: background var(--kh-dur) var(--kh-ease),
              color var(--kh-dur) var(--kh-ease);
}
.kh-modal__close:hover {
  background: var(--kh-cream-2);
  color: var(--kh-navy-deep);
}

/* When the gate form lives inside the modal, drop the card chrome */
.kh-modal .kh-gate-form {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: none;
}

/* ── Syllabus content gate ───────────────────────────────
   Wraps the locked modules. While locked: blurred + non-interactive,
   with a fade overlay carrying an Unlock CTA + email form. */
.kh-modules__locked {
  position: relative;
  margin-top: var(--kh-s-4);
  isolation: isolate;
  border-radius: var(--kh-r-md);
  overflow: hidden;
}
.kh-modules__locked > .kh-modules {
  filter: blur(7px) saturate(0.55) brightness(1.05);
  pointer-events: none;
  user-select: none;
  transition: filter 400ms var(--kh-ease);
  margin-top: 0;
}
.kh-modules__locked.is-unlocked > .kh-modules {
  filter: none;
  pointer-events: auto;
  user-select: auto;
}

.kh-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 56px var(--kh-s-6) var(--kh-s-8);
  background: linear-gradient(180deg,
    rgba(247, 241, 225, 0.0) 0%,
    rgba(247, 241, 225, 0.55) 18%,
    rgba(247, 241, 225, 0.92) 45%,
    var(--kh-cream) 70%);
  text-align: center;
  transition: opacity 320ms var(--kh-ease);
}
.kh-gate-overlay.is-unlocked {
  opacity: 0;
  pointer-events: none;
}
[data-kh-overlay].is-removed { display: none; }

/* Placeholder card — uses real h3/p elements so heights match the real
   cards exactly (same fonts, same line-heights, same padding).
   Skeleton shimmer is painted directly on the title/desc. No leakable text. */
.kh-module--placeholder { user-select: none; }
.kh-module--placeholder .kh-module__num {
  background: var(--kh-cream-2) !important;
  color: transparent;
}
.kh-module--placeholder .kh-module__title,
.kh-module--placeholder .kh-module__desc {
  color: transparent;
  background: linear-gradient(90deg, var(--kh-cream-2) 0%, var(--kh-line) 50%, var(--kh-cream-2) 100%);
  background-size: 200% 100%;
  animation: khSkelShimmer 2.4s linear infinite;
  border-radius: 4px;
}
.kh-module--placeholder .kh-module__title { width: 88%; }
.kh-module--placeholder .kh-module__desc  { width: 50%; }

/* If placeholders end on an odd count (e.g. 5 in a 2-col grid),
   center the lone last card so the row doesn't look lopsided. */
.kh-modules__locked .kh-module:nth-child(odd):last-child {
  grid-column: 1 / -1;
  max-width: calc(50% - var(--kh-s-2));
  justify-self: center;
}
@media (max-width: 720px) {
  .kh-modules__locked .kh-module:nth-child(odd):last-child {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }
}
@keyframes khSkelShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.kh-gate-cta {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.kh-gate-cta.is-hidden { display: none; }
.kh-gate-cta .kh-eyebrow { display: block; margin-bottom: var(--kh-s-3); }

.kh-gate-form {
  display: none;
  width: 100%;
  max-width: 460px;
  text-align: start;
  background: var(--kh-paper);
  border: 1px solid var(--kh-line);
  border-radius: var(--kh-r-lg);
  padding: var(--kh-s-6);
  box-shadow: var(--kh-shadow-2);
}
.kh-gate-form.is-revealed {
  display: grid;
  gap: var(--kh-s-4);
  animation: khGateFormIn 240ms var(--kh-ease);
}
@keyframes khGateFormIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kh-gate-form .kh-form__feedback { margin-top: 4px; }

@media (max-width: 640px) {
  .kh-gate-overlay { padding: var(--kh-s-8) var(--kh-s-4) var(--kh-s-8); }
}

/* ── WhatsApp floating button ────────────────────────────
   Third-party service — uses WhatsApp's signature green
   (#25D366) for instant recognition. Stays bottom-right
   physically in both LTR and RTL. */
.kh-whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #25D366;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 26, 51, 0.25);
  transition: transform var(--kh-dur) var(--kh-ease),
              box-shadow var(--kh-dur) var(--kh-ease);
  animation: khWaIn 320ms var(--kh-ease) 600ms both;
}
.kh-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 26, 51, 0.32),
              0 0 0 6px rgba(37, 211, 102, 0.18);
}
.kh-whatsapp:active { transform: translateY(0); }
.kh-whatsapp svg { width: 28px; height: 28px; display: block; }

@keyframes khWaIn {
  from { opacity: 0; transform: translateY(20px) scale(0.85); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Attention pulse — runs twice 4s after load, then stops */
.kh-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid #25D366;
  animation: khWaPulse 2.4s var(--kh-ease) 4s 2 both;
  opacity: 0;
  pointer-events: none;
}
@keyframes khWaPulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(1.7); opacity: 0;   }
}

@media (max-width: 540px) {
  .kh-whatsapp { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .kh-whatsapp svg { width: 26px; height: 26px; }
}

/* ── Partners strip ──────────────────────────────────────── */
.kh-partners {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--kh-s-8);
  flex-wrap: wrap;
  opacity: 0.78;
}
.kh-partners__item {
  font-family: var(--kh-sans);
  font-weight: 700;
  font-size: var(--kh-fs-md);
  letter-spacing: 0.06em;
  color: var(--kh-navy);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: var(--kh-s-2);
}

/* ──────────────────────────────────────────────────────────
   MOBILE CONSOLIDATED FIXES
   Targeted overrides for layouts that misbehave on small
   viewports. Lives at the end so it wins specificity ties.
   ────────────────────────────────────────────────────────── */

/* Tablet & below — collapse inline-styled CTA grids */
@media (max-width: 900px) {
  /* PAY ONCE-style dark CTAs use inline grid-template-columns;
     force a single column when the viewport gets narrow. */
  .kh-cta__grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    align-items: start !important;
    gap: var(--kh-s-6) !important;
  }
  /* Team grid on About uses inline grid-template-columns; collapse it too. */
  .kh-team[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 540px) {
  .kh-team[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

/* Phone — squeeze the unlock gate so it stops feeling oversized.
   Critical: cap the locked area height so the CTA isn't floating
   in a sea of single-column placeholder cards. */
@media (max-width: 640px) {
  .kh-modules__locked {
    max-height: 360px;
    overflow: hidden;
  }
  .kh-gate-overlay {
    padding: 28px var(--kh-s-4) var(--kh-s-5);
    justify-content: center;
    background: linear-gradient(180deg,
      rgba(247, 241, 225, 0.0) 0%,
      rgba(247, 241, 225, 0.65) 12%,
      rgba(247, 241, 225, 0.96) 30%,
      var(--kh-cream) 50%);
  }
  .kh-gate-cta { max-width: 100%; }
  .kh-gate-cta .kh-eyebrow { margin-bottom: var(--kh-s-2); font-size: 10px; }
  .kh-gate-cta .kh-h4 { font-size: var(--kh-fs-lg); }
  .kh-gate-cta p { font-size: var(--kh-fs-sm); margin: 4px 0 14px; }
  .kh-gate-cta .kh-btn--lg {
    padding: 12px 18px;
    font-size: var(--kh-fs-sm);
    width: auto;
    max-width: 100%;
  }

  /* Modal: tighter internal padding so the form breathes */
  .kh-modal[open] {
    padding: var(--kh-s-6);
    max-height: calc(100vh - 24px);
  }
  .kh-modal__close { top: var(--kh-s-2); inset-inline-end: var(--kh-s-2); }
  .kh-modal .kh-h3 { font-size: var(--kh-fs-xl); }

  /* Hero floating photo caption — stops blocking the image on small screens */
  .kh-photo-caption {
    inset-inline-end: 12px;
    inset-block-end: 12px;
    inset-inline-start: 12px;
    max-width: none;
    padding: var(--kh-s-3) var(--kh-s-4);
  }
  .kh-photo-caption__name { font-size: var(--kh-fs-sm); }
  .kh-photo-caption__role { font-size: 11px; }

  /* Live floating badge — smaller, hugs the corner */
  .kh-live--floating {
    inset-block-start: 12px;
    inset-inline-start: 12px;
    padding: 6px 10px;
    font-size: 10px;
  }

  /* Course feature price row — wrap cleanly when narrow */
  .kh-feature__price-row { flex-wrap: wrap; gap: var(--kh-s-2); margin-block: var(--kh-s-4); }
  .kh-feature__price { font-size: var(--kh-fs-xl); }
  .kh-price-was { font-size: var(--kh-fs-md); }

  /* Stats: keep them readable, allow wrap */
  .kh-stats { gap: var(--kh-s-5); }
  .kh-stat__num { font-size: var(--kh-fs-xl); }

  /* Footer: tighter padding + center text */
  .kh-footer { padding: var(--kh-s-10) 0 var(--kh-s-4); }

  /* Course card grid: ensure cards aren't squeezed */
  .kh-course__title { font-size: var(--kh-fs-md); }

  /* Module cards: less padding so two long titles fit */
  .kh-module { padding: var(--kh-s-4); gap: var(--kh-s-3); }
  .kh-module__num { width: 30px; height: 30px; font-size: 12px; }
  .kh-module__title { font-size: var(--kh-fs-sm); }
  .kh-module__desc { font-size: 12px; }

  /* FAQ: less internal padding */
  .kh-faq__q { padding: var(--kh-s-4) var(--kh-s-5); font-size: var(--kh-fs-sm); }
  .kh-faq__a { padding: 0 var(--kh-s-5) var(--kh-s-5); font-size: var(--kh-fs-sm); }

  /* Form layout in contact: textarea breathes */
  .kh-form { padding: var(--kh-s-5); }
  .kh-textarea { min-height: 110px; }

  /* WhatsApp button — already responsive at 540px, keep as-is */
}

/* ──────────────────────────────────────────────────────────
   THEME TOGGLE + DARK MODE
   Light is default. Dark mode is opt-in via [data-theme="dark"]
   on <html>, persisted in localStorage. The brand step-bar
   colors (saffron / teal / coral) stay unchanged in both
   modes — only neutrals invert.
   ────────────────────────────────────────────────────────── */

/* Sun/moon button in the navbar */
.kh-theme-toggle {
  background: transparent;
  border: 1px solid var(--kh-line);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--kh-navy-deep);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--kh-dur) var(--kh-ease),
              border-color var(--kh-dur) var(--kh-ease),
              color var(--kh-dur) var(--kh-ease);
}
.kh-theme-toggle:hover { background: var(--kh-cream-2); border-color: var(--kh-navy); }
.kh-theme-toggle svg { width: 18px; height: 18px; }
.kh-theme-toggle__sun { display: none; }
[data-theme="dark"] .kh-theme-toggle__sun { display: block; }
[data-theme="dark"] .kh-theme-toggle__moon { display: none; }

/* ── Dark theme overrides ───────────────────────────────── */
[data-theme="dark"] body {
  background: #0F1A33;
  color: #F2EDE0;
}

/* Smooth swap on toggle */
[data-theme="dark"] body,
[data-theme="dark"] .kh-nav,
[data-theme="dark"] .kh-section--cream-2,
[data-theme="dark"] .kh-section--paper {
  transition: background var(--kh-dur) var(--kh-ease),
              color var(--kh-dur) var(--kh-ease);
}

/* Typography */
[data-theme="dark"] .kh-h1,
[data-theme="dark"] .kh-h2,
[data-theme="dark"] .kh-h3,
[data-theme="dark"] .kh-h4,
[data-theme="dark"] .kh-display,
[data-theme="dark"] .kh-hero__title,
[data-theme="dark"] .kh-pageheader__title,
[data-theme="dark"] .kh-cta__title { color: #F7F1E1; }
[data-theme="dark"] .kh-body { color: #C8CEDA; }
[data-theme="dark"] .kh-eyebrow { color: #9AA0B5; }
[data-theme="dark"] strong { color: #F7F1E1; }

/* Sections */
[data-theme="dark"] .kh-section--cream-2 { background: #15243F; }
[data-theme="dark"] .kh-section--paper   { background: #1B2A4E; }

/* Navbar */
[data-theme="dark"] .kh-nav {
  background: rgba(15, 26, 51, 0.85);
}
[data-theme="dark"] .kh-nav.is-scrolled { border-bottom-color: rgba(247,241,225,.1); }
[data-theme="dark"] .kh-brand,
[data-theme="dark"] .kh-brand__ar { color: #F7F1E1; }
[data-theme="dark"] .kh-nav__links a { color: #F7F1E1; }
[data-theme="dark"] .kh-nav__lang { color: #F7F1E1; }
[data-theme="dark"] .kh-nav__toggle { color: #F7F1E1; border-color: rgba(247,241,225,.18); }
[data-theme="dark"] .kh-nav__toggle:hover { background: #1B2A4E; }
[data-theme="dark"] .kh-theme-toggle { color: #F7F1E1; border-color: rgba(247,241,225,.18); }
[data-theme="dark"] .kh-theme-toggle:hover { background: #1B2A4E; border-color: #F7F1E1; }
[data-theme="dark"] .kh-nav.is-open .kh-nav__links { background: #15243F; border-top-color: rgba(247,241,225,.1); }
[data-theme="dark"] .kh-nav.is-open .kh-nav__links a { color: #F7F1E1; }
[data-theme="dark"] .kh-nav.is-open .kh-nav__links a:hover { background: rgba(247,241,225,.06); }
[data-theme="dark"] .kh-nav.is-open .kh-nav__links a.is-active { background: rgba(240,135,98,.14); }
[data-theme="dark"] .kh-nav__lang--mobile { color: #9AA0B5 !important; }

/* Cards (course, category, module, FAQ, form, testimonial, value, team, modal, photo caption) */
[data-theme="dark"] .kh-course,
[data-theme="dark"] .kh-cat,
[data-theme="dark"] .kh-module,
[data-theme="dark"] .kh-faq__item,
[data-theme="dark"] .kh-form,
[data-theme="dark"] .kh-testimonial,
[data-theme="dark"] .kh-value,
[data-theme="dark"] .kh-team__card,
[data-theme="dark"] .kh-modal {
  background: #1B2A4E;
  border-color: rgba(247,241,225,.10);
}

/* Card content text */
[data-theme="dark"] .kh-course__title,
[data-theme="dark"] .kh-cat__title,
[data-theme="dark"] .kh-module__title,
[data-theme="dark"] .kh-team__name,
[data-theme="dark"] .kh-testimonial__quote,
[data-theme="dark"] .kh-value__title { color: #F7F1E1; }
[data-theme="dark"] .kh-course__instructor,
[data-theme="dark"] .kh-cat__desc,
[data-theme="dark"] .kh-module__desc,
[data-theme="dark"] .kh-team__role,
[data-theme="dark"] .kh-testimonial__name,
[data-theme="dark"] .kh-testimonial__role,
[data-theme="dark"] .kh-value__desc,
[data-theme="dark"] .kh-faq__a { color: #C8CEDA; }
[data-theme="dark"] .kh-course__price,
[data-theme="dark"] .kh-feature__price { color: #F7F1E1; }
[data-theme="dark"] .kh-module__num { color: #0F1A33; }
[data-theme="dark"] .kh-faq__q { color: #F7F1E1; }
[data-theme="dark"] .kh-faq__q:hover { background: #15243F; }
[data-theme="dark"] .kh-faq__icon { background: #15243F; color: #F7F1E1; }
[data-theme="dark"] .kh-faq__item[open] { border-color: rgba(247,241,225,.18); }
[data-theme="dark"] .kh-faq__item[open] .kh-faq__icon { background: var(--kh-saffron); color: var(--kh-navy-deep); }

/* Stats */
[data-theme="dark"] .kh-stat__num { color: #F7F1E1; }
[data-theme="dark"] .kh-stat__label { color: #9AA0B5; }
[data-theme="dark"] .kh-stats { border-top-color: rgba(247,241,225,.10); }

/* Live badge — !important to defeat the hero's inline color: navy-deep style */
[data-theme="dark"] .kh-live {
  background: #1B2A4E !important;
  color: #F7F1E1 !important;
  border-color: rgba(247,241,225,.15) !important;
}
[data-theme="dark"] .kh-live--floating { background: rgba(27,42,78,.92) !important; }
[data-theme="dark"] .kh-live__dot { background: var(--kh-coral); }

/* Photo caption */
[data-theme="dark"] .kh-photo-caption { background: rgba(27,42,78,.94); }
[data-theme="dark"] .kh-photo-caption__name { color: #F7F1E1; }
[data-theme="dark"] .kh-photo-caption__role { color: #C8CEDA; }

/* Filter bar */
[data-theme="dark"] .kh-filter { background: #1B2A4E; border-color: rgba(247,241,225,.10); }
[data-theme="dark"] .kh-filter__btn { color: #F7F1E1; }
[data-theme="dark"] .kh-filter__btn:hover { background: #15243F; }

/* Form fields */
[data-theme="dark"] .kh-input,
[data-theme="dark"] .kh-textarea,
[data-theme="dark"] .kh-select {
  background: #15243F;
  color: #F7F1E1;
  border-color: rgba(247,241,225,.18);
}
[data-theme="dark"] .kh-input::placeholder,
[data-theme="dark"] .kh-textarea::placeholder { color: #6B7290; }
[data-theme="dark"] .kh-label { color: #9AA0B5; }
[data-theme="dark"] .kh-form__notice { color: #9AA0B5; }

/* Buttons */
[data-theme="dark"] .kh-btn--primary {
  background: var(--kh-saffron);
  color: var(--kh-navy-deep);
}
[data-theme="dark"] .kh-btn--primary:hover {
  background: var(--kh-saffron);
  filter: brightness(0.95);
}
[data-theme="dark"] .kh-btn--ghost {
  color: #F7F1E1;
  border-color: rgba(247,241,225,.22);
}
[data-theme="dark"] .kh-btn--ghost:hover {
  border-color: #F7F1E1;
  background: rgba(247,241,225,.06);
}
[data-theme="dark"] .kh-btn--cream {
  background: #15243F;
  color: #F7F1E1;
}
[data-theme="dark"] .kh-link { color: #F7F1E1; }

/* Chips */
[data-theme="dark"] .kh-chip { background: #15243F; color: #F7F1E1; border-color: rgba(247,241,225,.12); }

/* Course feature media (photo) — overlays already work */

/* Hero photo frame stays dark — fine */

/* Course media gradient backgrounds — keep brand colors */

/* Locked area placeholders + gate overlay */
[data-theme="dark"] .kh-module--placeholder .kh-module__num { background: #15243F !important; }
[data-theme="dark"] .kh-module--placeholder .kh-module__title,
[data-theme="dark"] .kh-module--placeholder .kh-module__desc {
  background: linear-gradient(90deg, #15243F 0%, #243456 50%, #15243F 100%);
}
[data-theme="dark"] .kh-gate-overlay {
  background: linear-gradient(180deg,
    rgba(15,26,51,0.0) 0%,
    rgba(15,26,51,0.55) 14%,
    rgba(15,26,51,0.94) 36%,
    #0F1A33 65%);
}
/* Gate CTA stays transparent in both themes — sits over the gradient overlay */

/* Modal */
[data-theme="dark"] .kh-modal__close { color: #C8CEDA; }
[data-theme="dark"] .kh-modal__close:hover { background: #15243F; color: #F7F1E1; }

/* PAY ONCE / dark CTAs already dark — keep unchanged */

/* Hero accent text + accents already use brand colors */

/* Testimonial avatar — only colored dot if no img */
[data-theme="dark"] .kh-testimonial__avatar { background: #15243F; }

/* Contact list */
[data-theme="dark"] .kh-contact__icon { background: #15243F; color: #F7F1E1; }
[data-theme="dark"] .kh-contact__icon svg { stroke: currentColor; }
[data-theme="dark"] .kh-contact__label { color: #9AA0B5; }
[data-theme="dark"] .kh-contact__value { color: #F7F1E1; }
[data-theme="dark"] .kh-contact__item { border-bottom-color: rgba(247,241,225,.08); }

/* Cat icons — keep saffron/teal/coral, but if navy ensure visible */
[data-theme="dark"] .kh-cat__icon[style*="--kh-navy"] { background: #F4C13D !important; }

/* Note boxes (cream-2 inline) */
[data-theme="dark"] [style*="background: var(--kh-cream-2)"] {
  background: #15243F !important;
}

/* Price-was strikethrough */
[data-theme="dark"] .kh-price-was { color: #9AA0B5; }
[data-theme="dark"] .kh-feature__price-note { color: #9AA0B5; }

/* Misc dividers */
[data-theme="dark"] hr,
[data-theme="dark"] .kh-divider { background: rgba(247,241,225,.10); }

/* Partners strip — navy text becomes invisible on dark bg */
[data-theme="dark"] .kh-partners { opacity: 0.65; }
[data-theme="dark"] .kh-partners__item { color: #C8CEDA; }
