/* ============================================================
   EastSingapore.com — Design System
   Singapore palette (flag red + orchid national flower) with a
   Western modern-directory aesthetic (Yelp/Airbnb/TripAdvisor).
   ============================================================ */

:root {
  /* Singapore flag red (deepened for AA contrast on white) */
  --red:        #CF1020;
  --red-strong: #A50C19;
  --red-tint:   #FCECEE;
  --red-mist:   #FBE5E7;

  /* Orchid — Vanda Miss Joaquim (Singapore's national flower) */
  --orchid:      #7C5CD6;
  --orchid-strong:#6742C0;
  --orchid-tint: #F0EBFB;

  /* White (flag) + neutral canvas */
  --white:   #FFFFFF;
  --bg:      #F7F9FB;
  --surface: #FFFFFF;
  --line:    #E7ECF2;
  --line-soft: #EEF3F8;

  /* Ink / typography */
  --ink:    #0E1B2C;
  --ink-2:  #26364B;
  --muted:  #5C6C85;
  --faint:  #66788F;

  /* Status */
  --green:      #12805C;
  --green-tint: #E6F4EF;
  --gold:       #E8A10D;
  --gold-tint:  #FBF3DF;
  --blue:       #2563EB;
  --blue-tint:  #E7EFFE;

  /* Radius & elevation */
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14,27,44,.06);
  --shadow:    0 8px 24px -8px rgba(14,27,44,.14);
  --shadow-lg: 0 22px 50px -16px rgba(14,27,44,.20);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
p  { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 68px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  display: grid; place-items: center; color: #fff; font-size: 15px; box-shadow: var(--shadow-sm);
}
.brand em { color: var(--red); font-style: normal; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { color: var(--ink-2); font-size: 14.5px; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.main-nav a:hover { background: var(--line-soft); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.lang-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.lang-btn:hover { background: var(--line-soft); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 14px; border-radius: 999px; padding: 10px 18px;
  border: none; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(207,16,32,.55); }
.btn-primary:hover { background: var(--red-strong); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line-soft); text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ---------- Hero + search ---------- */
.hero { padding: 56px 0 40px; text-align: center; }
.hero .eyebrow {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--red); background: var(--red-tint);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); letter-spacing: -.03em; }
.hero h1 .accent { color: var(--red); }
.hero .zh-line { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--muted); font-weight: 500; margin-top: 8px; }
.hero .lede { color: var(--muted); font-size: 17px; max-width: 640px; margin: 16px auto 0; }

.search-bar {
  display: flex; align-items: center; gap: 8px; max-width: 720px; margin: 30px auto 0;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 10px 8px 20px;
  box-shadow: var(--shadow-lg);
}
.search-bar input {
  flex: 1; border: none; outline: none; font-size: 16px; font-family: var(--font); color: var(--ink);
  background: transparent;
}
.search-bar .select {
  border: none; outline: none; background: var(--line-soft); color: var(--ink-2);
  font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 999px; font-family: var(--font); cursor: pointer;
}
.search-bar .search-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--red); color: #fff; font-size: 17px; display: grid; place-items: center;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff;
  border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px;
}
.chip:hover { border-color: var(--red); color: var(--red); text-decoration: none; }

