:root {
  --violet-950: #1b1035;
  --violet-900: #2a1856;
  --violet-800: #3b2278;
  --violet-700: #5b2fa0;
  --violet-600: #7a3fc0;
  --violet-500: #9955e0;
  --violet-300: #c9a6ef;
  --violet-100: #ede4fb;
  --accent: #f4b942;
  --bg: #f8f5fc;
  --bg-dim: #ece1f6;
  --ink: #1c1230;
  --ink-soft: #625a75;
  --radius: 16px;
  --shadow-sm: 0 4px 14px rgba(43, 20, 77, 0.1);
  --shadow-md: 0 14px 34px rgba(43, 20, 77, 0.18);
  --shadow-lg: 0 24px 60px rgba(30, 12, 60, 0.32);
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}


a { color: inherit; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Ambient background — two soft drifting color blobs behind every page,
   giving the whole site a bit of life even outside the hero. */
.ambient-blobs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.32;
}
.blob-a {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -110px;
  background: radial-gradient(circle, var(--violet-300), transparent 70%);
  animation: blobDriftA 24s ease-in-out infinite alternate;
}
.blob-b {
  width: 380px;
  height: 380px;
  bottom: -140px;
  right: -100px;
  background: radial-gradient(circle, var(--accent), transparent 70%);
  animation: blobDriftB 28s ease-in-out infinite alternate;
}
@keyframes blobDriftA {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(70px, 50px) scale(1.15); }
}
@keyframes blobDriftB {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-60px, -40px) scale(1.1); }
}

/* language toggle */
html[data-lang="vi"] [lang="en"] { display: none; }
html[data-lang="en"] [lang="vi"] { display: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--violet-950);
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: white;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo-mark {
  display: inline-flex;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}
.logo-mark svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 7px rgba(153, 85, 224, 0.55)); }
.logo-accent {
  transform-box: fill-box;
  transform-origin: center;
  animation: logoPulse 2.4s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.lang-toggle {
  background: linear-gradient(135deg, var(--violet-600), var(--violet-500));
  border: none;
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(122, 63, 192, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}
.lang-toggle:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(122, 63, 192, 0.6); }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(201, 166, 239, 0.35), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(244, 185, 66, 0.22), transparent 40%),
    linear-gradient(160deg, var(--violet-950) 0%, var(--violet-900) 35%, var(--violet-800) 70%, var(--violet-700) 100%);
  color: white;
  padding: 76px 0 110px;
  text-align: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.hero-inner { position: relative; }

.hero-kicker {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
  opacity: 0;
  animation: heroFadeUp 0.7s ease 0.05s forwards;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
  color: white;
}
.hero h1 .word { display: inline-block; }
.hero h1 .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px) rotate(6deg);
  animation: charIn 0.45s ease forwards;
}
@keyframes charIn {
  to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

/* The key phrase of the headline (e.g. "khám phá") — solid gold with a
   slowly pulsing glow. Plain color + text-shadow (no background-clip:text)
   so it renders reliably everywhere instead of risking invisible text. */
.title-segment.accent {
  color: var(--accent);
  animation: accentGlow 2.6s ease-in-out infinite;
}
@keyframes accentGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(244, 185, 66, 0.55), 0 2px 20px rgba(0, 0, 0, 0.25); }
  50% { text-shadow: 0 0 22px rgba(244, 185, 66, 0.9), 0 2px 20px rgba(0, 0, 0, 0.25); }
}
.hero p {
  margin: 0 auto;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  opacity: 0;
  animation: heroFadeUp 0.7s ease 0.28s forwards;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 70px;
  display: block;
}

/* Small page banner (category / listing / place pages) */
.page-banner {
  position: relative;
  background: linear-gradient(140deg, var(--violet-900), var(--violet-700));
  color: white;
  padding: 40px 0 56px;
  overflow: hidden;
}
.page-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.page-banner.has-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(27, 16, 53, 0.88), rgba(91, 47, 160, 0.72));
  z-index: 1;
}
.page-banner > .container { position: relative; z-index: 2; }
.page-banner-icon { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.page-banner h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
}
.page-banner p {
  margin: 0;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}

.cat-switch {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cat-switch-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  margin-right: 2px;
}
.cat-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease;
}
.cat-switch-link:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { text-decoration: none; color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }

/* Section headings */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 48px 0 20px;
}
.section-head h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--violet-950);
  margin: 0;
}
.section-head .section-sub {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 4px 0 0;
}
.see-all-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--violet-700);
  text-decoration: none;
  white-space: nowrap;
}
.see-all-link:hover { text-decoration: underline; }

