/* =====================================================================
   Colour layer. Brand red, navy and yellow lead; green, purple, teal and
   orange rotate through badges, chips and accents so the site feels
   lively without gradients or loud blocks. Loaded after unify.css.
   ===================================================================== */
:root {
  --c-red: #D42A2F; --c-red-soft: #FDECEC;
  --c-navy: #1F2A6B; --c-navy-soft: #EEF1FB;
  --c-yellow: #F5B400; --c-yellow-soft: #FFF6DB;
  --c-green: #15965A; --c-green-soft: #E6F6EE;
  --c-purple: #6D3FD9; --c-purple-soft: #F1ECFE;
  --c-teal: #0E8F8A; --c-teal-soft: #E2F5F4;
  --c-orange: #E8681A; --c-orange-soft: #FFEFE4;
}

/* The light logo variant is only shown by the dark home header (home-dark.css) */
.logo-on-dark { display: none; }

/* Thin brand stripe on top of the header */
.tn.site-header::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, var(--c-red) 0 34%, var(--c-yellow) 34% 67%, var(--c-navy) 67% 100%); }

/* ---------- Section backgrounds: soft tints instead of grey ---------- */
.tsec-grey, .ml-grey, .section-soft { background: #F3F6FD; }
.tsec-tint-blue { background: #EEF3FF; }
.tsec-tint-lav { background: #F3EEFF; }
.tsec-tint-peach { background: #FFF3EA; }
.tsec-tint-mint { background: #EAF7F1; }
.tsec-tint-cream { background: #FFF9EC; }

/* ---------- Section headings: two-colour accent bar ---------- */
.hm-head, .ml-head, .thead { border-bottom: 0; padding-bottom: 0; }
.hm-head h2::after, .hm-h2::after, .ml-head h2::after, .thead h2::after, .trd-sec h2::after {
  content: ""; display: block; width: 52px; height: 4px; border-radius: 4px; margin-top: 8px;
  background: linear-gradient(90deg, var(--c-red) 0 62%, var(--c-yellow) 62% 100%);
}
.hm-head a { color: var(--c-red); }

/* ---------- Rotating colours for repeated items ---------- */
.hm-rows .d { width: 54px; height: 54px; border-radius: 12px; display: grid; place-content: center; background: var(--c-red-soft); color: var(--c-red); font-weight: 600; }
.hm-rows .d b { color: inherit; font-size: 1.2rem; line-height: 1.1; }
.hm-rows li:nth-child(4n+2) .d { background: var(--c-navy-soft); color: var(--c-navy); }
.hm-rows li:nth-child(4n+3) .d { background: var(--c-green-soft); color: var(--c-green); }
.hm-rows li:nth-child(4n+4) .d { background: var(--c-purple-soft); color: var(--c-purple); }
.hm-rows li { border-color: #E6EAF3; }

/* "How we teach": coloured number badges */
.hm-note ol { list-style: none; padding-left: 0; counter-reset: hn; }
.hm-note li { counter-increment: hn; position: relative; padding-left: 46px; min-height: 32px; }
.hm-note li::before { content: counter(hn); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff; background: var(--c-red); }
.hm-note li:nth-child(3n+2)::before { background: var(--c-navy); }
.hm-note li:nth-child(3n+3)::before { background: var(--c-green); }
.hm-note .sign { color: var(--c-red); }

/* Testimonials: coloured top edge and quote mark */
.hm-quotes figure { position: relative; border-top: 3px solid var(--c-red); background: #fff; }
.hm-quotes figure:nth-child(3n+2) { border-top-color: var(--c-yellow); }
.hm-quotes figure:nth-child(3n+3) { border-top-color: var(--c-navy); }
.hm-quotes figure::before { content: "\201C"; position: absolute; right: 16px; top: 4px; font-size: 3.2rem; line-height: 1; font-family: Georgia, serif; color: var(--c-red); opacity: .18; }
.hm-quotes .av { background: var(--c-navy-soft); color: var(--c-navy); }
.hm-quotes figure:nth-child(3n+2) .av { background: var(--c-yellow-soft); color: #8A5A00; }
.hm-quotes figure:nth-child(3n+3) .av { background: var(--c-green-soft); color: var(--c-green); }

/* Teachers: coloured photo ring */
.hm-teachers img, .hm-teachers .av { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c-red); border-radius: 12px; }
.hm-teachers > *:nth-child(4n+2) img, .hm-teachers > *:nth-child(4n+2) .av { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c-navy); }
.hm-teachers > *:nth-child(4n+3) img, .hm-teachers > *:nth-child(4n+3) .av { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c-green); }
.hm-teachers > *:nth-child(4n+4) img, .hm-teachers > *:nth-child(4n+4) .av { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c-yellow); }

/* Sample question card */
.hm-q { border-top: 3px solid var(--c-purple); }
.hm-q > small { color: var(--c-purple); font-weight: 600; }

/* ---------- Course card chips ---------- */
.cc-meta span { background: var(--c-orange-soft); color: #9A3F08; }
.cc-meta span .icon { color: var(--c-orange); }
.cc-meta span.cc-mode { background: var(--c-teal-soft); color: var(--c-teal); }
.cc-meta span.cc-mode .icon { color: var(--c-teal); }
.cc-meta span:nth-child(3) { background: var(--c-purple-soft); color: var(--c-purple); }
.cc-meta span:nth-child(3) .icon { color: var(--c-purple); }

/* ---------- Book card price ---------- */
.bk-price strong { color: var(--c-red); }

/* ---------- Question Bank tiles: tinted icon chips ---------- */
.qb-tile .icon { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--c-teal-soft); }
.qb-tile.t-a .icon { background: var(--c-red-soft); }
.qb-tile.t-b .icon { background: var(--c-navy-soft); }
.qb-tile.t-c .icon { background: #E3F4FD; }
.qb-tile.t-d .icon { background: var(--c-purple-soft); }
.qb-tile.t-f .icon { background: var(--c-yellow-soft); }
.qb-tile:hover { border-color: var(--c-navy); box-shadow: 0 10px 24px -18px rgba(31, 42, 107, .6); }

/* Training and detail fact chips */
.trd-facts li:nth-child(4n+2) .icon { color: var(--c-navy); }
.trd-facts li:nth-child(4n+3) .icon { color: var(--c-green); }
.trd-facts li:nth-child(4n+4) .icon { color: var(--c-purple); }

/* ---------- Footer: brand navy ---------- */
.tf.site-footer { background: var(--c-navy); border-top: 0; color: rgba(255, 255, 255, .78); position: relative; }
.tf.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--c-red) 0 34%, var(--c-yellow) 34% 67%, #4F6BED 67% 100%); }
.tf h3 { color: #fff; }
.tf h3::after { content: ""; display: block; width: 28px; height: 3px; border-radius: 3px; background: var(--c-yellow); margin-top: 8px; }
.tf a { color: rgba(255, 255, 255, .78); }
.tf a:hover { color: var(--c-yellow); }
.tf-about p { color: rgba(255, 255, 255, .72); }
.tf-contact p { color: rgba(255, 255, 255, .82); }
.tf-contact p .icon { color: var(--c-yellow); }
.tf .socials a { background: rgba(255, 255, 255, .1); color: #fff; }
.tf .socials a:hover { background: var(--c-red); color: #fff; }
.tf .footer-pay { border-top-color: rgba(255, 255, 255, .14); }
.tf .footer-pay .lbl { color: #fff; border-right-color: rgba(255, 255, 255, .2); }
.tf .footer-pay .pm { border-color: transparent; }
.tf .footer-bottom { background: #141C4D; }
.tf .footer-bottom a { color: var(--c-yellow); }

/* Payment choice: real logos sit in a fixed-height row, selected option in brand navy */
.pay-opt label img { height: 34px; width: auto; max-width: 120px; object-fit: contain; object-position: left center; margin-bottom: .35rem; }
.pay-opt input:checked + label { border-color: var(--c-navy); background: var(--c-navy-soft); box-shadow: 0 0 0 3px rgba(31, 42, 107, .14); }
.pay-opt input:focus-visible + label { outline: 2px solid var(--c-navy); outline-offset: 2px; }

/* ===================== Home layout ===================== */
/* Hero stats row */
.hv-stats { list-style: none; margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid #EADFB9; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 600px; }
.hv-stats li { min-width: 0; }
.hv-stats strong { display: block; font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 800; color: var(--c-navy); line-height: 1.15; }
.hv-stats li:nth-child(4n+1) strong { color: var(--c-red); }
.hv-stats li:nth-child(4n+3) strong { color: var(--c-green); }
.hv-stats li:nth-child(4n+4) strong { color: var(--c-purple); }
.hv-stats span { display: block; font-size: .82rem; color: #4b5563; line-height: 1.35; margin-top: 2px; }

/* Quick access tiles: overlap the hero edge slightly */
.hq { position: relative; z-index: 2; margin-top: -28px; padding-bottom: 8px; }
.hq-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.hq-tile { --t: var(--c-red); --ts: var(--c-red-soft); display: flex; align-items: center; gap: 10px; padding: 14px; background: #fff; border: 1px solid #E6EAF3; border-radius: 12px; box-shadow: 0 12px 26px -20px rgba(17, 24, 39, .45); color: var(--u-ink); transition: transform .15s, box-shadow .15s, border-color .15s; min-width: 0; }
.hq-tile:hover { transform: translateY(-2px); border-color: var(--t); box-shadow: 0 16px 30px -20px rgba(17, 24, 39, .55); color: var(--u-ink); }
.hq-ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--ts); color: var(--t); flex-shrink: 0; }
.hq-ic .icon { width: 22px; height: 22px; }
.hq-tx { min-width: 0; flex: 1; }
.hq-tx strong { display: block; font-size: .92rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-tx small { display: block; font-size: .76rem; color: var(--u-muted); margin-top: 1px; }
.hq-go { width: 16px; height: 16px; color: var(--t); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; flex-shrink: 0; }
.hq-tile:hover .hq-go { opacity: 1; transform: none; }
.tone-navy { --t: var(--c-navy); --ts: var(--c-navy-soft); }
.tone-green { --t: var(--c-green); --ts: var(--c-green-soft); }
.tone-orange { --t: var(--c-orange); --ts: var(--c-orange-soft); }
.tone-purple { --t: var(--c-purple); --ts: var(--c-purple-soft); }
.tone-teal { --t: var(--c-teal); --ts: var(--c-teal-soft); }

/* Course category tabs */
.ct-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 14px; margin-bottom: 4px; }
.ct-tabs::-webkit-scrollbar { display: none; }
.ct-tabs button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 16px; border-radius: 30px; border: 1px solid #D9E0F0; background: #fff; color: var(--u-ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.ct-tabs button .icon { width: 17px; height: 17px; color: var(--c-navy); }
.ct-tabs button small { font-size: .72rem; font-weight: 700; background: var(--c-navy-soft); color: var(--c-navy); border-radius: 10px; padding: 1px 7px; }
.ct-tabs button:hover { border-color: var(--c-navy); }
.ct-tabs button.is-active { background: var(--c-navy); border-color: var(--c-navy); color: #fff; }
.ct-tabs button.is-active .icon { color: var(--c-yellow); }
.ct-tabs button.is-active small { background: rgba(255, 255, 255, .18); color: #fff; }
.ct-tabs button:focus-visible { outline: 2px solid var(--c-red); outline-offset: 2px; }
.ct-more { margin: 8px 0 0; text-align: right; }
.ct-more a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--c-red); font-size: .92rem; }
.ct-more .icon { width: 16px; height: 16px; }

/* Testimonials carousel: three cards per view */
/* The old 3-column grid template from theme.css must go, or its 1fr columns collapse next to the carousel columns */
.hm-quotes-car .hm-quotes { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 40px) / 3); gap: 20px; border-top: 0; padding: 4px 2px 14px; align-items: stretch; }
.hm-quotes-car .hm-quotes figure, .hm-quotes-car .hm-quotes figure:not(:nth-child(3n+1)) { padding: 20px 22px; border: 1px solid #E6EAF3; border-top: 3px solid var(--c-red); border-left: 1px solid #E6EAF3; border-radius: 12px; display: flex; flex-direction: column; justify-content: space-between; }
.hm-quotes-car .hm-quotes figure:nth-child(3n+2) { border-top-color: var(--c-yellow); }
.hm-quotes-car .hm-quotes figure:nth-child(3n+3) { border-top-color: var(--c-navy); }
.hm-quotes-car .hm-quotes figure.ml-item > * { flex: none; }
.hm-quotes-car blockquote { flex: 1 1 auto; margin: 0 0 16px; font-size: .98rem; line-height: 1.7; padding-right: 22px; }
.hm-quotes-car figcaption { padding-top: 14px; border-top: 1px solid #EEF1F6; }
.hm-quotes-car figcaption > span { min-width: 0; }
.hm-quotes-car figcaption strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-quotes-car .ml-arrow { top: 40%; background: #fff; color: var(--u-ink); border: 1px solid #E6EAF3; box-shadow: 0 6px 14px -8px rgba(17, 24, 39, .4); }
.hm-quotes-car .ml-arrow:hover { background: var(--c-navy); color: #fff; }

@media (max-width: 1100px) {
  .hq-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-quotes-car .hm-quotes { grid-auto-columns: calc((100% - 20px) / 2); }
}
@media (max-width: 767px) {
  .hq { margin-top: 0; padding-top: 16px; }
  .hm-quotes-car .hm-quotes { grid-auto-columns: 86%; gap: 12px; }
  .hm-quotes-car .hm-quotes figure, .hm-quotes-car .hm-quotes figure:not(:nth-child(3n+1)) { padding: 18px; }
  .hm-quotes-car blockquote { font-size: .95rem; }
  .hm-quotes-car .ml-arrow { display: none; }
}
@media (max-width: 575px) {
  .hq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hq-tile { padding: 10px; gap: 8px; }
  .hq-ic { width: 36px; height: 36px; }
  .hq-ic .icon { width: 19px; height: 19px; }
  .hq-tx strong { font-size: .84rem; }
  .hq-go { display: none; }
  .hv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
}
