/* TIMEPLUS TH — home: a ticketing-style front page (banner carousel, rows of event cards) with the hub's own touch:
   who runs each event, a hands-on workshop row, and the organizers to follow.
   Brand book: #014f77 primary, #1f2020 charcoal, #2992d0 accent, #ffffff. Outfit (English) / Anuphan (Thai).
   Accent on white is 3.43:1, so accent text is only large or bold; small text stays primary or charcoal.
   The events page also loads this file for .tph-wrap, .tph-btn*, .tph-link, .tph-kicker and .tph-partner. */

:root {
  --tph-blue: #014f77;
  --tph-sky: #2992d0;
  --tph-ink: #1f2020;
  --tph-white: #ffffff;
  --tph-blue-deep: #013d5c;
  --tph-mist: #f3f7fa;
  --tph-line: #e3eaef;
  --tph-muted: #5b6870;
  --tph-en: "Outfit", "Anuphan", system-ui, sans-serif;
  --tph-th: "Anuphan", "Outfit", system-ui, sans-serif;
  --tph-wrap: 1240px;
  --tph-gutter: clamp(16px, 4vw, 40px);
  --tph-radius: 12px;
  --tph-ease: cubic-bezier(.2, .7, .2, 1);
}

body { background: var(--tph-white); }
.tph { font-family: var(--tph-th); color: var(--tph-ink); line-break: strict; word-break: normal; }
.tph h1, .tph h2, .tph h3 { font-family: var(--tph-th); font-weight: 700; letter-spacing: -.01em; }
html[lang="en"] .tph, html[lang="en"] .tph h1, html[lang="en"] .tph h2, html[lang="en"] .tph h3, html[lang="en"] .tph-btn, html[lang="en"] .tph-kicker { font-family: var(--tph-en); }
.tph:focus { outline: none; }
.tph-wrap { width: min(var(--tph-wrap), 100% - 2 * var(--tph-gutter)); margin-inline: auto; position: relative; }
.tph a:focus-visible, .tph button:focus-visible { outline: 3px solid var(--tph-blue); outline-offset: 3px; border-radius: 6px; }
[tabindex="-1"]:focus { outline: none; }

/* ── Shared pieces (home + events page) ─────────────────────── */
.tph-diagonals { position: absolute; pointer-events: none; }
.tph-diagonals polygon { fill: currentColor; }
.tph-arrow { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--tph-ease); }
a:hover > .tph-arrow { transform: translateX(3px); }

.tph-kicker { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; font: 600 14px/1.4 var(--tph-th); }
.tph-kicker:lang(en) { font: 600 13px/1.4 var(--tph-en); letter-spacing: .16em; text-transform: uppercase; }
.tph-kicker::before { content: ""; width: 26px; height: 3px; background: var(--tph-sky); transform: skewX(-24deg); }
.tph-kicker--light { color: rgba(255,255,255,.86); }
.tph-kicker--dark { color: var(--tph-blue); }

.tph-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 10px 22px; border: 2px solid transparent; border-radius: 999px; background: var(--tph-blue); color: var(--tph-white); font: 600 16px/1.2 var(--tph-th); white-space: nowrap; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
.tph-btn:hover { background: var(--tph-blue-deep); color: var(--tph-white); }
.tph-btn svg:not(.tph-arrow) { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.tph-btn--sm { min-height: 44px; padding: 9px 18px; font-size: 15px; }
.tph-btn--white { background: var(--tph-white); color: var(--tph-blue); }
.tph-btn--white:hover { background: #e6f2f9; color: var(--tph-blue); }
.tph-btn--navy { background: var(--tph-blue); color: var(--tph-white); }
.tph-btn--ghost { background: transparent; border-color: rgba(255,255,255,.6); color: var(--tph-white); }
.tph-btn--ghost:hover { background: rgba(255,255,255,.1); border-color: var(--tph-white); }
.tph-btn--outline { background: rgba(255,255,255,.6); border-color: var(--tph-blue); color: var(--tph-blue); }
.tph-btn--outline:hover { background: var(--tph-white); color: var(--tph-blue); }

.tph-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--tph-blue); font-weight: 600; border-bottom: 2px solid var(--tph-sky); padding-bottom: 2px; align-self: flex-start; }
.tph-link:hover { color: var(--tph-blue-deep); border-color: var(--tph-blue); }

.tph-partner { padding-bottom: clamp(40px, 5vw, 64px); }
.tph-partner__box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; align-items: center; padding: 20px; background: var(--tph-mist); border-radius: var(--tph-radius); }
.tph-partner__box img { width: 100%; border-radius: 10px; }
.tph-partner__box h2 { font-size: 24px; margin: 6px 0 10px; }
.tph-partner__box p { line-height: 1.7; margin-bottom: 10px; }
.tph-partner__label { font-size: 12px; color: var(--tph-muted); }

