/* ==========================================================================
   UTD8 Nearby guide — same design language as utd8hotel.com
   (navy from the logo, cream and white, Instrument Sans, square corners,
   centred headings, no divider lines)
   ========================================================================== */
:root {
  --navy: #1f3366;
  --navy-deep: #131f3d;
  --sage: #b7bca5;
  --sage-soft: #e7e9df;
  --cream: #f6f3ec;
  --paper: #ffffff;
  --ink: #131f3d;
  --ink-soft: #5d6577;
  --gold: #c9a96e;
  --font: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-th: "Instrument Sans", "Noto Sans Thai", "Thonburi", sans-serif;
  --font-he: "Instrument Sans", "Noto Sans Hebrew", "Arial Hebrew", sans-serif;
  --font-ar: "Noto Sans Arabic", "Geeza Pro", "Instrument Sans", sans-serif;
  --font-cn: "Instrument Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --fs-small: .76rem;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 64px;
  --nav-h: 64px;
  --radius: 2px;
  --shadow: 0 18px 40px -24px rgba(19, 31, 61, .35);
  --shadow-sm: 0 10px 24px -18px rgba(19, 31, 61, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 1rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
html[lang="th"] body { font-family: var(--font-th); line-height: 1.75; }
html[lang="he"] body { font-family: var(--font-he); }
html[lang="ar"] body { font-family: var(--font-ar); }
html[lang="zh"] body { font-family: var(--font-cn); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.eyebrow { display: block; font-size: var(--fs-small); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
html[lang="th"] .eyebrow, html[lang="he"] .eyebrow, html[lang="ar"] .eyebrow, html[lang="zh"] .eyebrow { letter-spacing: .04em; }
.h1 { font-weight: 500; font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
.h2 { font-weight: 500; font-size: clamp(1.35rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.muted { color: var(--ink-soft); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 44px;
  padding: 12px 22px; border-radius: var(--radius); border: 1px solid var(--navy);
  background: var(--navy); color: #fff; cursor: pointer;
  font-size: var(--fs-small); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  transition: background .3s var(--ease), color .3s var(--ease), gap .3s var(--ease);
}
.btn:hover { background: var(--navy-deep); gap: .85em; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn svg { width: 15px; height: 15px; flex: none; }
html[dir="rtl"] .btn svg.dir { transform: scaleX(-1); }

/* ---------- Header ---------- */
.g-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.97); box-shadow: 0 6px 20px -16px rgba(19,31,61,.4); padding-top: env(safe-area-inset-top, 0px); }
.g-header .wrap { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.g-logo { display: block; width: 116px; flex: none; }
.g-topnav { display: none; align-items: center; gap: 28px; font-size: .9rem; }
.g-topnav a { position: relative; padding: 4px 0; }
.g-topnav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: currentColor; transition: right .35s var(--ease); }
.g-topnav a:hover::after, .g-topnav a.is-active::after { right: 0; }
.g-right { display: flex; align-items: center; gap: 22px; }
.g-lang { position: relative; }
.g-lang__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; background: var(--cream); border: 0; border-radius: var(--radius); cursor: pointer; font-size: var(--fs-small); font-weight: 600; letter-spacing: .1em; }
.g-lang__btn svg { width: 16px; height: 16px; }
.g-lang__menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 170px; background: #fff; box-shadow: var(--shadow); padding: 6px 0; z-index: 60; }
.g-lang__menu button { display: block; width: 100%; text-align: start; padding: 11px 18px; background: none; border: 0; cursor: pointer; font-size: .95rem; }
.g-lang__menu button:hover, .g-lang__menu button[aria-current="true"] { background: var(--cream); }

/* ---------- Bottom navigation (phones) ---------- */
.g-bottomnav { position: fixed; inset: auto 0 0 0; z-index: 40; background: rgba(255,255,255,.97); box-shadow: 0 -10px 30px -22px rgba(19,31,61,.45); padding-bottom: env(safe-area-inset-bottom, 0px); }
.g-bottomnav ul { display: grid; grid-template-columns: repeat(3, 1fr); height: var(--nav-h); max-width: 520px; margin: 0 auto; }
.g-bottomnav a { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .7rem; letter-spacing: .06em; color: var(--ink-soft); }
.g-bottomnav a svg { width: 22px; height: 22px; }
.g-bottomnav a.is-active { color: var(--navy); font-weight: 600; }

/* ---------- Splash (choose language) ---------- */
.splash { min-height: 100svh; display: grid; place-items: center; padding: 48px var(--gutter); background: var(--cream); margin-bottom: calc(-1 * (var(--nav-h) + env(safe-area-inset-bottom, 0px))); }
.splash__inner { width: min(420px, 100%); text-align: center; }
.splash__logo { width: min(280px, 80%); margin: 0 auto; animation: rise 1s var(--ease) both; }
.splash__tag { margin-top: 14px; color: var(--ink-soft); letter-spacing: .08em; animation: rise 1s .2s var(--ease) both; }
.splash__list { margin-top: 36px; background: #fff; box-shadow: var(--shadow); animation: rise 1s .45s var(--ease) both; }
.splash__list a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 22px; font-weight: 500; transition: background .3s var(--ease); }
.splash__list a + a { box-shadow: inset 0 1px 0 var(--cream); }
.splash__list a:hover { background: var(--cream); }
.splash__list svg { width: 16px; height: 16px; color: var(--gold); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Home ---------- */
.hero { position: relative; color: #fff; min-height: clamp(260px, 42vh, 420px); display: flex; align-items: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(19,31,61,.15), rgba(19,31,61,.75)); }
.hero .wrap { position: relative; z-index: 1; padding-top: 48px; padding-bottom: clamp(28px, 4vw, 48px); text-align: center; }
.hero .eyebrow { color: rgba(255,255,255,.85); margin-bottom: 10px; }
.section { padding: clamp(32px, 5vw, 64px) 0; }
.section--cream { background: var(--cream); }
.section__head { text-align: center; margin-bottom: clamp(18px, 3vw, 32px); }

.quick { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; max-width: 760px; margin: 0 auto; }
.quick__grab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; background: #00b14f; color: #fff; border-radius: var(--radius); min-height: 150px; transition: transform .3s var(--ease); }
.quick__grab img { height: 30px; width: auto; filter: brightness(0) invert(1); }
.quick__grab span { font-size: var(--fs-small); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.quick__apps { display: grid; gap: 10px; }
.quick__apps a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 16px; background: #fff; box-shadow: var(--shadow-sm); border-radius: var(--radius); font-weight: 600; font-size: .9rem; transition: transform .3s var(--ease); }
.quick__apps img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.quick__grab:hover, .quick__apps a:hover { transform: translateY(-2px); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; aspect-ratio: 1 / .92; padding: 16px 12px; background: var(--cream); border-radius: var(--radius); text-align: center; transition: background .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease); }
.tile img { width: 64px; height: 64px; object-fit: contain; transition: transform .45s var(--ease); }
.tile--logo img { width: 92px; height: 72px; }
.tile__icon { width: 38px; height: 38px; color: var(--navy); margin-bottom: 4px; transition: transform .45s var(--ease); }
.tile:hover .tile__icon { transform: translateY(-2px); }
.tile span { font-weight: 500; font-size: .95rem; line-height: 1.25; }
.tile:hover { background: #fff; box-shadow: var(--shadow); transform: translateY(-3px); }
.tile:hover img { transform: scale(1.06); }

/* ---------- Page head (category, map, bts, contact) ---------- */
.pagehead { background: var(--cream); padding: clamp(28px, 5vw, 56px) 0 clamp(22px, 3vw, 36px); text-align: center; }
.pagehead .eyebrow { margin-bottom: 10px; }
.pagehead p { margin-top: 8px; }
.pagehead .note { font-size: .85rem; color: var(--ink-soft); max-width: 620px; margin-left: auto; margin-right: auto; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 18px; }
.back svg { width: 14px; height: 14px; }
html[dir="rtl"] .back svg { transform: scaleX(-1); }

/* ---------- Category ---------- */
.toolbar { display: flex; gap: 8px; max-width: 760px; margin: 0 auto; }
.search { flex: 1; position: relative; }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-soft); pointer-events: none; }
.search input { width: 100%; height: 48px; padding: 0 44px; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); font: inherit; font-size: 16px; color: var(--ink); }
.search input:focus { outline: 2px solid var(--navy); outline-offset: 0; }
.search__clear { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; cursor: pointer; color: var(--ink-soft); font-size: 1.2rem; }
.filter-btn { width: 48px; height: 48px; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; display: grid; place-items: center; color: var(--ink-soft); }
.filter-btn svg { width: 18px; height: 18px; }
.filter-btn[aria-expanded="true"], .filter-btn.is-on { background: var(--navy); color: #fff; }
.filters { max-width: 760px; margin: 12px auto 0; padding: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.filters h4 { margin: 0 0 10px; font-size: var(--fs-small); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.filters h4:not(:first-child) { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--cream); cursor: pointer; font-size: .85rem; white-space: nowrap; transition: background .3s var(--ease), color .3s var(--ease); }
.chip.is-on, .chip:hover { background: var(--navy); color: #fff; }
.filters__clear { margin-top: 16px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: .85rem; color: var(--ink-soft); }

.places { display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.place { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: start; padding: 20px 20px 18px; background: #fff; box-shadow: var(--shadow-sm); border-radius: var(--radius); transition: box-shadow .4s var(--ease); }
.place.is-highlight { box-shadow: 0 0 0 2px var(--gold), var(--shadow); }
.place h3 { font-weight: 500; font-size: 1.08rem; line-height: 1.3; }
.place__meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .8rem; color: var(--ink-soft); }
.tag { display: inline-block; padding: 3px 10px; background: var(--sage-soft); color: var(--navy-deep); font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border-radius: 999px; }
html[lang="th"] .tag, html[lang="he"] .tag, html[lang="ar"] .tag, html[lang="zh"] .tag { letter-spacing: .02em; }
.place p { grid-column: 1 / -1; color: var(--ink-soft); font-size: .95rem; }
.place p a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.place__go { grid-row: 1; grid-column: 2; width: 44px; height: 44px; display: grid; place-items: center; background: var(--cream); border: 0; border-radius: var(--radius); cursor: pointer; color: var(--navy); transition: background .3s var(--ease), color .3s var(--ease); }
.place__go:hover { background: var(--navy); color: #fff; }
.place__go svg { width: 18px; height: 18px; }
.places__header { text-align: center; padding: 18px 0 2px; }
.empty { text-align: center; color: var(--ink-soft); padding: 36px 0; }

/* ---------- Map ---------- */
.mapbar { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 30; background: rgba(255,255,255,.97); padding: 10px 0; box-shadow: 0 8px 20px -18px rgba(19,31,61,.4); }
.mapbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.mapbar .chips::-webkit-scrollbar { display: none; }
.mapgrid { display: grid; gap: 18px; padding: 18px 0 32px; }
.mapframe { position: relative; background: var(--cream); height: 50svh; min-height: 300px; box-shadow: var(--shadow-sm); }
.mapframe iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mapcol { display: grid; }
.mapframe__bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 16px; background: rgba(255,255,255,.97); box-shadow: var(--shadow); }
.mapframe__bar strong { font-weight: 500; font-size: .95rem; line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mapframe__bar .btn { min-height: 40px; padding: 8px 14px; flex: none; }
.maplist { display: grid; gap: 8px; align-content: start; }
.maplist button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: start; background: #fff; border: 0; box-shadow: var(--shadow-sm); border-radius: var(--radius); cursor: pointer; transition: background .3s var(--ease); }
.maplist button:hover { background: var(--cream); }
.maplist button.is-on { background: var(--navy); color: #fff; }
.maplist button.is-on small { color: rgba(255,255,255,.75); }
.maplist button svg { width: 18px; height: 18px; flex: none; }
.maplist .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.maplist span { display: grid; min-width: 0; }
.maplist strong { font-weight: 500; line-height: 1.3; }
.maplist small { color: var(--ink-soft); font-size: .78rem; }
.maplist__home { font-weight: 600; }

/* ---------- BTS ---------- */
.btsmap { max-width: 520px; margin: 0 auto; background: #fff; box-shadow: var(--shadow-sm); padding: 16px 8px 8px; }
.bts-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: .75rem; color: var(--ink-soft); padding: 0 8px 10px; }
.bts-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bts-legend i { display: inline-block; width: 18px; height: 5px; border-radius: 3px; }
.bts-legend i.is-home { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); }
.btsdiagram { display: block; width: 100%; height: auto; font-family: var(--font); font-size: 10.5px; fill: var(--ink); }
.btsdiagram text { pointer-events: none; }
.bts-code { fill: var(--ink-soft); font-size: 9px; font-weight: 600; letter-spacing: .04em; }
.bts-st { cursor: pointer; outline: none; }
.bts-st circle { transition: r .25s var(--ease); }
.bts-st:hover circle:not(.bts-pulse), .bts-st:focus-visible circle:not(.bts-pulse) { stroke: var(--gold); }
.bts-st:hover text, .bts-st:focus-visible text { fill: var(--navy); text-decoration: underline; }
.bts-st.is-home text { fill: var(--navy-deep); }
.bts-pulse { fill: var(--gold); opacity: .3; transform-box: fill-box; transform-origin: center; animation: btsping 2s ease-out infinite; }
@keyframes btsping { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(1.6); opacity: 0; } }
.stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 10px; max-width: 980px; margin: 28px auto 0; }
.stations button { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; background: #fff; border: 0; box-shadow: var(--shadow-sm); border-radius: var(--radius); cursor: pointer; text-align: start; transition: background .3s var(--ease); }
.stations button:hover { background: var(--cream); }
.code { display: inline-grid; place-items: center; min-width: 40px; height: 28px; padding: 0 6px; background: var(--navy-deep); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .06em; border-radius: var(--radius); }
.code.is-home { background: var(--gold); color: var(--navy-deep); }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.cblock { background: #fff; box-shadow: var(--shadow-sm); padding: 22px; text-align: center; }
.cblock .eyebrow { margin-bottom: 8px; }
.cblock p { white-space: pre-line; }
.cblock a.line { display: block; padding: 6px 0; color: var(--navy); font-weight: 500; }
.cblock .btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

/* ---------- Modal (station, shuttle schedule) ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; align-items: end; justify-items: center; background: rgba(19,31,61,.55); opacity: 0; transition: opacity .3s var(--ease); padding: 0; }
.modal.is-open { opacity: 1; }
.modal__card { position: relative; width: min(560px, 100%); max-height: 88svh; overflow-y: auto; background: #fff; padding: 24px 22px calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateY(24px); transition: transform .4s var(--ease); }
.modal.is-open .modal__card { transform: none; }
.modal__close { position: absolute; top: 12px; inset-inline-end: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--cream); cursor: pointer; font-size: 1.3rem; line-height: 1; }
.modal__head { display: flex; align-items: center; gap: 12px; padding-inline-end: 44px; margin-bottom: 16px; }
.modal ul { display: grid; gap: 10px; margin-bottom: 20px; }
.modal li { position: relative; padding-inline-start: 18px; color: var(--ink-soft); }
.modal li::before { content: ""; position: absolute; inset-inline-start: 0; top: .65em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* English names, addresses and numbers inside Arabic/Hebrew pages keep their own reading order */
.place h3, .place p, .cblock p, .cblock a.line, .maplist strong, .maplist small, .modal li, .modal h2, .stations strong, .mapframe__bar strong, .places__header .eyebrow { unicode-bidi: plaintext; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .quick { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  :root { --header-h: 76px; }
  body { padding-bottom: 0; }
  .g-bottomnav { display: none; }
  .g-topnav { display: flex; }
  .g-logo { width: 130px; }
  .tiles { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .mapgrid { grid-template-columns: 340px 1fr; align-items: start; }
  .mapcol { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 76px); }
  .mapframe { height: calc(100svh - var(--header-h) - 180px); }
  .maplist { grid-column: 1; grid-row: 1; }
  .modal { align-items: center; padding: 24px; }
  .splash { margin-bottom: 0; }
}
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
