/* program.css — TESA Qualification Program
   Layered on top of styles.css (reuses its tokens, nav, hero, .section, .btn,
   .reveal). Adds the professional B2B/government theme tweaks + the new
   components (personas, tracks, course cards, reciprocity table, eligibility,
   FAQ). Edit text in js/i18n.js; course data in js/courses.js. */

:root {
  --prog-ink: #0A1628;            /* navy, authoritative */
  --prog-accent: #0066B3;         /* TESA blue */
  --prog-accent-soft: #E8F1FA;
  --prog-line: #E3E8F0;
  --prog-muted: #475569;          /* ~7.4:1 on white — passes AA incl. small text */
  --prog-gold: #B8893B;           /* subtle "certified" accent */
  --prog-ok: #1B7F5A;
  --prog-card-shadow: 0 8px 30px rgba(10,22,40,.07);
}

/* ---- restrained hero (calmer than the event site) ---- */
.hero--prog { min-height: 78vh; }
/* The summit H1 is sized for a short English title; the program's longer Thai
   headline needs a smaller, tighter size so it doesn't dominate the screen. */
.hero--prog .hero__title { font-size: clamp(1.8rem, 4.2vw, 3rem); line-height: 1.18; max-width: 22ch; margin: 0 auto; }
.hero--prog .hero__tagline { max-width: 56ch; margin-left: auto; margin-right: auto; }
.hero--prog .hero__bg::after { background: linear-gradient(180deg, rgba(10,22,40,.78), rgba(10,22,40,.92)); }
.hero__eyebrow--prog { letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: #9Fc2e6; }
.hero__ctas { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.hero__trust { display: flex; gap: 1.4rem 2rem; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 2.2rem; opacity: .92; }
.hero__trust img { height: 34px; width: auto; }
.hero__trust .sep { width: 1px; height: 26px; background: rgba(255,255,255,.25); }

.btn--ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }

/* ---- generic professional grid + card ---- */
.prog-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 2rem; }
.prog-card {
  background: #fff; border: 1px solid var(--prog-line); border-radius: 14px;
  padding: 1.6rem; box-shadow: var(--prog-card-shadow);
  display: flex; flex-direction: column; gap: .6rem;
}
.prog-card__ico { width: 46px; height: 46px; border-radius: 11px; background: var(--prog-accent-soft); color: var(--prog-accent); display: grid; place-items: center; font-size: 1.4rem; }
/* when an icon span carries an uploaded/library image instead of an emoji */
.ico-img { width: 2.2rem; height: 2.2rem; object-fit: contain; display: inline-block; vertical-align: middle; }
.found-card__ico .ico-img { width: 2.4rem; height: 2.4rem; }
.prog-card h3 { font-size: 1.18rem; color: var(--prog-ink); }
.prog-card p { color: var(--prog-muted); font-size: .96rem; }

/* ---- persona split ---- */
/* role chip — "For Owners/Executives" / "For HR" audience cue above a section title */
.role-chip { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--prog-accent); background: var(--prog-accent-soft); border: 1px solid #BcD6Ee;
  padding: .25rem .7rem; border-radius: 999px; margin-bottom: .7rem; }