/* ── Avatars ── */
.tph-avatar { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; overflow: hidden; border-radius: 50%; background: var(--tph-sky); color: var(--tph-white); font: 700 11px/1 var(--tph-en); }
.tph-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tph-avatar--lg { width: 96px; height: 96px; font-size: 36px; background: var(--tph-blue); }

/* ── 1. Hero: the promotion space ──
   16:9 banners (the back office's size) shown whole: the current one in the middle, its neighbours peeking in,
   smaller and dimmed. The stage behind is the current banner, blurred dark. */
.tph-hero { --w: min(1000px, 76vw); --g: 24px; position: relative; overflow: hidden; isolation: isolate; padding: clamp(24px, 3vw, 40px) 0 clamp(18px, 2vw, 26px); color: var(--tph-white); background: #071722; }
.tph-hero__backdrop { position: absolute; inset: -60px; z-index: -1; }
.tph-hero__backdrop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(56px) saturate(1.3) brightness(.4); opacity: 0; transition: opacity 1s var(--tph-ease); }
.tph-hero__backdrop img.is-on { opacity: 1; }
.tph-promo { position: relative; height: calc(var(--w) * 9 / 16); }
.tph-promo__slide { position: absolute; top: 0; left: 50%; width: var(--w); aspect-ratio: 16 / 9; transform: translateX(calc(-50% + var(--d) * (var(--w) + var(--g)))) scale(.9); opacity: .38; transition: transform .8s var(--tph-ease), opacity .8s var(--tph-ease); }
.tph-promo__slide.is-on { transform: translateX(-50%) scale(1); opacity: 1; z-index: 1; }
.tph-promo__slide.is-away { opacity: 0; pointer-events: none; }
.tph-promo__slide .tph-promo__art { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; padding: 0; border: 0; background: transparent; border-radius: 18px; box-shadow: 0 30px 70px rgba(0, 0, 0, .45); }
.tph-promo__slide:not(.is-on) .tph-promo__art { cursor: pointer; }
.tph-promo__slide img { width: 100%; height: 100%; object-fit: cover; }
.tph-promo__ad { position: absolute; right: 14px; top: 14px; padding: 3px 10px; border-radius: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); }
.tph-promo__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; width: min(var(--w), 100% - 2 * var(--tph-gutter)); margin-top: 18px; }
.tph-promo__caption { display: grid; gap: 4px; min-width: 0; animation: tph-fade .6s var(--tph-ease); }
@keyframes tph-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tph-promo__caption b { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tph-promo__caption span { font-size: 14px; color: rgba(255,255,255,.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tph-promo__nav { display: flex; align-items: center; gap: 14px; flex: none; }
.tph-promo__step { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.06); color: var(--tph-white); cursor: pointer; transition: background-color .2s; }
.tph-promo__step:hover { background: rgba(255,255,255,.2); }
.tph-promo__step svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tph-promo__dots { display: flex; gap: 6px; }
.tph-promo__dots button { position: relative; width: 28px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.tph-promo__dots button::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); }
.tph-promo__dots button[aria-current="true"] { width: 44px; }
.tph-promo__dots span { position: absolute; left: 0; top: 10px; height: 3px; width: 0; border-radius: 2px; background: var(--tph-white); }
.tph-promo__dots button[aria-current="true"] span { width: 100%; }
.tph-promo__dots span.is-running { animation: tph-progress 6s linear both; }
@keyframes tph-progress { from { width: 0; } to { width: 100%; } }
.tph-hero a:focus-visible, .tph-hero button:focus-visible { outline-color: var(--tph-white); }

/* ── 2. Search ── */
.tph-find { padding: 24px 0 0; }
.tph-hero__search { display: flex; align-items: stretch; max-width: 860px; margin-inline: auto; padding: 6px; border: 1px solid var(--tph-line); border-radius: 14px; background: var(--tph-white); box-shadow: 0 10px 30px rgba(1, 30, 46, .08); }
.tph-hero__search:focus-within { border-color: var(--tph-blue); box-shadow: 0 0 0 3px rgba(1,79,119,.18); }
.tph-find__field { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 0 14px; }
.tph-find__field .tpe-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--tph-muted); stroke-width: 2; stroke-linecap: round; }
.tph-find__field input { flex: 1; min-width: 0; min-height: 50px; border: 0; background: none; font: 400 16px var(--tph-th); color: var(--tph-ink); outline: none; }
.tph-find__type { position: relative; display: flex; align-items: center; flex: 0 0 200px; border-left: 1px solid var(--tph-line); }
.tph-find__type select { width: 100%; height: 100%; min-height: 50px; padding: 0 40px 0 18px; border: 0; background: none; font: 500 15px var(--tph-th); color: var(--tph-ink); appearance: none; cursor: pointer; outline: none; }
.tph-find__type .tpe-ico { position: absolute; right: 14px; width: 18px; height: 18px; fill: none; stroke: var(--tph-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.tph-hero__search button { flex: none; padding: 0 30px; border: 0; border-radius: 10px; background: var(--tph-blue); color: var(--tph-white); font: 600 16px var(--tph-th); cursor: pointer; transition: background-color .2s; }
.tph-hero__search button:hover { background: var(--tph-blue-deep); }

/* ── 3. Rows of events ── */
.tph-row-section { padding: clamp(36px, 4.5vw, 56px) 0 0; }
.tph-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.tph-head h2 { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.3; color: var(--tph-ink); }
.tph-head__note { margin-top: 4px; font-size: 15px; color: var(--tph-muted); }
.tph-head a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; flex: none; color: var(--tph-blue); font-weight: 600; font-size: 15px; }

.tph-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
.tph-card > a { display: flex; flex-direction: column; height: 100%; color: var(--tph-ink); }
.tph-card__media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--tph-blue); }
.tph-card__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--tph-ease); }
.tph-card > a:hover .tph-card__media > img { transform: scale(1.04); }
.tph-card__fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.tph-diagonals--card { inset: 0; width: 100%; height: 100%; opacity: .08; }
.tph-card__fallback img { position: relative; width: 22%; height: auto; opacity: .9; }
.tph-card__chip { position: absolute; right: 10px; top: 10px; padding: 3px 10px; border-radius: 999px; background: #fff4e0; color: #7a4a00; font-size: 12px; font-weight: 600; }
.tph-card__chip.is-full { background: #fde8e8; color: #9b1c1c; }
.tph-card__date { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--tph-blue); }
.tph-card__date small { padding-left: 8px; border-left: 1px solid var(--tph-line); font: 500 13px var(--tph-en); color: var(--tph-muted); }
.tph-card__title { margin-top: 6px; font-size: 17px !important; line-height: 1.45; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tph-card > a:hover .tph-card__title { color: var(--tph-blue); }
.tph-card__place { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--tph-muted); }
.tph-card__place > span { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tph-card__place .tpe-ico { width: 15px; height: 15px; flex: none; margin-top: 3px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tph-card__foot { display: flex; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; }
/* who invites you: right under the cover, before the date */
.tph-card__host { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 14px; font-size: 14px; font-weight: 600; color: #2c3a42; }
.tph-card__host .tph-avatar { width: 26px; height: 26px; }
.tph-card__host > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tph-card__price { flex: none; font: 700 17px/1 var(--tph-en); color: var(--tph-ink); }
.tph-card__ad { margin-top: 6px; font-size: 12px; color: var(--tph-muted); }
.tph-empty { padding: 32px; border: 1px dashed var(--tph-line); border-radius: var(--tph-radius); }
.tph-empty h3 { font-size: 20px; margin-bottom: 6px; }
.tph-empty p { color: var(--tph-muted); line-height: 1.7; }

/* partner placement between rows (back-office advertising) */
.tph-partner .tph-wrap { padding-top: clamp(36px, 4.5vw, 56px); }

/* ── 4. Organizers to follow ── */
.tph-hosts { padding: clamp(48px, 6vw, 72px) 0; margin-top: clamp(36px, 4.5vw, 56px); background: var(--tph-mist); }
.tph-hosts__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tph-hosts__list li { display: flex; flex-direction: column; overflow: hidden; background: var(--tph-white); border: 1px solid var(--tph-line); border-radius: 10px; transition: border-color .2s var(--tph-ease); }
.tph-hosts__list li:hover { border-color: #c5d6e1; }
.tph-host { display: flex; flex-direction: column; flex: 1; color: var(--tph-ink); }
.tph-host__cover { position: relative; display: block; aspect-ratio: 16 / 7; overflow: hidden; background: var(--tph-blue); }
.tph-host__cover > img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); filter: grayscale(1) blur(5px); opacity: .55; mix-blend-mode: luminosity; transition: transform .45s var(--tph-ease), opacity .3s var(--tph-ease); }
.tph-host__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(41, 146, 208, .35), rgba(1, 61, 92, .6)); }
.tph-host:hover .tph-host__cover > img { transform: scale(1.16); opacity: .7; }
.tph-host .tph-avatar--lg { position: relative; width: 72px; height: 72px; margin: -36px 0 0 20px; border: 4px solid var(--tph-white); font-size: 26px; }
.tph-host__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 20px 20px; }
.tph-host b { font-size: 18px; line-height: 1.4; }
.tph-host:hover b { color: var(--tph-blue); }
.tph-host small { font-size: 13px; color: var(--tph-muted); }
.tph-host__bio { margin-top: 6px; font-size: 14px; line-height: 1.6; color: #3a4850; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tph-host__next { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 14px 20px; border-top: 1px solid var(--tph-line); background: var(--tph-mist); color: var(--tph-ink); }
.tph-host__next > span { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tph-host__next small { font-size: 12.5px; font-weight: 600; color: var(--tph-blue); }
.tph-host__next > span > span { font-size: 14px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tph-host__next .tph-arrow { flex: none; color: var(--tph-blue); transition: transform .2s var(--tph-ease); }
.tph-host__next:hover > span > span { color: var(--tph-blue); }
.tph-host__next:hover .tph-arrow { transform: translateX(3px); }

/* ── 5. Organizer banner ── */
.tph-share { padding: clamp(40px, 5vw, 64px) 0 clamp(56px, 7vw, 88px); }
.tph-share__box { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px); border-radius: 16px; background: linear-gradient(120deg, var(--tph-blue) 0%, var(--tph-blue-deep) 100%); color: var(--tph-white); }
.tph-diagonals--share { right: 0; top: 0; width: 46%; height: 100%; z-index: -1; color: var(--tph-sky); opacity: .22; }
.tph-share__copy { flex: 1 1 460px; max-width: 640px; }
.tph-share__eyebrow { margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #8fd0f5; }
.tph-share h2 { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.35; margin-bottom: 10px; color: var(--tph-white); }
.tph-share__copy > p:last-child { line-height: 1.7; color: rgba(255,255,255,.85); }
.tph-share__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tph-share__actions .fb-icon { stroke: none; width: 20px; height: 20px; }
.tph-share a:focus-visible { outline-color: var(--tph-white); }

/* the site footer follows directly */
.tph + .site-foot { margin-top: 0; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .tph-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tph-hosts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tph-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tph-partner__box { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .tph-hero { --w: 86vw; --g: 10px; }
  .tph-promo__slide .tph-promo__art { border-radius: 12px; }
  .tph-promo__bar { flex-wrap: wrap; }
  .tph-promo__step { display: none; }
  .tph-hero__search { flex-wrap: wrap; }
  .tph-find__field { flex-basis: 100%; border-bottom: 1px solid var(--tph-line); }
  .tph-find__type { flex: 1 1 auto; border-left: 0; }
  .tph-hero__search button { min-height: 48px; padding: 0 22px; }
  /* phones: a row of cards scrolls sideways, like the ticket apps */
  .tph-cards { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--tph-gutter); margin-inline: calc(-1 * var(--tph-gutter)); padding: 0 var(--tph-gutter) 6px; scrollbar-width: none; }
  .tph-cards::-webkit-scrollbar { display: none; }
  .tph-card { flex: 0 0 76%; scroll-snap-align: start; }
  .tph-hosts__list { display: flex; overflow-x: auto; gap: 12px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--tph-gutter); margin-inline: calc(-1 * var(--tph-gutter)); padding: 0 var(--tph-gutter) 4px; scrollbar-width: none; }
  .tph-hosts__list li { flex: 0 0 82%; scroll-snap-align: start; }
  .tph-host .tph-avatar--lg { width: 60px; height: 60px; margin: -30px 0 0 16px; font-size: 22px; }
  .tph-host__who { padding: 8px 16px 16px; }
  .tph-host__next { padding: 12px 16px; }
  .tph-host:hover .tph-host__cover > img { transform: scale(1.12); }
  .tph-share__actions .tph-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .tph * { transition: none !important; animation: none !important; }
  .tph-card > a:hover .tph-card__media > img { transform: none; }
}

/* Local handoff: controls stay within the current rows and promotion layout. */
.tph-head > button { display: inline-flex; align-items: center; min-height: 44px; flex: none; gap: 8px; padding: 0; border: 0; background: none; color: var(--tph-blue); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tph-promo__details { display: flex; align-items: center; gap: 20px; min-width: 0; flex: 1; }
.tph-promo__cta { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; color: #fff; font-size: 14px; font-weight: 600; }
.tph-notice { padding: 12px 0; background: #edf6fb; color: var(--tph-blue); font-size: 14px; }
.tph-notice--warning { background: #fff4dc; color: #79521b; }
.tph-notice p { margin: 0; }
.tph-notice a { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: inherit; }
@media(max-width:560px) { .tph-promo__details { flex-wrap: wrap; gap: 10px; flex-basis: 100%; } }