/* ---------- Sections ---------- */
.section { padding: 42px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 26px; }
.section-head .zh-line { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 12px; }
.section-head .more { font-size: 14px; font-weight: 700; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease;
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.media {
  height: 150px; display: grid; place-items: center; position: relative;
  background-size: cover; background-position: center; background-color: var(--line-soft);
}
.media .tag { position: absolute; top: 12px; left: 12px; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.tile-food     { background-image: url("tiles/food.svg"); }
.tile-noodle   { background-image: url("tiles/noodle.svg"); }
.tile-coffee   { background-image: url("tiles/coffee.svg"); }
.tile-park     { background-image: url("tiles/park.svg"); }
.tile-sports   { background-image: url("tiles/sports.svg"); }
.tile-mall     { background-image: url("tiles/mall.svg"); }
.tile-aircon   { background-image: url("tiles/aircon.svg"); }
.tile-dental   { background-image: url("tiles/dental.svg"); }
.tile-book     { background-image: url("tiles/book.svg"); }
.tile-city     { background-image: url("tiles/city.svg"); }
.tile-places   { background-image: url("tiles/places.svg"); }
.tile-services { background-image: url("tiles/services.svg"); }
.tile-living   { background-image: url("tiles/living.svg"); }
.card-body { padding: 16px 18px 18px; }
.card-body h3 { font-size: 17px; }
.card-body .sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 10px; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.badge--red    { background: var(--red-tint);   color: var(--red); }
.badge--green  { background: var(--green-tint); color: var(--green); }
.badge--gold   { background: var(--gold-tint);  color: #A06A00; }
.badge--blue   { background: var(--blue-tint);  color: var(--blue); }
.badge--orchid { background: var(--orchid-tint); color: var(--orchid-strong); }
.badge--neutral{ background: var(--line-soft);  color: var(--ink-2); }

.stars { color: var(--gold); font-size: 14px; letter-spacing: 1px; }
.rating-num { font-weight: 800; font-size: 13.5px; color: var(--ink-2); }
.rating-count { color: var(--faint); font-size: 13px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13.5px; color: var(--faint); padding: 20px 0 4px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--red); }

.zh-line { font-weight: 500; color: var(--muted); }

/* ---------- Detail layout ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 18px; margin-bottom: 14px; }
.sticky { position: sticky; top: 88px; }

/* ---------- Listing photo gallery ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.photo-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--line-soft); }
.photo-grid img:first-child { grid-column: 1 / -1; aspect-ratio: 16/9; }

.fact-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.fact-row:last-child { border-bottom: none; }
.fact-row .k { color: var(--muted); }
.fact-row .v { text-align: right; font-weight: 600; }

.review { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.review:last-child { border-bottom: none; }
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: #fff;
}
.review .who { font-weight: 700; font-size: 14px; }
.review .when { color: var(--faint); font-size: 12.5px; }
.review p { color: var(--ink-2); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line-soft); padding: 14px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-q { font-weight: 700; font-size: 15px; display: flex; align-items: baseline; gap: 10px; cursor: pointer; list-style: none; }
.faq-q::before { content: "Q"; color: var(--red); font-weight: 800; flex: none; }
.faq-q::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 700; font-size: 20px; line-height: 1; flex: none; transition: transform .16s ease; }
.faq-item[open] .faq-q::after { transform: rotate(45deg); }
.faq-q::-webkit-details-marker { display: none; }
.faq-a { color: var(--muted); font-size: 14.5px; margin-top: 6px; padding-left: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C7D0DD; margin-top: 56px; padding: 52px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 36px; }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-grid a { display: block; color: #A6B2C2; font-size: 14px; padding: 4px 0; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; font-size: 13px; color: #8592A4; display: flex; justify-content: space-between; }

/* ---------- Homepage components ---------- */
.stats { display: flex; gap: 44px; justify-content: center; flex-wrap: wrap; padding: 10px 0 30px; }
.stat { text-align: center; }
.stat .num { font-size: 28px; font-weight: 800; color: var(--red); letter-spacing: -.02em; }
.stat .lbl { font-size: 13px; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.feature .f-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.5px; }

.cta-band {
  background: linear-gradient(135deg, var(--red), var(--red-strong));
  border-radius: var(--r-lg); padding: 46px; text-align: center; color: #fff;
}
.cta-band h2 { color: #fff; font-size: 28px; }
.cta-band p { color: #FBD5D8; margin: 12px auto 26px; max-width: 520px; }
.cta-band .btn-primary { background: #fff; color: var(--red); box-shadow: none; }
.cta-band .btn-primary:hover { background: #FFE1E3; }

/* ---------- Language toggle ---------- */
.en, .zh { display: block; }
html.lang-zh .en { display: none; }
html.lang-en .zh { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid, .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .card-grid, .card-grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 28px; }
  .photo-grid { grid-template-columns: 1fr; }
  .photo-grid img:first-child { aspect-ratio: 4/3; }
}

/* ============================================================
   UX enhancements (2026-10-14)
   ============================================================ */

/* ---------- Focus / a11y ---------- */
:focus-visible { outline: 3px solid var(--orchid); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Active nav ---------- */
.main-nav a.active { background: var(--red-tint); color: var(--red); }

/* ---------- Mobile nav toggle ---------- */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; padding: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink-2); border-radius: 2px; transition: transform .16s ease, opacity .16s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Search dropdown ---------- */
.search-bar { position: relative; }
.search-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60; text-align: left;
}
.sr-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--line-soft); text-decoration: none; }
.sr-name { font-weight: 700; font-size: 14.5px; }
.sr-sub { color: var(--muted); font-size: 13px; flex: 1; }
.sr-rating { color: var(--gold); font-weight: 700; font-size: 13px; white-space: nowrap; }
.sr-empty { color: var(--muted); padding: 20px; }

/* ---------- Search results page ---------- */
.search-results { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.search-results .sr-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; }
.search-results .sr-item:hover { box-shadow: var(--shadow-sm); }

/* ---------- Filter bar (pillar / area) ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 16px 0 6px; padding: 14px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.filter-input {
  flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 18px; font-size: 14.5px; font-family: var(--font); color: var(--ink); outline: none;
}
.filter-input:focus { border-color: var(--orchid); }
.cuisine-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cuisine-chips .chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Map embed ---------- */
.map-frame { width: 100%; height: 220px; border: 0; border-radius: var(--r-md); background: var(--line-soft); }

/* ---------- Utility link row ---------- */
.utility-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13.5px; }
.utility-links a { color: var(--muted); font-weight: 600; }
.utility-links a:hover { color: var(--red); }

/* ---------- Responsive additions ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow); padding: 10px 24px 16px; z-index: 55;
  }
  .main-nav.open a { padding: 10px 12px; }
}
@media (max-width: 560px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-input { min-width: 0; }
}
