/* =========================================================
   Premium design system for courses.html and branch pages.
   Built on top of css/common.css tokens and base styles.
   ========================================================= */

/* ---------- Cinematic page hero ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--header-height);
  color: var(--white);
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  background-color: var(--navy-deep);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, rgba(2, 8, 18, 0.97) 0%, rgba(6, 26, 64, 0.93) 34%, rgba(6, 26, 64, 0.64) 64%, rgba(6, 26, 64, 0.28) 100%);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  padding-top: 34px;
  padding-bottom: 54px;
}

.page-hero-grid {
  display: grid;
  gap: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--gold-light);
}

.breadcrumb .crumb-sep {
  color: var(--gold);
}

.breadcrumb .crumb-current {
  color: var(--gold-light);
}

.page-hero .eyebrow {
  color: var(--gold-light);
}

.page-hero h1 {
  max-width: 760px;
  margin-top: 12px;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.06;
}

.page-hero .hero-subtitle {
  max-width: 620px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.02rem;
  line-height: 1.62;
}

.page-hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.page-hero .hero-actions .btn {
  width: 100%;
}

/* ---------- Ecosystem / quick facts floating panel ---------- */
.hero-panel {
  position: relative;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(2, 8, 18, 0.68);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(16px);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 3px solid var(--gold);
}

.hero-panel-header {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-panel-header span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-panel-header strong {
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.02rem;
}

.hero-panel-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.hero-panel-list div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
}

.hero-panel-list em {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--navy), var(--red));
  font-family: var(--serif);
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
}

.hero-panel-list strong {
  display: block;
  color: var(--white);
  font-size: 0.86rem;
  line-height: 1.3;
}

.hero-panel-list span {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

/* ---------- Facts strip (branch pages) ---------- */
.facts-strip {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 8px;
  margin-top: -32px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border: 1px solid rgba(229, 199, 119, 0.3);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(179, 25, 66, 0.12), rgba(229, 199, 119, 0.16), rgba(6, 26, 64, 0.12)),
    rgba(6, 26, 64, 0.14);
  box-shadow: 0 20px 52px rgba(2, 8, 18, 0.28);
  backdrop-filter: blur(14px);
  padding: 6px;
}

.facts-strip::-webkit-scrollbar {
  display: none;
}

.facts-strip div {
  position: relative;
  min-width: 78%;
  min-height: 82px;
  padding: 16px 18px;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 240, 0.95)),
    var(--ivory-2);
}

.facts-strip div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.facts-strip strong {
  display: block;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.3;
}

/* ---------- Section rhythm ---------- */
.alt-section {
  position: relative;
  background: linear-gradient(180deg, var(--ivory), rgba(255, 250, 240, 0.9)), var(--ivory);
}

.pattern-section {
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(247, 242, 231, 0.3), rgba(247, 242, 231, 0.4)),
    url("../assets/images/courses-pattern-bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.navy-section {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 12%, rgba(229, 199, 119, 0.14), transparent 21rem),
    linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 62%, var(--navy) 100%);
}

.navy-section::before,
.alt-section::before,
.pattern-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
}

.navy-section .section-kicker {
  color: var(--gold-light);
}

.navy-section .section-header h2,
.navy-section .section-header p {
  color: var(--white);
}

.navy-section .section-header p {
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Cinematic image sections (Quality / CTA) ---------- */
.cinematic-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--navy-deep);
}

.cinematic-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(2, 8, 18, 0.82) 0%, rgba(6, 26, 64, 0.72) 44%, rgba(6, 26, 64, 0.5) 76%, rgba(6, 26, 64, 0.3) 100%);
}

.cinematic-section::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
}

.cinematic-section .container {
  position: relative;
  z-index: 1;
}

.cinematic-section .section-kicker {
  color: var(--gold-light);
}

.cinematic-section .section-header h2,
.cinematic-section .section-header p {
  color: var(--white);
}

.cinematic-section .section-header p {
  color: rgba(255, 255, 255, 0.76);
}

/* Glass cards used on cinematic dark backgrounds */
.glass-grid {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.glass-grid article {
  position: relative;
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.glass-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(229, 199, 119, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.08);
}

.glass-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--red));
}

.glass-grid article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--navy-2), var(--red));
  box-shadow: 0 10px 20px rgba(2, 8, 18, 0.32);
  font-family: var(--serif);
  font-size: 0.76rem;
  font-weight: 800;
}

.glass-grid article strong {
  color: var(--white);
  font-size: 0.98rem;
  line-height: 1.35;
}