/* Category tile grid (home page) */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 50px;
}
.cat-tile {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.62));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 20px;
  padding: 22px 20px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 10px 30px -10px rgba(43, 20, 77, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  animation: tilePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--tile-i, 0) * 0.08s + 0.1s);
}
@keyframes tilePop {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cat-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 140% at 25% 0%, var(--tile-color, var(--violet-500)) 0%, transparent 62%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.cat-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
  transform: translateX(-140%);
  transition: transform 0.75s ease;
  pointer-events: none;
}
.cat-tile:hover {
  transform: translateY(-7px) scale(1.02);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 18px 40px -12px rgba(43, 20, 77, 0.22),
    0 0 28px -6px var(--tile-color, var(--violet-500));
  border-color: rgba(255, 255, 255, 0.85);
}
.cat-tile:hover::before { opacity: 0.16; }
.cat-tile:hover::after { transform: translateX(140%); }
.cat-tile:hover .cat-icon { transform: scale(1.18) rotate(-8deg); }
.cat-tile .cat-icon {
  position: relative;
  z-index: 1;
  font-size: 1.9rem;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(150deg, var(--tile-bg, var(--violet-100)), rgba(255, 255, 255, 0.3));
  box-shadow: 0 6px 16px -6px var(--tile-color, var(--violet-500)), inset 0 1px 1px rgba(255, 255, 255, 0.7);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cat-tile h3 { position: relative; z-index: 1; margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--violet-950); }
.cat-tile p { position: relative; z-index: 1; margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.cat-tile .cat-count {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tile-color, var(--violet-700));
  margin-top: auto;
}

/* Grid of place cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
  margin-bottom: 50px;
}

.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.5s ease, translate 0.5s ease;
  border: 1px solid rgba(43, 20, 77, 0.06);
  text-decoration: none;
  color: var(--ink);
  opacity: 0;
  translate: 0 16px;
}
.card.in-view { opacity: 1; translate: 0 0; }
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md), 0 0 28px -6px var(--card-color, var(--violet-500));
}
.card:hover .place-icon { transform: scale(1.12) rotate(-3deg); }
.card:hover .card-media::before { transform: translateX(120%); }

.card-media {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  position: relative;
  background: linear-gradient(150deg, var(--card-color-light, var(--violet-300)), var(--card-color, var(--violet-600)));
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(27, 16, 53, 0.28), transparent 55%);
}
.card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.place-icon {
  position: relative;
  z-index: 1;
  display: inline-block;
  transition: transform 0.25s ease;
}

.card-body {
  padding: 17px 19px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.card-title { font-size: 1.08rem; font-weight: 800; margin: 0; color: var(--violet-950); letter-spacing: -0.01em; }
.card-area { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.card-desc {
  font-size: 0.9rem;
  color: var(--ink);
  margin: 3px 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tag {
  font-size: 0.72rem;
  background: var(--tag-bg, var(--violet-100));
  color: var(--tag-color, var(--violet-900));
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
a.tag:hover { filter: brightness(0.95); }

.empty-state { text-align: center; color: var(--ink-soft); padding: 50px 0; font-size: 1.05rem; }

/* Place detail modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 41, 0.6);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.modal-card {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 0 0 26px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: scale(0.94) translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-card { opacity: 1; transform: scale(1) translateY(0); }
.modal-media {
  height: 130px;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(150deg, var(--card-color-light, var(--violet-300)), var(--card-color, var(--violet-600)));
  overflow: hidden;
}
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.modal-content { padding: 22px 26px 0; }
.modal-content h2 { margin: 0 0 4px; color: var(--violet-950); font-size: 1.3rem; }
.modal-area { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 12px; font-weight: 600; }
.modal-desc { margin: 0 0 16px; font-size: 1rem; }

.map-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(43, 20, 77, 0.08);
  margin-bottom: 14px;
}
.map-wrap iframe { width: 100%; height: 280px; border: 0; display: block; }
.map-actions { margin-bottom: 4px; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--violet-500);
  color: var(--violet-700);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn-outline:hover { background: var(--violet-100); }

/* Footer */
.site-footer {
  background: var(--violet-950);
  color: rgba(255, 255, 255, 0.78);
  padding: 28px 0;
  font-size: 0.85rem;
  text-align: center;
}
.footer-credit { margin-top: 8px; opacity: 0.6; }

@media (max-width: 640px) {
  .hero { padding: 56px 0 90px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-kicker, .hero p { animation: heroFadeUp 0.01s linear forwards; opacity: 1; }
  .hero h1 .char { opacity: 1; animation: none; transform: none; }
  .title-segment.accent { color: var(--accent); animation: none; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25); }
  .card { transition: none; opacity: 1; translate: 0 0; }
  .cat-tile { animation: none; opacity: 1; transform: none; transition: none; }
  .card:hover, .cat-tile:hover { transform: none; }
  .cat-tile:hover .cat-icon { transform: none; }
  .cat-tile::before, .cat-tile::after { transition: none; }
  .cat-tile:hover::before { opacity: 0; }
  .cat-tile:hover::after { transform: translateX(-140%); }
  .card:hover .place-icon { transform: none; }
  .card-media::before { transition: none; transform: translateX(-120%); }
  .lang-toggle { transition: none; }
  .hero-canvas { display: none; }
  .blob { animation: none; }
  .logo-accent { animation: none; }
}
