/* =========================================================
   TIOSH – Approved centre banner, course catalogue, AI chat
   Uses the tokens from tiosh.css (--t-navy, --t-amber …)
   ========================================================= */

/* ---------- Approved centre banner ---------- */
.tcn { background: radial-gradient(1200px 400px at 85% -20%, rgba(42,50,200,.55), transparent 60%), linear-gradient(120deg, var(--t-deep) 0%, var(--t-navy) 100%); color: #fff; padding: 44px 0; position: relative; overflow: hidden; }
.tcn::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border: 28px solid rgba(245,183,0,.14); border-radius: 50%; pointer-events: none; }
.tcn__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: center; position: relative; z-index: 1; }
.tcn__grid--solo { grid-template-columns: minmax(0, 1fr); }
.tcn__eyebrow { margin: 0 0 10px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(245,183,0,.16); color: var(--t-amber); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tcn__title { margin: 0 0 12px; font-family: var(--t-head); font-size: clamp(28px, 3.6vw, 44px); line-height: 1.12; font-weight: 800; color: #fff; letter-spacing: -0.015em; }
.tcn__title span { color: var(--t-amber); }
.tcn__text { margin: 0 0 18px; font-size: 17px; color: #D6DEF7; max-width: 640px; }
.tcn__points { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; max-width: 720px; }
.tcn__points li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: 15px; color: #fff; }
.tcn__points svg { flex-shrink: 0; margin-top: 2px; }
.tcn__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tcn__routes { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); border-radius: var(--t-radius); padding: 18px; backdrop-filter: blur(4px); }
.tcn__routes-title { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--t-soft); }
.t-page a.tcn__route { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.06); color: #fff; text-decoration: none; margin-top: 8px; transition: background .15s; }
.t-page a.tcn__route:hover { background: rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.tcn__route strong { display: block; font-size: 15px; }
.tcn__route small { display: block; font-size: 13px; color: var(--t-soft); }
.tcn__route b { color: var(--t-amber); font-size: 18px; }

/* ---------- Catalogue ---------- */
.tk { padding-bottom: 48px; }
.tk-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.tk-search { box-sizing: border-box; min-width: 0; flex: 1 1 380px; max-width: min(520px, 100%); display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--t-line); border-radius: 999px; padding: 5px 5px 5px 16px; color: var(--t-body); transition: border-color .15s, box-shadow .15s; }
.tk-search:focus-within { border-color: var(--t-royal); box-shadow: 0 0 0 4px rgba(42,50,200,.12); }
.tk-search input { flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 15px; height: 40px; padding: 0 !important; color: var(--t-ink); }
.tk-search .t-btn { height: 40px; border-radius: 999px; }

.tk-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--t-line); margin-bottom: 20px; }
.tk-tabs[data-more] { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 64px), transparent); }
.t-page .t-promo strong { color: #fff; }
.tk-tab { flex-shrink: 0; height: 46px; padding: 0 11px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; font: inherit; font-size: 15px; font-weight: 700; color: var(--t-body); cursor: pointer; white-space: nowrap; }
.tk-tab:hover { color: var(--t-navy); }
.tk-tab[aria-selected="true"] { color: var(--t-navy); border-bottom-color: var(--t-amber); }
.tk[data-searching] .tk-tab[aria-selected="true"] { border-bottom-color: transparent; color: var(--t-body); }

.tk-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tk-chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--t-line); background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: var(--t-navy); cursor: pointer; }
.tk-chip[aria-pressed="true"] { background: var(--t-navy); border-color: var(--t-navy); color: #fff; }

.tk-rail { position: relative; }
.tk-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 18px) / 4); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 14px; scrollbar-width: none; }
.tk-track::-webkit-scrollbar { display: none; }
/* The slider scrolls inside itself; never let its cards widen the page on phones. */
.tk-track { contain: paint; }
.t-page { overflow-x: clip; }
.tk-arrow { position: absolute; top: 34%; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--t-line); background: #fff; color: var(--t-navy); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(11,42,120,.18); display: flex; align-items: center; justify-content: center; padding-bottom: 3px; }
.tk-arrow--prev { left: -18px; }
.tk-arrow--next { right: -18px; }
.tk-arrow[disabled] { opacity: 0; pointer-events: none; }