/* ---------- Branch strip (courses.html auto-scrolling wayfinding ticker) ---------- */
.branch-strip-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--ivory), rgba(255, 250, 240, 0.9)), var(--ivory);
  padding: 22px 0;
  border-bottom: 1px solid rgba(6, 26, 64, 0.08);
}

.branch-strip {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 56px, black calc(100% - 56px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 56px, black calc(100% - 56px), transparent 100%);
}

.branch-strip::-webkit-scrollbar {
  display: none;
}

.branch-strip-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding-bottom: 2px;
  animation: branch-ticker 48s linear infinite;
  will-change: transform;
}

.branch-strip-track.is-paused,
.branch-strip:hover .branch-strip-track,
.branch-strip:focus-within .branch-strip-track {
  animation-play-state: paused;
}

@keyframes branch-ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.branch-strip-track a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px 0 8px;
  border: 1px solid rgba(6, 26, 64, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.branch-strip-track a:hover,
.branch-strip-track a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(183, 138, 45, 0.5);
  box-shadow: 0 10px 24px rgba(6, 26, 64, 0.1);
}

.branch-strip-track a img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

@media (prefers-reduced-motion: reduce) {
  .branch-strip-track {
    animation: none;
  }
}

/* ---------- Branch grid (courses.html) ---------- */
.branch-grid {
  display: grid;
  gap: 18px;
  align-items: stretch;
}

.branch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 44px rgba(2, 8, 18, 0.24);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.branch-card:hover {
  transform: translateY(-5px);
  border-color: rgba(229, 199, 119, 0.55);
  box-shadow: 0 28px 62px rgba(2, 8, 18, 0.34);
}

.branch-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  border-right: 1px solid rgba(229, 199, 119, 0.32);
  border-bottom: 1px solid rgba(229, 199, 119, 0.32);
  pointer-events: none;
}

.branch-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--navy-deep);
}

.branch-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.branch-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.branch-body h3 {
  color: var(--white);
}

.branch-body p {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.7);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.branch-sample-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.branch-sample-list span {
  position: relative;
  padding-left: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
}

.branch-sample-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.branch-body a.branch-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gold-light);
  font-weight: 900;
}

.branch-body a.branch-link::before {
  content: "";
  position: absolute;
  inset: 0;
}

.branch-body a.branch-link::after {
  content: "\2192";
  margin-left: 9px;
  color: var(--white);
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.branch-card:hover .branch-body a.branch-link::after {
  transform: translateX(4px);
}

/* ---------- Steps timeline (How AIDT Pathways Work) ---------- */
.steps-track {
  position: relative;
  list-style: none;
  display: grid;
  gap: 16px;
  margin-top: 30px;
}

.step-stage {
  position: relative;
  padding: 24px 22px 22px;
  overflow: hidden;
  border: 1px solid rgba(6, 26, 64, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 36px rgba(6, 26, 64, 0.06);
}

.step-stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--red), var(--gold));
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--navy), var(--red));
  box-shadow: 0 10px 20px rgba(6, 26, 64, 0.24);
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 800;
}

.step-stage h3 {
  margin-top: 16px;
  font-size: 1.05rem;
}

.step-stage p {
  margin-top: 8px;
}

/* ---------- Editorial overview (Who this is for) ---------- */
.who-for-panel {
  display: grid;
  gap: 22px;
}

.who-for-copy p {
  max-width: 640px;
}

.who-for-card {
  position: relative;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(6, 26, 64, 0.13);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 240, 0.86)),
    var(--white);
  box-shadow: 0 18px 42px rgba(6, 26, 64, 0.08);
}

.who-for-card span.section-kicker {
  margin-bottom: 4px;
}

.who-for-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.who-for-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(6, 26, 64, 0.14);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 800;
}

/* ---------- Pathway cards ---------- */
.pathway-grid {
  display: grid;
  gap: 16px;
}

.pathway-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(6, 26, 64, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 240, 0.86));
  box-shadow: 0 14px 38px rgba(6, 26, 64, 0.07);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.pathway-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--red), var(--gold));
}

.pathway-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 30px;
  height: 30px;
  border-right: 1px solid rgba(183, 138, 45, 0.3);
  border-bottom: 1px solid rgba(183, 138, 45, 0.3);
  pointer-events: none;
}

.pathway-card:hover {
  transform: translateY(-4px);
  border-color: rgba(183, 138, 45, 0.36);
  box-shadow: 0 22px 52px rgba(6, 26, 64, 0.13);
}

/* Featured pathway variant: larger, highlighted */
.pathway-card--featured {
  padding: 28px;
  border-color: rgba(183, 138, 45, 0.4);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 240, 0.9));
  box-shadow: 0 22px 50px rgba(6, 26, 64, 0.12);
}

