/* Vina Travel — Guide Library styles (hub, category, article, tips).
   Reuses the production brand tokens + editorial serif/sans pairing.
   Bilingual: html[data-lang] toggles [data-when] blocks. */

:root {
  --red: #c80f1f;
  --red-dark: #9d0b17;
  --gold: #d79a25;
  --ink: #14110f;
  --muted: #706861;
  --line: #eadfd2;
  --paper: #fffdf8;
  --cream: #fff7ec;
  --soft: #f7efe6;
  --shadow: 0 22px 60px rgba(58, 39, 24, .14);
  --card-shadow: 0 10px 26px rgba(43, 28, 18, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(200, 15, 31, .06), transparent 24%),
    radial-gradient(circle at top right, rgba(215, 154, 37, .07), transparent 20%),
    linear-gradient(180deg, #fffaf3 0%, #f4efe6 100%);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Bilingual visibility */
html[data-lang="en"] [data-when="vi"],
html[data-lang="vi"] [data-when="en"] { display: none !important; }

/* ── Topbar ─────────────────────────────────────────────────────────── */
.g-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(14px, 4vw, 40px);
  background: rgba(255, 253, 248, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.g-brand { display: flex; align-items: center; gap: 10px; color: var(--red); }
.g-lotus { width: 34px; height: 26px; flex: none; }
.g-brand span { display: flex; flex-direction: column; line-height: 1; color: var(--ink); }
.g-brand b { font-size: 17px; letter-spacing: .04em; }
.g-brand b i { color: var(--red); font-style: italic; }
.g-brand small { font-size: 10px; color: var(--muted); letter-spacing: .03em; margin-top: 3px; }
.g-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.g-nav a {
  padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: #4a423b; transition: background .15s, color .15s;
}
.g-nav a:hover { background: var(--soft); }
.g-nav a[aria-current="page"] { color: var(--red); background: var(--cream); }
.g-actions { display: flex; align-items: center; gap: 12px; }
.g-phone {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-weight: 800; font-size: 14px; color: var(--red);
}
.g-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.g-lang button {
  border: 0; background: transparent; padding: 6px 11px; font-size: 12px; font-weight: 800;
  color: var(--muted); cursor: pointer;
}
.g-lang button[aria-pressed="true"] { background: var(--red); color: #fff; }

/* ── Layout wrapper ─────────────────────────────────────────────────── */
.g-wrap {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: clamp(16px, 3vw, 30px) 0 10px;
}
.g-eyebrow {
  color: var(--tone, var(--red)); font-size: 12px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
}
.g-summary { color: var(--muted); font-size: clamp(15px, 1.6vw, 17px); line-height: 1.6; max-width: 64ch; }

/* ── Pills / tones ──────────────────────────────────────────────────── */
.g-pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  font-size: 11px; font-weight: 800; padding: 6px 11px; white-space: nowrap;
  letter-spacing: .02em;
}
.g-pill.tone { color: #fff; background: var(--tone, var(--red)); }
.g-tonebar { height: 4px; border-radius: 4px; background: var(--tone, var(--red)); margin-bottom: 16px; }

/* ── Masthead (hub / tips) ──────────────────────────────────────────── */
.g-masthead {
  display: flex; justify-content: space-between; gap: 26px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow); padding: clamp(20px, 3vw, 30px);
}
.g-masthead h1 {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: clamp(28px, 3.4vw, 46px); line-height: 1.04; margin: 10px 0 12px; max-width: 16ch;
}
.g-mast-stats {
  border-left: 1px solid var(--line); padding-left: 20px; min-width: 150px;
  color: var(--muted); font-size: 13px; line-height: 1.9; text-align: right; flex: none;
}
.g-mast-stats b { color: var(--ink); font-size: 17px; }

/* ── Chips (hub filter) ─────────────────────────────────────────────── */
.g-chips { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 2px 16px; }
.g-chip {
  border: 1px solid var(--line); background: #fff; color: #4a423b;
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.g-chip:hover { border-color: var(--tone, var(--gold)); }
.g-chip.is-on { background: var(--tone, var(--red)); color: #fff; border-color: transparent; }

/* ── Card grid ──────────────────────────────────────────────────────── */
.g-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 6px;
}
.g-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.g-card:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(43, 28, 18, .13); }
.g-card-img { display: block; }
.g-card-img img { display: block; width: 100%; aspect-ratio: 1.58 / 1; object-fit: cover; background: var(--soft); }
.g-card-body { padding: 14px 15px 17px; display: flex; flex-direction: column; gap: 9px; }
.g-card-title { font-family: Georgia, "Times New Roman", serif; font-size: 19px; line-height: 1.12; }
.g-card-sum { color: var(--muted); font-size: 13px; line-height: 1.5; }
.g-card.is-hidden { display: none; }

/* ── Category head ──────────────────────────────────────────────────── */
.g-cat-head {
  background: var(--paper); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); margin-bottom: 18px;
}
.g-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.g-crumb a { color: var(--red); font-weight: 700; }
.g-crumb span { opacity: .5; }
.g-cat-copy h1 {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: clamp(26px, 3.2vw, 42px); line-height: 1.05; margin: 12px 0 10px;
}
.g-cat-answers { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.g-cat-answers h2 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.g-cat-answers ul { margin: 0; padding-left: 18px; color: #4f463f; font-size: 14px; line-height: 1.85; columns: 2; column-gap: 28px; }
.g-backlink { margin: 22px 2px 6px; }
.g-backlink a { color: var(--red); font-weight: 700; font-size: 14px; }

/* ── Article ────────────────────────────────────────────────────────── */
.g-article {
  background: var(--paper); border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow); padding: clamp(16px, 3vw, 26px); overflow: hidden;
}
.g-art-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 18px;
  font-size: 13px; color: var(--muted);
}
.g-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: center; }
.g-hero-copy h1 {
  font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: clamp(28px, 3.6vw, 50px); line-height: 1.03; margin: 10px 0 12px; max-width: 13ch;
}
.g-summary + .g-deck, .g-deck { margin-top: 14px; }
.g-deck { font-size: 15px; line-height: 1.8; color: #4d443d; max-width: 60ch; }
.g-hero-img { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 16px 32px rgba(0, 0, 0, .12); }
.g-hero-img img { display: block; width: 100%; height: 100%; max-height: 460px; object-fit: cover; }
.g-hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.16)); }

