/* ===== Single course page: layout grid + CTA card + mobile sticky bar ===== */
.ng-course-page, .ng-sticky {
  --ng-primary: #70479b;
  --ng-primary-hover: #5d3a7a;
  --ng-tint: #70479b1a;
  --ng-accent: #f26d21;
  --ng-accent-hover: #d95c15;
  --ng-accent-border: #f9bf9b;
  --ng-text: #0f1b3d;
  --ng-text-2: #475569;
  --ng-muted: #64748b;
  --ng-border: #e2e8f0;
  --ng-soft: #f1f5f9;
}

/* Layout: mobile/tablet stack title -> card -> content; desktop puts the card in a sticky right column. */
.ng-course {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "aside" "main";
  gap: 24px 40px;
  padding: 24px 0;
}
.ng-course__head { grid-area: head; min-width: 0; }
.ng-course__aside { grid-area: aside; min-width: 0; }
.ng-course__main { grid-area: main; min-width: 0; }
@media (min-width: 1200px) {
  .ng-course {
    grid-template-columns: minmax(0, 1fr) 370px;
    grid-template-rows: auto 1fr;
    grid-template-areas: "head aside" "main aside";
  }
  .ng-course__aside .ng-cta { position: sticky; top: 100px; }
  /* WPLMS sets .pusher{overflow:hidden}, which disables sticky; clip hides overflow the same way without that. */
  .single-course .pusher { overflow: clip; display: flow-root; }
}

.ng-course .post-excerpt p {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px; font-weight: 400; line-height: 26px; color: var(--ng-muted);
}
.awarding-body-img { margin-bottom: 40px; }
.awarding-body-img img { max-width: 100%; height: auto; }
div#hubspot-messages-iframe-container { display: none !important; }

/* Card */
.ng-cta {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--ng-text);
  background: #fff;
  border: 1px solid var(--ng-border);
  border-radius: 16px;
  box-shadow: 0 12px 32px -18px rgba(15, 23, 42, .25);
  overflow: hidden;
}
.ng-cta *, .ng-cta *::before, .ng-cta *::after { box-sizing: border-box; }
.ng-cta__media img { display: block; width: 100%; height: 210px; object-fit: cover; }
.ng-cta__media a { display: block; height: 100%; }
.ng-cta__body { padding: 16px 20px 20px; }
.ng-cta__panel, .ng-team { display: flex; flex-direction: column; gap: 16px; }
.ng-cta__panel[hidden] { display: none; }

/* For you / For your team switch */
.ng-cta__switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; margin-bottom: 18px;
  background: var(--ng-soft); border-radius: 12px;
}
.ng-cta__switch button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 8px; border: 0; border-radius: 9px; background: transparent;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ng-text-2); cursor: pointer;
}
.ng-cta__switch button svg { color: var(--ng-muted); }
.ng-cta__switch button[aria-selected="true"] {
  background: #fff; color: var(--ng-text); font-weight: 700;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}
.ng-cta__switch button[aria-selected="true"] svg { color: var(--ng-primary); }
.ng-cta__switch button:focus-visible { outline: 2px solid var(--ng-primary); outline-offset: 1px; }

/* Price row */
.ng-cta__price-row { display: flex; align-items: center; gap: 10px; }
.ng-cta__price { font-size: 52px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ng-cta__price-meta { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; color: var(--ng-muted); }
.ng-cta__price-meta strong { font-size: 15px; color: var(--ng-text); white-space: nowrap; }
.ng-cta__was { font-size: 16px; font-weight: 600; text-decoration: line-through; }
.ng-cta__save {
  margin-left: auto; padding: 5px 10px; border-radius: 8px;
  background: var(--ng-tint); color: var(--ng-primary);
  font-size: 15px; font-weight: 800; white-space: nowrap;
}
.ng-cta__proof { margin: -6px 0 0; font-size: 13px; color: var(--ng-text-2); }

/* Timer + Enrol button share one rounded box */
.ng-cta__offer { border: 1px solid var(--ng-accent-border); border-radius: 14px; overflow: hidden; box-shadow: 0 10px 22px -12px rgba(242, 109, 33, .7); }
.ng-cta__timer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ng-accent);
}
.ng-cta__timer strong { margin-left: 4px; color: var(--ng-text); font-weight: 800; font-variant-numeric: tabular-nums; }

.ng-cta .ng-cta__actions { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0 !important; text-align: center; }
.ng-cta .ng-cta__actions a,
.ng-cta .ng-cta__actions button {
  display: flex !important; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; margin: 0 !important; padding: 0 16px !important;
  border-radius: 14px !important; font-size: 19px; font-weight: 700; line-height: 1;
  text-decoration: none; transition: background-color .15s, transform .05s;
}
.ng-cta .ng-cta__actions a.ng-btn--primary {
  border: 0 !important; background: var(--ng-accent) !important; color: #fff !important;
  box-shadow: 0 10px 22px -12px rgba(242, 109, 33, .8);
}
.ng-cta .ng-cta__offer .ng-cta__actions a.ng-btn--primary { border-radius: 0 !important; box-shadow: none; }
.ng-cta .ng-cta__actions a.ng-btn--primary:hover { background: var(--ng-accent-hover) !important; }
.ng-cta .ng-cta__actions a:active { transform: translateY(1px); }
.ng-cta .ng-cta__actions a:focus-visible { outline: 3px solid rgba(112, 71, 155, .35); outline-offset: 2px; }