.pathway-card--featured h3 {
  font-size: clamp(1.12rem, 2vw, 1.3rem);
}

.featured-ribbon {
  position: absolute;
  top: 14px;
  right: -34px;
  z-index: 1;
  width: 150px;
  padding: 4px 0;
  transform: rotate(40deg);
  background: linear-gradient(90deg, var(--red), var(--red-deep));
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(6, 26, 64, 0.22);
}

.pathway-framework {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 25px;
  margin-top: 16px;
  padding: 0 10px;
  border: 1px solid rgba(183, 138, 45, 0.34);
  border-radius: var(--radius-sm);
  color: var(--red);
  background: rgba(247, 242, 231, 0.75);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pathway-card h3 {
  margin-top: 12px;
  font-size: 1.04rem;
}

.pathway-card p {
  margin-top: 8px;
}

.pathway-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.pathway-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(6, 26, 64, 0.14);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  background: rgba(6, 26, 64, 0.04);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pathway-card a {
  display: inline-flex;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(6, 26, 64, 0.1);
  color: var(--navy);
  font-weight: 900;
}

.pathway-card a::after {
  content: "\2192";
  margin-left: 8px;
  color: var(--red);
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease, color 180ms ease;
}

.pathway-card:hover a::after {
  color: var(--gold);
  transform: translateX(4px);
}

.pathway-more {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px dashed rgba(6, 26, 64, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

.pathway-more strong {
  display: block;
  color: var(--navy);
  font-size: 0.92rem;
}

.pathway-more ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  list-style: none;
}

.pathway-more li {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(6, 26, 64, 0.14);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 750;
}

/* ---------- Learning routes ---------- */
.route-track {
  position: relative;
  list-style: none;
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

.route-card {
  position: relative;
  padding: 26px 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.route-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.route-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(229, 199, 119, 0.5);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-weight: 800;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.08);
}

.route-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-left: 10px;
  padding: 0 11px;
  border: 1px solid rgba(229, 199, 119, 0.42);
  border-radius: var(--radius-sm);
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.route-card-top {
  display: flex;
  align-items: center;
}

.route-card h3 {
  margin-top: 16px;
  color: var(--white);
  font-size: 1.08rem;
}

.route-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Quality grid (light context, used inside cinematic section too via .glass-grid) ---------- */
.quality-grid {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.quality-grid article {
  position: relative;
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(6, 26, 64, 0.12);
  border-radius: var(--radius-sm);
  color: var(--navy);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.8)),
    var(--white);
  box-shadow: 0 12px 28px rgba(6, 26, 64, 0.06);
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.quality-grid article:hover {
  transform: translateY(-3px);
  border-color: rgba(183, 138, 45, 0.34);
  box-shadow: 0 20px 46px rgba(6, 26, 64, 0.12);
}

.quality-grid article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.quality-grid article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--gold-light);
  background: linear-gradient(135deg, var(--navy), var(--red));
  box-shadow: 0 8px 18px rgba(6, 26, 64, 0.22);
  font-family: var(--serif);
  font-size: 0.72rem;
  font-weight: 800;
}

.quality-grid article strong {
  color: var(--navy);
  font-size: 0.96rem;
  line-height: 1.35;
}

/* ---------- Branch anchor nav ---------- */
.branch-nav-wrap {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  background: rgba(247, 242, 231, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(6, 26, 64, 0.1);
  box-shadow: 0 8px 24px rgba(6, 26, 64, 0.06);
}

.branch-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0;
  scrollbar-width: none;
}

.branch-nav::-webkit-scrollbar {
  display: none;
}

.branch-nav a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(6, 26, 64, 0.14);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.branch-nav a:hover,
.branch-nav a:focus-visible {
  border-color: rgba(183, 138, 45, 0.5);
  background: rgba(183, 138, 45, 0.1);
}

/* ---------- CTA section ---------- */
.courses-cta {
  padding: 76px 0;
}

.cta-panel {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(229, 199, 119, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    rgba(2, 8, 18, 0.32);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-strong);
}

.cta-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--red), var(--gold));
}

.cta-panel h2 {
  color: var(--white);
}

.cta-panel p {
  max-width: 700px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.cta-panel .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.cta-panel .hero-actions .btn {
  width: 100%;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width: 700px) {
  .page-hero-inner {
    padding-top: 50px;
    padding-bottom: 64px;
  }

  .facts-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    margin-top: -36px;
  }

  .facts-strip div {
    min-width: 0;
  }

  .branch-grid,
  .pathway-grid,
  .steps-track,
  .route-track,
  .quality-grid,
  .glass-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .who-for-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    align-items: center;
  }

  .page-hero .hero-actions .btn,
  .cta-panel .hero-actions .btn {
    width: auto;
  }

  .cta-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 40px;
  }
}