.tk-card { scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden; transition: box-shadow .2s, transform .2s; min-width: 0; }
.tk-card[hidden] { display: none; }
.tk-card:hover { box-shadow: 0 12px 30px rgba(11,42,120,.14); transform: translateY(-2px); }
.t-page .tk-card__media { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--t-navy), var(--t-royal)); overflow: hidden; }
.tk-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tk-card:hover .tk-card__media img { transform: scale(1.04); }
.tk-card__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--t-head); font-weight: 800; font-size: 22px; letter-spacing: .02em; }
.tk-card__level { position: absolute; left: 10px; top: 10px; background: var(--t-amber); color: var(--t-deep); font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 6px; }
.tk-card__body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tk-card__title { margin: 0; font-family: var(--t-head); font-size: 16px; line-height: 1.3; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.t-page .tk-card__title a { color: var(--t-ink); }
.tk-card__sub { margin: 0; font-size: 13px; color: var(--t-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-card__rate { margin: 0; font-size: 13px; color: var(--t-body); display: flex; align-items: center; gap: 6px; }
.tk-card__rate strong { color: #8A5A00; }
.tk-card__rate .tc-stars { position: relative; display: inline-block; font-size: 13px; letter-spacing: 1px; line-height: 1; color: #D3DDF7; }
.tk-card__rate .tc-stars__fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--t-amber); }
.tk-card__badges { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.tk-badge { font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 4px; background: var(--t-tint); color: var(--t-navy); }
.tk-badge--best { background: #FFF1C2; color: #6B4A00; }
.tk-badge--new { background: #DDF6E8; color: #0C6B3A; }
.tk-badge--free { background: #E3E6FF; color: var(--t-royal); }
.tk-card__foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tk-card__price { font-weight: 800; font-size: 16px; color: var(--t-ink); }
.tk-card__price del { color: var(--t-body); font-weight: 400; font-size: 13px; margin-right: 4px; }
.tk-card__price ins { text-decoration: none; }
.t-page a.tk-card__cta { font-size: 14px; font-weight: 800; color: var(--t-royal); border: 1.5px solid var(--t-royal); border-radius: 8px; padding: 6px 12px; white-space: nowrap; text-decoration: none; }
.t-page a.tk-card__cta:hover { background: var(--t-royal); color: #fff; text-decoration: none; }

.tk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tk-results__count { margin: 0 0 14px; color: var(--t-body); }
.tk-more { margin: 8px 0 0; font-weight: 800; }
.tk-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 28px; border: 1.5px dashed var(--t-tint-2); border-radius: var(--t-radius); background: var(--t-tint); color: var(--t-body); }
.tk-empty strong { color: var(--t-navy); font-size: 18px; font-family: var(--t-head); }
.tk-empty .t-btn { margin-top: 6px; }
.tk-empty--level { padding: 16px; }
.tk-empty[hidden] { display: none; }

/* ---------- AI chat ---------- */
.tai { position: fixed; right: 20px; bottom: 20px; z-index: 99990; font-family: var(--t-text); color: var(--t-ink); }
.tai *, .tai *::before, .tai *::after { box-sizing: border-box; }
.tai__launch { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--t-navy); color: #fff; font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: 0 10px 28px rgba(7,26,77,.35); }
.tai__launch:hover { filter: brightness(1.12); }
.tai__launch i { width: 10px; height: 10px; border-radius: 50%; background: #3BD67F; box-shadow: 0 0 0 3px rgba(59,214,127,.3); }
.tai[data-open] .tai__launch { display: none; }
.tai__panel { display: none; width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px)); background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(7,26,77,.3); overflow: hidden; flex-direction: column; }
.tai[data-open] .tai__panel { display: flex; }
.tai__top { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(120deg, var(--t-deep), var(--t-navy)); color: #fff; }
.tai__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--t-amber); color: var(--t-deep); display: flex; align-items: center; justify-content: center; font-weight: 900; font-style: italic; flex-shrink: 0; }
.tai__top strong { display: block; font-size: 15px; }
.tai__top small { display: block; font-size: 12px; color: var(--t-soft); }
.tai__close { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; cursor: pointer; }
.tai__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #F6F8FE; }
.tai__msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.tai__msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--t-line); border-bottom-left-radius: 4px; }
.tai__msg--user { align-self: flex-end; background: var(--t-royal); color: #fff; border-bottom-right-radius: 4px; }
.tai__msg a { color: var(--t-royal); font-weight: 700; }
.tai__msg ul { margin: 4px 0; padding-left: 18px; white-space: normal; }
.tai__msg--err { background: #FFF1F0; border-color: #F5C2BE; color: #8A1C12; }
.tai__typing { display: inline-flex; gap: 4px; }
.tai__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--t-soft); animation: tai-dot 1s infinite; }
.tai__typing i:nth-child(2) { animation-delay: .15s; } .tai__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tai-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.tai__chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; background: #F6F8FE; }
.tai__chips button { border: 1px solid var(--t-tint-2); background: #fff; color: var(--t-navy); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.tai__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--t-line); background: #fff; }
.tai__form textarea { flex: 1; resize: none; height: 44px; max-height: 120px; border: 1.5px solid var(--t-line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14.5px; color: var(--t-ink); outline: 0; }
.tai__form textarea:focus { border-color: var(--t-royal); }
.tai__form button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--t-amber); color: var(--t-deep); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tai__form button[disabled] { opacity: .5; cursor: default; }
.tai__note { margin: 0; padding: 0 12px 10px; font-size: 11.5px; color: var(--t-body); background: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .tk-track { grid-auto-columns: calc((100% - 2 * 18px) / 3); }
  .tk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tcn__grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .tk-track { grid-auto-columns: calc((100% - 18px) / 2); }
  .tk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tk-arrow { display: none; }
}
@media (max-width: 600px) {
  .tcn { padding: 32px 0; }
  .tcn__points { grid-template-columns: minmax(0, 1fr); }
  .tcn__actions .t-btn { flex: 1 1 100%; }
  .tk-track { grid-auto-columns: 78%; }
  .tk-grid { grid-template-columns: minmax(0, 1fr); }
  .tk-search { flex-basis: 100%; }
  .tai { right: 12px; bottom: 12px; }
  .tai__launch span { display: none; }
  .tai__launch { padding: 0 18px; }
}