.section--dark .role-chip { color: #cfe2f5; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
/* hero secondary "browse all courses" — lowest-weight text link under the two buttons */
.hero__browse { display: inline-block; margin-top: .9rem; color: #cfe0f2; font-size: .92rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hero__browse:hover { color: #fff; }

/* ---- tracks ---- */
.track-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(330px,1fr)); margin-top: 2rem; }
.track { border-radius: 16px; padding: 1.8rem; color: #fff; position: relative; overflow: hidden; }
.track--upskill { background: linear-gradient(135deg, #0066B3, #00407a); }
.track--newhire { background: linear-gradient(135deg, #1B7F5A, #0d5238); }
.track__tag { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.track h3 { font-size: 1.5rem; margin: .4rem 0 .7rem; }
.track p { font-size: .98rem; opacity: .95; }
.track ul { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.track li { padding-left: 1.5rem; position: relative; font-size: .94rem; }
.track li::before { content: "→"; position: absolute; left: 0; opacity: .8; }

/* ---- course cards ---- */
/* Bigger cards (≈2-up on desktop) so the sale-kit cover + content read clearly. */
.course-grid { display: grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); margin-top: 2rem; }
.course-card { background: #fff; border: 1px solid var(--prog-line); border-radius: 16px; overflow: hidden; box-shadow: var(--prog-card-shadow); display: flex; flex-direction: column; }
/* 3:2 to match the sale-kit posters; contain so the full poster shows (no top crop) */
.course-card__cover { aspect-ratio: 3/2; background: #fff; overflow: hidden; position: relative; }
.course-card__cover img { width: 100%; height: 100%; object-fit: contain; }
.course-card.is-shared { outline: 3px solid var(--prog-accent, #2563eb); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(37,99,235,.15); transition: outline-color .3s, box-shadow .3s; }
.course-card__cover.is-zoomable { cursor: zoom-in; }
.course-card__cover.is-zoomable:focus-visible { outline: 2px solid var(--prog-accent, #2563eb); outline-offset: 2px; }

/* Lightbox: full-size 1-page poster on cover click */
.course-lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: rgba(8,12,24,.88); padding: 2.5vmin; cursor: zoom-out; }
.course-lightbox[hidden] { display: none; }
.course-lightbox__img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; cursor: default; }
.course-lightbox__close { position: fixed; top: 1.1rem; right: 1.4rem; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.course-lightbox__close:hover { background: rgba(255,255,255,.3); }
/* badges now sit at the top of the card body (not over the cover) so they never
   obscure an infographic cover's title */
.course-card__badges { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .15rem; }
.course-card__badges .badge--track { background: var(--prog-accent-soft); color: var(--prog-accent); border: 1px solid #BcD6Ee; }
.badge { font-size: .72rem; font-weight: 800; letter-spacing: .03em; padding: .28rem .6rem; border-radius: 999px; text-transform: uppercase; }
.badge--fund { background: var(--prog-gold); color: #fff; }
.badge--free { background: var(--prog-ok); color: #fff; }
.badge--paid { background: var(--prog-ink); color: #fff; }
.badge--track { background: rgba(255,255,255,.92); color: var(--prog-ink); border: 1px solid var(--prog-line); }
.badge--member { background: #1FA6A0; color: #fff; }      /* TESA-member discount */
.badge--special { background: #5A4FCF; color: #fff; }      /* rare special cohort */
.badge--foundation { background: linear-gradient(135deg, #D4A017, #B8860B); color: #fff; text-transform: none; box-shadow: 0 1px 3px rgba(184,134,11,.35); }  /* foundation for all industries */

/* Course sessions / upcoming rounds */
.course-card__sessions { margin: .55rem 0 .2rem; padding-top: .55rem; border-top: 1px dashed var(--prog-line, #e2e8f0); }
.course-card__sessions-h { font-size: .8rem; font-weight: 800; color: var(--prog-ink, #334155); margin-bottom: .4rem; }
.course-card__sessions ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.course-card__sessions .ses { display: block; border: 1px solid var(--prog-line, #e2e8f0); border-radius: 10px; padding: .55rem .7rem; background: #fff; }
.ses__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ses__label { font-weight: 800; color: var(--prog-ink, #334155); font-size: .9rem; }
.ses__meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .3rem; font-size: .82rem; color: var(--prog-muted, #64748b); }
.ses__m { white-space: nowrap; }
.ses__seats { margin-top: .28rem; font-size: .8rem; font-weight: 600; color: #B45309; }
.ses__apply { display: inline-block; margin-top: .45rem; font-size: .82rem; font-weight: 700; color: var(--prog-accent, #2563eb); }
.ses__apply:hover { text-decoration: underline; }
.ses__status { font-size: .66rem; font-weight: 800; padding: .12rem .5rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.ses__status--open { background: #DCFCE7; color: #15803D; }
.ses__status--full { background: #FEE2E2; color: #B91C1C; }
.ses__status--closed { background: #E2E8F0; color: #475569; }
.ses__status--upcoming { background: #DBEAFE; color: #1D4ED8; }

/* per-course price line + notes + membership upsell */
.course-card__price { font-weight: 800; color: var(--prog-ink); font-size: 1.05rem; margin-top: .1rem; }
.course-card__price .price-unit { font-weight: 600; color: var(--prog-muted); font-size: .82rem; }
.course-card__price .price-strike { text-decoration: line-through; color: var(--prog-muted); font-weight: 600; }
.course-card__price .price-member { color: #1FA6A0; }
.course-card__pnote { color: var(--prog-muted); font-size: .82rem; margin-top: .15rem; }
.course-card__member { font-size: .82rem; margin-top: .3rem; color: var(--prog-muted); }
.course-card__member a { color: var(--prog-accent); font-weight: 700; }

/* pricing-types legend above the course grid */
.pricing-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 1.4rem 0 .4rem; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--prog-line); border-radius: 14px; box-shadow: var(--prog-card-shadow); }
.pricing-legend .pl-note { color: var(--prog-muted); font-size: .85rem; flex-basis: 100%; }
.pricing-legend .pl-member { flex-basis: 100%; color: var(--prog-accent); font-weight: 700; font-size: .9rem; text-decoration: none; }
.pricing-legend .pl-member:hover { text-decoration: underline; }
.section--dark .pricing-legend { background: rgba(255,255,255,.96); }
.course-card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.course-card__meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .82rem; color: var(--prog-muted); }
.course-card__meta span { display: inline-flex; align-items: center; gap: .3rem; }
.course-card h3 { font-size: 1.22rem; color: var(--prog-ink); line-height: 1.25; }
.course-card__tagline { color: var(--prog-muted); font-size: .95rem; flex: 1; }
.course-card__foot { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin-top: .4rem; }
.course-card__foot > .btn { margin-right: auto; }
.course-card__level { font-size: .78rem; font-weight: 700; color: var(--prog-accent); text-transform: uppercase; letter-spacing: .04em; }

/* Public per-card share / embed */
.course-card__sharewrap { position: relative; display: inline-block; }
.course-card__share { background: none; border: 1px solid var(--prog-line, #e2e8f0); color: var(--prog-ink, #334155); border-radius: 8px; padding: .35rem .7rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.course-card__share:hover { border-color: var(--prog-accent, #2563eb); color: var(--prog-accent, #2563eb); }
.course-card__sharemenu { position: absolute; right: 0; bottom: calc(100% + 6px); background: #fff; border: 1px solid var(--prog-line, #e2e8f0); border-radius: 10px; box-shadow: 0 12px 32px rgba(10,22,40,.18); padding: .35rem; display: flex; flex-direction: column; gap: .15rem; min-width: 184px; z-index: 20; }
.course-card__sharemenu[hidden] { display: none; }
.course-card__sharemenu button { background: none; border: none; text-align: left; padding: .5rem .6rem; border-radius: 7px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--prog-ink, #334155); white-space: nowrap; }
.course-card__sharemenu button:hover { background: var(--prog-accent-soft, #eff4ff); }
.tqp-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px); background: #0f172a; color: #fff; padding: .7rem 1.1rem; border-radius: 10px; font-size: .9rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3); opacity: 0; transition: opacity .3s, transform .3s; z-index: 1100; pointer-events: none; }
.tqp-toast--in { opacity: 1; transform: translate(-50%, 0); }

/* ---- reciprocity (commitment) table ---- */
.reciprocity { margin-top: 2rem; border: 1px solid var(--prog-line); border-radius: 16px; overflow: hidden; box-shadow: var(--prog-card-shadow); }
.reciprocity__head { display: grid; grid-template-columns: 1fr 1fr; background: var(--prog-ink); color: #fff; }
.reciprocity__head div { padding: 1rem 1.4rem; font-weight: 800; font-size: .95rem; }
.reciprocity__head div:first-child { border-right: 1px solid rgba(255,255,255,.18); }
.reciprocity__row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--prog-line); }
.reciprocity__row > div { padding: 1.1rem 1.4rem; font-size: .95rem; }
.reciprocity__row > div:first-child { border-right: 1px solid var(--prog-line); color: var(--prog-ink); background: #FBFCFE; }
.reciprocity__row > div:last-child { color: var(--prog-ok); font-weight: 600; }
.reciprocity__note { margin-top: 1rem; font-size: .9rem; color: var(--prog-muted); text-align: center; }

/* ---- timeline (how it works) ---- */
.steps { margin-top: 2rem; display: flex; flex-direction: column; gap: 0; }
.step { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; position: relative; padding-bottom: 1.6rem; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 23px; top: 44px; bottom: 0; width: 2px; background: var(--prog-line); }
.step__num { width: 46px; height: 46px; border-radius: 50%; background: var(--prog-accent); color: #fff; display: grid; place-items: center; font-weight: 800; z-index: 1; }
.step__body h4 { color: var(--prog-ink); font-size: 1.05rem; }
.step__body p { color: var(--prog-muted); font-size: .92rem; }
/* #how is a dark section — flip step text to light so it isn't navy-on-navy */
.section--dark .step__body h4 { color: #fff; }
.section--dark .step__body p { color: rgba(255,255,255,.72); }
.section--dark .step:not(:last-child)::before { background: rgba(255,255,255,.18); }

/* ---- eligibility + self-check ---- */
.elig-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); margin-top: 2rem; }
.elig-col { background: #fff; border: 1px solid var(--prog-line); border-radius: 14px; padding: 1.5rem; box-shadow: var(--prog-card-shadow); }
.elig-col h3 { color: var(--prog-ink); margin-bottom: .8rem; font-size: 1.1rem; }
.elig-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.elig-col li { padding-left: 1.7rem; position: relative; font-size: .95rem; color: var(--prog-muted); }
.elig-col li::before { content: "✓"; position: absolute; left: 0; color: var(--prog-ok); font-weight: 800; }
.selfcheck { margin-top: 1.6rem; background: var(--prog-accent-soft); border-radius: 14px; padding: 1.5rem; }
.selfcheck__q { display: flex; flex-wrap: wrap; gap: .6rem; margin: .6rem 0 1rem; }
.selfcheck__q button { border: 1.5px solid var(--prog-accent); background: #fff; color: var(--prog-accent); border-radius: 999px; padding: .45rem 1.1rem; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; }
.selfcheck__q button.on { background: var(--prog-accent); color: #fff; }
.selfcheck__result { font-weight: 700; color: var(--prog-ink); min-height: 1.4rem; }

/* ---- soft-tinted light section: a third tone so two light sections in a row
   (courses → commitment) still read as distinct without going full-dark, which
   would hurt the reciprocity table's legibility ---- */
.section--soft { background: #F3F6FB; }

/* ---- apply band ---- */
.apply-band { text-align: center; }
.apply-band .hero__ctas { margin-top: 1.6rem; }

/* ---- FAQ accordion ---- */
.faq { margin-top: 2rem; max-width: 820px; margin-left: auto; margin-right: auto; }
.faq__item { border-bottom: 1px solid var(--prog-line); }
.faq__q { width: 100%; text-align: left; background: none; border: none; padding: 1.1rem 0; font: inherit; font-size: 1.02rem; font-weight: 600; color: var(--prog-ink); cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; }
.faq__q::after { content: "+"; color: var(--prog-accent); font-weight: 800; }
.faq__item.open .faq__q::after { content: "–"; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .25s ease; color: var(--prog-muted); font-size: .95rem; }
.faq__item.open .faq__a { max-height: 400px; padding-bottom: 1.1rem; }

/* ---- partners ---- */
.partner-logos { display: flex; flex-wrap: wrap; gap: 1.8rem 2.4rem; align-items: flex-start; justify-content: center; margin-top: 1.8rem; }
.partner-logo-link { text-decoration: none; }
.partner-logo { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.partner-logo img { height: 48px; width: auto; max-width: 180px; object-fit: contain; opacity: .92; transition: opacity .15s; }
.partner-logo-link:hover img { opacity: 1; }
.partner-cert { font-size: .72rem; font-weight: 700; letter-spacing: .03em; color: var(--prog-muted); text-transform: uppercase; }
[data-theme] .partner-cert, .section--dark .partner-cert { color: #9FB0C9; }

@media (max-width: 560px) {
  .reciprocity__head, .reciprocity__row { grid-template-columns: 1fr; }
  .reciprocity__row > div:first-child { border-right: none; border-bottom: 1px solid var(--prog-line); }
}

/* ============================================================
   TARGET INDUSTRIES — two Foundations + 7 high-value sectors
   ============================================================ */

/* ---- the two Foundations (SoC + AIoT) — the pillars everything rests on ---- */
.found-grid {
  display: grid; gap: 1.25rem; margin: 2.2rem 0 2.6rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.found-card {
  position: relative; overflow: hidden;
  border-radius: 16px; padding: 1.9rem 1.8rem;
  color: #fff; box-shadow: var(--prog-card-shadow);
  display: flex; flex-direction: column; gap: .7rem;
}
.found-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.16), transparent 55%);
}
.found-card--soc  { background: linear-gradient(135deg, #0A1628 0%, #123A6B 100%); }
.found-card--aiot { background: linear-gradient(135deg, #0B3D63 0%, #0066B3 100%); }
.found-card__ico { font-size: 2rem; line-height: 1; }
.found-card h3 { font-size: 1.35rem; font-weight: 800; margin: 0; }
.found-card p { font-size: .96rem; line-height: 1.6; color: rgba(255,255,255,.9); margin: 0; }

/* ---- the 7 industries ---- */
.ind-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: .5rem;
}
.ind-card {
  --ind: var(--prog-accent);
  background: #fff; border: 1px solid var(--prog-line);
  border-top: 4px solid var(--ind);
  border-radius: 14px; padding: 1.5rem 1.4rem;
  box-shadow: var(--prog-card-shadow);
  display: flex; flex-direction: column; gap: .55rem;
  transition: transform .16s ease, box-shadow .16s ease;
}
.ind-card:hover { transform: translateY(-4px); box-shadow: 0 14px 38px rgba(10,22,40,.12); }
.ind-card__ico {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.5rem;
  background: var(--prog-accent-soft);                       /* fallback for no color-mix() */
  background: color-mix(in srgb, var(--ind) 14%, #fff);
}
.ind-card h3 { font-size: 1.08rem; font-weight: 700; color: var(--prog-ink); margin: 0; }
.ind-card p { font-size: .9rem; line-height: 1.55; color: var(--prog-muted); margin: 0; }
.ind-foot { text-align: center; margin-top: 2rem; }
.ind-foot a { color: var(--prog-accent); font-weight: 700; text-decoration: none; font-size: 1rem; }
.ind-foot a:hover { text-decoration: underline; }

/* ---- industry chips on course cards ---- */
.course-card__inds { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.chip--ind {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .01em;
  padding: .22rem .6rem; border-radius: 999px;
  background: var(--prog-accent-soft); color: var(--prog-accent);
  border: 1px solid #BcD6Ee;                                 /* fallback for no color-mix() */
  border: 1px solid color-mix(in srgb, var(--prog-accent) 22%, #fff);
}

/* ============================================================
   Accessibility — skip link + visible keyboard focus
   ============================================================ */
.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
  z-index: 2000; background: var(--prog-accent); color: #fff;
  padding: .7rem 1.3rem; border-radius: 0 0 10px 10px; font-weight: 700;
  text-decoration: none; transition: transform .15s ease;
}
/* keep a visible outline even if :focus-visible is ever overridden elsewhere */
.skip-link:focus { transform: translate(-50%, 0); outline: 3px solid #fff; outline-offset: 2px; }
:focus-visible {
  outline: 3px solid var(--prog-accent);
  outline-offset: 2px; border-radius: 4px;
}
.section--dark :focus-visible, .hero :focus-visible { outline-color: #9Fc2e6; }