@media (min-width: 980px) {
  .page-hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    align-items: center;
    gap: 40px;
  }

  .page-hero-inner {
    min-height: 460px;
    display: flex;
    align-items: center;
  }
}

@media (max-width: 699px) {
  .pattern-section {
    background-image:
      linear-gradient(180deg, rgba(247, 242, 231, 0.42), rgba(247, 242, 231, 0.52)),
      url("../assets/images/courses-pattern-bg.jpg");
  }

  .page-hero-inner {
    padding-top: 20px;
    padding-bottom: 26px;
  }

  .page-hero h1 {
    font-size: clamp(1.68rem, 7vw, 2.05rem);
  }

  .page-hero .hero-actions {
    margin-top: 22px;
  }

  /* Quick Facts: compact 2-column chip row instead of a tall stacked card */
  .hero-panel {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--radius-sm);
  }

  .hero-panel-header {
    padding-bottom: 8px;
  }

  .hero-panel-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
  }

  .hero-panel-list div {
    gap: 8px;
    padding: 9px 10px;
  }

  .hero-panel-list em {
    width: 26px;
    height: 26px;
    font-size: 0.6rem;
  }

  .hero-panel-list strong {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .hero-panel-list span {
    display: none;
  }

  .pathway-card--featured {
    padding: 22px;
  }

  .section {
    padding: 48px 0;
  }

  .branch-strip-track a {
    min-height: 48px;
    padding: 0 14px 0 6px;
  }

  .branch-strip-track {
    animation-duration: 64s;
  }

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

  .branch-sample-list span:nth-child(n + 4) {
    display: none;
  }

  .branch-body p,
  .pathway-card p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
  }

  .featured-ribbon {
    top: 12px;
    right: -38px;
    width: 140px;
    font-size: 0.56rem;
  }

  .courses-cta {
    padding: 48px 0;
  }

  .pathway-tags span,
  .who-for-tags span {
    font-size: 0.72rem;
  }

  .pathway-tags span {
    min-height: 28px;
  }

  .page-hero::before {
    background: linear-gradient(180deg, rgba(2, 8, 18, 0.88) 0%, rgba(6, 26, 64, 0.8) 28%, rgba(6, 26, 64, 0.4) 38%, rgba(6, 26, 64, 0.3) 100%);
  }
}

@media (min-width: 1024px) {
  .branch-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .pathway-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pathway-card--featured {
    grid-column: span 1;
  }

  .steps-track {
    grid-template-columns: repeat(4, 1fr);
  }

  .step-stage:not(:last-child)::after {
    content: "\2192";
    position: absolute;
    top: 30px;
    right: -21px;
    z-index: 1;
    color: var(--gold);
    font-size: 1.1rem;
  }

  .route-track {
    grid-template-columns: repeat(3, 1fr);
  }

  .glass-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .quality-shell {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    align-items: center;
    gap: 46px;
  }
}

.quality-shell {
  display: grid;
  gap: 24px;
  align-items: center;
}

.quality-portrait {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(229, 199, 119, 0.3);
  box-shadow: 0 22px 50px rgba(2, 8, 18, 0.3);
}

.quality-portrait img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.ai-quality-section {
  background-image:
    radial-gradient(circle at 82% 18%, rgba(229, 199, 119, 0.12), transparent 24rem),
    linear-gradient(125deg, var(--navy-deep), var(--navy));
}

.ai-quality-section .section-header {
  max-width: 720px;
  margin-inline: 0;
  text-align: left;
}

.ai-quality-section .quality-portrait img {
  aspect-ratio: 16 / 9;
  object-position: center;
}

@media (min-width: 700px) {
  .ai-quality-section .glass-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 0;
  }

  .courses-cta {
    padding: 40px 0;
  }

  .breadcrumb {
    font-size: 0.68rem;
  }

  .facts-strip div {
    padding: 14px 16px;
  }

  .pathway-card,
  .pathway-card--featured,
  .step-stage,
  .route-card,
  .glass-grid article {
    padding: 16px;
  }

  .cta-panel {
    padding: 20px;
  }

  .branch-nav a {
    padding: 0 13px;
    font-size: 0.8rem;
  }

  .hero-panel {
    padding: 10px;
  }

  .hero-panel-list div {
    padding: 8px;
  }

  .hero-panel-list strong {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .branch-card,
  .pathway-card,
  .quality-grid article,
  .glass-grid article,
  .branch-strip-track a {
    transition: none;
  }
}