.g-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px; gap: 16px; margin-top: 22px; }
.g-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; }
.g-panel h2 { font-family: Georgia, "Times New Roman", serif; font-size: 21px; line-height: 1.12; margin: 0 0 12px; font-weight: 700; }
.g-panel p { color: #4f463f; font-size: 14px; line-height: 1.78; margin: 0 0 11px; }
.g-panel ul { margin: 0; padding-left: 18px; color: #4f463f; font-size: 14px; line-height: 1.85; }

.g-related { background: var(--cream); }
.g-rel-list a { display: block; border-top: 1px solid var(--line); padding: 12px 0; }
.g-rel-list a:first-child { border-top: 0; padding-top: 0; }
.g-rel-cat { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--tone, var(--red)); margin-bottom: 3px; }
.g-rel-title { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.25; }
.g-rel-cta { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.g-rel-call { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* ── Buttons ────────────────────────────────────────────────────────── */
.g-btn {
  display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: #fff;
  border-radius: 999px; padding: 12px 20px; font-weight: 800; font-size: 14px;
  box-shadow: 0 10px 22px rgba(200, 15, 31, .24); transition: transform .15s, box-shadow .15s;
}
.g-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(200, 15, 31, .3); }
.g-btn.ghost { background: #fff; color: var(--red); border: 1px solid var(--line); box-shadow: none; }
.g-btn.small { padding: 9px 15px; font-size: 13px; }

/* ── Tips promo + soon ──────────────────────────────────────────────── */
.g-tips-promo {
  display: flex; justify-content: space-between; align-items: center; gap: 22px; flex-wrap: wrap;
  margin-top: 24px; background: linear-gradient(135deg, #f3f6ec, #fbf7ee);
  border: 1px solid var(--line); border-radius: 22px; padding: 22px clamp(20px, 3vw, 28px);
}
.g-tips-promo h2 { font-family: Georgia, "Times New Roman", serif; font-size: 24px; margin: 10px 0 8px; font-weight: 700; }
.g-tips-promo p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; max-width: 60ch; }
.g-soon-block { margin-top: 26px; }
.g-soon-block h2 { font-family: Georgia, "Times New Roman", serif; font-size: 24px; margin: 0 0 8px; font-weight: 700; }
.g-soon-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.g-soon {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px dashed var(--line);
  border-radius: 14px; padding: 13px 16px; font-size: 14px; color: #4f463f;
}
.g-soon i { color: var(--gold); font-style: normal; }
.g-soon em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted); background: var(--soft); padding: 4px 9px; border-radius: 999px; }

/* ── CTA band ───────────────────────────────────────────────────────── */
.g-cta {
  width: min(1180px, calc(100vw - 28px)); margin: 32px auto 0;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(135deg, #fff3f1, #fff8ee); border: 1px solid var(--line);
  border-radius: 24px; padding: clamp(22px, 3vw, 32px);
}
.g-cta h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 8px; font-weight: 700; }
.g-cta p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; max-width: 60ch; }
.g-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────────────────────────────── */
.g-footer {
  width: min(1180px, calc(100vw - 28px)); margin: 28px auto 40px;
  border-top: 1px solid var(--line); padding-top: 22px; text-align: center; color: var(--muted);
}
.g-foot-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--red); }
.g-foot-brand b { color: var(--ink); font-size: 16px; letter-spacing: .04em; }
.g-foot-brand b i { color: var(--red); }
.g-foot-tag { font-size: 14px; line-height: 1.6; max-width: 52ch; margin: 12px auto 16px; }
.g-foot-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; font-weight: 700; }
.g-foot-row a { color: #4a423b; }
.g-foot-row a:hover { color: var(--red); }
.g-foot-fine { display: block; margin-top: 16px; font-size: 12px; }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .g-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-detail { grid-template-columns: 1fr 1fr; }
  .g-related { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .g-nav { display: none; }
  .g-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-hero { grid-template-columns: 1fr; }
  .g-hero-img { order: -1; }
  .g-masthead { flex-direction: column; }
  .g-mast-stats { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 14px; text-align: left; width: 100%; }
}
@media (max-width: 560px) {
  .g-grid { grid-template-columns: 1fr; }
  .g-detail { grid-template-columns: 1fr; }
  .g-cat-answers ul { columns: 1; }
  .g-soon-grid { grid-template-columns: 1fr; }
  .g-art-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .g-phone span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .g-card, .g-btn { transition: none; }
}