.ng-cta__guarantee {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
  margin-top: -4px; font-size: 13px; color: var(--ng-text-2);
}
.ng-cta__guarantee > span { display: inline-flex; align-items: center; gap: 5px; }
.ng-cta__guarantee svg { color: var(--ng-primary); }

.ng-cta__footer-link {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  padding-top: 16px; border-top: 1px solid var(--ng-border);
  color: var(--ng-primary) !important; font-size: 14px; font-weight: 700; text-decoration: none;
}
.ng-cta__footer-link svg { width: 15px; height: 15px; }
.ng-cta__footer-link:hover { color: var(--ng-primary-hover) !important; text-decoration: underline; text-underline-offset: 3px; }

/* Team panel */
.ng-team__stepper {
  display: flex; align-items: stretch; margin-left: auto;
  border: 1px solid var(--ng-border); border-radius: 12px; overflow: hidden;
}
.ng-team__stepper button {
  width: 40px; border: 0; background: #fff;
  color: var(--ng-primary); font-size: 22px; font-weight: 700; cursor: pointer;
}
.ng-team__stepper button:hover { background: var(--ng-soft); }
.ng-team__stepper input {
  width: 48px; height: 44px; margin: 0; padding: 0; text-align: center;
  border: 0; border-left: 1px solid var(--ng-border); border-right: 1px solid var(--ng-border);
  font: inherit; font-size: 16px; font-weight: 700; color: var(--ng-text); -moz-appearance: textfield;
}
.ng-team__stepper input::-webkit-inner-spin-button,
.ng-team__stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ng-team__summary { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; color: var(--ng-text-2); }
.ng-team__summary strong { margin-left: 6px; font-size: 20px; font-weight: 800; color: var(--ng-text); }
.ng-team .ng-cta__price { font-size: 48px; }

/* Tablet: card goes horizontal (image left, content right) */
@media (min-width: 768px) and (max-width: 1199px) {
  .ng-cta { display: grid; grid-template-columns: 42% 1fr; }
  .ng-cta__media img { height: 100%; min-height: 100%; }
}
@media (max-width: 767px) {
  .ng-cta__body { padding: 16px; }
  .ng-cta__media img { height: 180px; }
  .ng-cta__price { font-size: 46px; }
  .ng-cta__switch button { font-size: 14px; }
}
@media (max-width: 380px) {
  .ng-cta__price { font-size: 40px; }
  .ng-team .ng-cta__price { font-size: 38px; }
}

/* Staff-only coupon tester */
.course-coupon-bar { padding: 15px; background: #f8f8f8; border-radius: 8px; }
.course-coupon-bar h3 { margin: 0; font-size: 15px; }
.coupon-input-container { display: flex; gap: 10px; margin: 10px 0; }
#course-coupon-code { flex: 1; min-width: 0; padding: 10px; border: 1px solid #ddd; border-radius: 4px; }
#apply-course-coupon { padding: 10px 15px; border: 0; border-radius: 4px; background: var(--ng-primary); color: #fff; cursor: pointer; }
#apply-course-coupon:hover { background: var(--ng-primary-hover); }
#coupon-message { font-size: 14px; }
.discounted-price { font-weight: bold; }

.ng-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mobile sticky bar */
.ng-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999;
  display: none; align-items: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--ng-border);
  box-shadow: 0 -8px 24px -12px rgba(15, 23, 42, .25);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif; color: var(--ng-text);
  transform: translateY(110%); transition: transform .2s ease;
  box-sizing: border-box;
}
.ng-sticky *, .ng-sticky *::before, .ng-sticky *::after { box-sizing: border-box; }
@media (max-width: 767px) { .ng-sticky { display: flex; } }
.ng-sticky.is-visible { transform: translateY(0); }
.ng-sticky__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ng-sticky__price-row { display: flex; align-items: baseline; gap: 6px; }
.ng-sticky__price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ng-sticky__was { font-size: 13px; color: var(--ng-muted); text-decoration: line-through; }
.ng-sticky__timer { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ng-accent); font-variant-numeric: tabular-nums; }
.ng-sticky__btn {
  height: 50px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  transition: background-color .15s, transform .05s;
}
.ng-sticky__btn:active { transform: translateY(1px); }
.ng-sticky__btn:focus-visible { outline: 3px solid rgba(112, 71, 155, .35); outline-offset: 2px; }
.ng-sticky__basket { width: 50px; flex: 0 0 50px; border: 1.5px solid var(--ng-primary); background: #fff; color: var(--ng-primary); }
.ng-sticky__basket.added { background: var(--ng-soft); }
.ng-sticky__basket + .added_to_cart { display: none; }
.ng-sticky__buy { flex: 0 0 130px; border: 0; background: var(--ng-accent); color: #fff !important; font-size: 15.5px; font-weight: 700; }
.ng-sticky__buy:hover { background: var(--ng-accent-hover); }
/* Sit above the theme's 65px bottom navbar (footer-single.php) instead of behind it. */
@media (max-width: 767px) {
  body:has(.S-Bottom-Navbar) .ng-sticky { bottom: 65px; padding-bottom: 12px; }
  body:has(.S-Bottom-Navbar) .ng-sticky:not(.is-visible) { transform: translateY(calc(100% + 65px)); }
  .xoo-wsc-basket { bottom: 75px; }
  body:has(.S-Bottom-Navbar) .xoo-wsc-basket { bottom: 151px; }
}
