/* =========================================================
   DI TÍCH LỊCH SỬ – PHƯỜNG VẠN XUÂN
   Theme config (design tokens) + Bootstrap 5.3 overrides
   Mọi màu / font / khoảng cách lấy từ biến bên dưới – sửa 1 chỗ dùng toàn site.
   ========================================================= */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Crimson (đỏ son) */
  --vx-crimson-950: #3a0508;
  --vx-crimson-900: #4a080d;
  --vx-crimson-850: #52090e;
  --vx-crimson-800: #5c0e13;
  --vx-crimson-700: #6b1219;
  --vx-crimson-650: #6c090e;
  --vx-crimson-600: #7d141d;
  --vx-crimson-500: #821922;
  --vx-crimson-400: #991b1b;

  /* Gold (nhũ vàng) */
  --vx-gold-50: #fff2c6;
  --vx-gold-100: #fae6b8;
  --vx-gold-150: #fde68a;
  --vx-gold-200: #efd7a3;
  --vx-gold-300: #f5d38a;
  --vx-gold-350: #ecd07a;
  --vx-gold-400: #e4c583;
  --vx-gold-450: #e2ba6f;
  --vx-gold-500: #e7b16a;
  --vx-gold-600: #cba85a;
  --vx-gold-700: #b89139;
  --vx-gold-800: #a16207;
  --vx-gold-line: rgba(251, 191, 36, 0.8);
  --vx-gold-border: rgba(230, 202, 123, 0.5);

  /* Neutral / paper */
  --vx-paper: #f9f6f0;
  --vx-paper-light: #fdfbf7;
  --vx-cream-100: #fef3c7;
  --vx-cream-200: #e7d4b5;
  --vx-stone-900: #1c1917;
  --vx-stone-700: #44403c;
  --vx-stone-600: #57534e;
  --vx-stone-500: #78716c;
  --vx-stone-400: #a8a29e;
  --vx-stone-300: #d6d3d1;
  --vx-stone-200: #e7e5e4;
  --vx-stone-100: #f5f5f4;
  --vx-white: #ffffff;

  /* Map distance legend */
  --vx-dist-1: #dc2626; /* < 250 m */
  --vx-dist-2: #d97706; /* 250–750 m */
  --vx-dist-3: #0d9488; /* 750 m–1,5 km */
  --vx-dist-4: #1d4ed8; /* > 1,5 km */
  --vx-dist-far: #2563eb; /* cặp xa nhất */
  --vx-marker-cover: #f59e0b;

  /* Typography */
  /* Font toàn site (theo thiết kế Figma): tiêu đề Playfair Display, nội dung Be Vietnam Pro */
  --vx-font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
  --vx-font-body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --vx-fs-display: clamp(2rem, 1.2rem + 3.2vw, 3.5rem);
  --vx-fs-h2: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);
  --vx-fs-h3: 1.125rem;
  --vx-fs-eyebrow: 0.8125rem;

  /* Radius / shadow / spacing */
  --vx-radius-sm: 4px;
  --vx-radius: 8px;
  --vx-radius-lg: 12px;
  --vx-radius-xl: 16px;
  --vx-shadow-sm: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
  --vx-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
  --vx-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, .15), 0 8px 10px -6px rgba(0, 0, 0, .1);
  --vx-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, .35);
  --vx-section-py: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem);
  --vx-header-h: 72px;
  --vx-container: 1240px;      /* 1 container chung toàn site (header, section, footer, trang chi tiết) */
  --vx-container-narrow: 1240px;
  --vx-gutter: 20px;

  /* Gradients */
  --vx-gradient-gold-text: linear-gradient(180deg, var(--vx-gold-50) 0%, var(--vx-gold-350) 50%, var(--vx-gold-700) 100%);
  --vx-gradient-card: linear-gradient(180deg, var(--vx-crimson-700) 0%, #420609 100%);

  /* Background images (ảnh nền section) */
  /* Dải đỏ theo thiết kế: tối hai bên – sáng ở giữa */
  --vx-red-band: linear-gradient(90deg, #5f1016 0%, #71181c 50%, #5f1016 100%);
  --vx-bg-red: var(--vx-red-band);
  --vx-bg-red-dark: linear-gradient(90deg, #4a0c10 0%, #63141a 50%, #4a0c10 100%);
  --vx-bg-cream: none;
  /* Hoạ tiết trang trí (assets/img) */
  --vx-orn-drum: url("../img/hoavan_left.webp");   /* mây cổ & hoa văn góc trái (lễ hội) */
  --vx-orn-drum-r: url("../img/hoavan_right.webp");    /* trống đồng + mây, mép phải (lễ hội) */
  --vx-orn-gold-left: url("../img/hoavangold_left.webp");   /* trống đồng + mây vàng góc trái (di tích) */
  --vx-orn-gold-right: url("../img/hoavangold_right.webp"); /* mây vàng góc phải (di tích) */
  --vx-orn-wave-red: url("../img/song_bottom.webp");   /* sóng đỏ */
  --vx-orn-wave-cream: url("../img/song_svg.svg");     /* sóng kem */
  --vx-bg-footer: none; /* hoa sen chân trang dùng 2 ảnh góc .vx-lotus-corner */
  --vx-hero-img: url("../img/hero/chua_doi_cao.png");

  /* ---------- 2. BOOTSTRAP VARIABLE MAPPING ---------- */
  --bs-body-font-family: var(--vx-font-body);
  --bs-body-color: var(--vx-stone-700);
  --bs-body-bg: var(--vx-paper-light);
  --bs-primary: var(--vx-crimson-800);
  --bs-primary-rgb: 92, 14, 19;
  --bs-secondary: var(--vx-gold-200);
  --bs-secondary-rgb: 239, 215, 163;
  --bs-link-color: var(--vx-crimson-700);
  --bs-link-color-rgb: 107, 18, 25;
  --bs-link-hover-color: var(--vx-crimson-400);
  --bs-link-hover-color-rgb: 153, 27, 27;
  --bs-border-color: var(--vx-stone-200);
  --bs-border-radius: var(--vx-radius);
  --bs-border-radius-lg: var(--vx-radius-lg);
  --bs-border-radius-xl: var(--vx-radius-xl);
  --bs-focus-ring-color: rgba(228, 197, 131, .45);
}

/* ---------- 3. BASE ---------- */
html {
  /* Bù header sticky khi cuộn đến anchor: tránh nội dung bị header che */
  scroll-padding-top: var(--vx-header-h);
  background-color: var(--vx-paper-light, #fcfaf7) !important;
}
body {
  font-family: var(--vx-font-body);
  background: var(--vx-paper-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  transition: opacity 0.16s ease-out;
}
html.is-page-exiting body {
  opacity: 0.15;
}
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--vx-font-heading);
  text-wrap: balance;
}
.container-vx, .container-vx-narrow {
  max-width: calc(var(--vx-container) + 2 * var(--vx-gutter));
  padding-left: var(--vx-gutter); padding-right: var(--vx-gutter);
}
.text-gold { color: var(--vx-gold-300) !important; }
.text-crimson { color: var(--vx-crimson-800) !important; }
img { max-width: 100%; }

/* ---------- 4. BUTTONS (dùng biến --bs-btn-* của Bootstrap) ---------- */
.btn-vx-gold {
  --bs-btn-font-family: var(--vx-font-body);
  --bs-btn-font-weight: 600;
  --bs-btn-font-size: 1.125rem;
  --bs-btn-color: var(--vx-crimson-850);
  --bs-btn-bg: var(--vx-gold-200);
  --bs-btn-border-color: var(--vx-gold-400);
  --bs-btn-hover-color: var(--vx-crimson-850);
  --bs-btn-hover-bg: var(--vx-gold-300);
  --bs-btn-hover-border-color: var(--vx-gold-500);
  --bs-btn-active-color: var(--vx-crimson-850);
  --bs-btn-active-bg: var(--vx-gold-400);
  --bs-btn-active-border-color: var(--vx-gold-500);
  --bs-btn-padding-x: 1.75rem;
  --bs-btn-padding-y: .8rem;
  --bs-btn-border-radius: var(--vx-radius);
  box-shadow: var(--vx-shadow);
  display: inline-flex; align-items: center; gap: .6rem;
}
.btn-vx-outline {
  --bs-btn-font-weight: 600;
  --bs-btn-font-size: .75rem;
  --bs-btn-color: var(--vx-gold-150);
  --bs-btn-bg: rgba(0, 0, 0, .25);
  --bs-btn-border-color: rgba(252, 211, 77, .4);
  --bs-btn-hover-color: var(--vx-crimson-850);
  --bs-btn-hover-bg: var(--vx-gold-200);
  --bs-btn-hover-border-color: var(--vx-gold-200);
  --bs-btn-active-bg: var(--vx-gold-400);
  --bs-btn-padding-y: .7rem;
  --bs-btn-border-radius: var(--vx-radius-sm);
  letter-spacing: .05em; text-transform: uppercase;
}
.btn-vx-circle {
  width: var(--vx-circle-size, 40px); height: var(--vx-circle-size, 40px);
  border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--vx-stone-300); background: var(--vx-white); color: var(--vx-stone-700);
  box-shadow: var(--vx-shadow-sm); transition: all .2s ease;
}
.btn-vx-circle:hover { transform: translateY(-1px); box-shadow: var(--vx-shadow); }
.btn-vx-circle--gold { background: var(--vx-gold-200); border-color: var(--vx-gold-200); color: var(--vx-crimson-850); }
.btn-vx-circle:disabled { opacity: .45; transform: none; }

/* ---------- 5. HEADER ---------- */
.vx-header {
  position: sticky; top: 0; z-index: 1030;
  min-height: var(--vx-header-h);
  background: var(--vx-crimson-800) var(--vx-red-band);
  border-bottom: 1px solid rgba(228, 197, 131, .18);
}
.vx-header .navbar { --bs-navbar-padding-y: 0; min-height: var(--vx-header-h); }
.vx-brand { line-height: 1.2; text-decoration: none; display: inline-flex; align-items: center; gap: .85rem; }
.vx-brand__logo { width: 44px; height: auto; flex: 0 0 auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
.vx-brand__text { display: block; }
.vx-brand__title {
  display: block; font-family: var(--vx-font-heading); font-weight: 700;
  font-size: clamp(1rem, .9rem + .4vw, 1.25rem); letter-spacing: .02em; text-transform: uppercase;
  color: var(--vx-gold-500);
}
.vx-brand__sub { display: block; font-family: var(--vx-font-body); font-size: clamp(.8rem, .76rem + .2vw, .92rem); color: var(--vx-cream-100); }
.vx-header .nav-link {
  --bs-nav-link-color: var(--vx-white);
  --bs-nav-link-hover-color: var(--vx-gold-300);
  --bs-navbar-active-color: var(--vx-gold-300);
  font-size: .95rem; font-weight: 500; position: relative;
  padding: .5rem 0 !important; margin: 0 1.25rem;
}
.vx-header .nav-link.active { color: var(--vx-gold-300); }
.vx-header .nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--vx-gold-300); border-radius: 2px;
}
.vx-header .navbar-toggler {
  border: 0;
  border-radius: 0;
  padding: 4px 6px;
  background: transparent;
  color: var(--vx-gold-300);
  box-shadow: none !important;
}
.vx-header .navbar-toggler:focus,
.vx-header .navbar-toggler:active {
  outline: none;
  box-shadow: none !important;
}
.vx-header .navbar-toggler-icon {
  width: 22px;
  height: 22px;
}

/* Header trong suốt khi mới vào Trang Chủ hoặc Trang Chi Tiết Di Tích */
body[data-route="home"] .vx-header,
body.is-detail-view .vx-header,
html.is-detail-view body .vx-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: transparent;
  background-image: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
body[data-route="home"] .vx-header::before,
body.is-detail-view .vx-header::before,
html.is-detail-view body .vx-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 3, 5, 0.72) 0%, rgba(20, 3, 5, 0.28) 60%, transparent 100%);
  transition: opacity 0.35s ease;
}
body[data-route="home"] .vx-header.is-scrolled,
body.is-detail-view .vx-header.is-scrolled,
html.is-detail-view body .vx-header.is-scrolled {
  background: var(--vx-crimson-800) var(--vx-red-band);
  border-bottom: 1px solid rgba(228, 197, 131, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body[data-route="home"] .vx-header.is-scrolled::before,
body.is-detail-view .vx-header.is-scrolled::before,
html.is-detail-view body .vx-header.is-scrolled::before {
  opacity: 0;
}

/* ---------- 6. HERO: Chuẩn tỷ lệ Panoramic 21:9 nguyên bản của ảnh di tích ---------- */
.vx-hero {
  position: relative;
  width: 100%;
  height: min(82vh, calc(100vw * 822 / 1914));
  max-height: 82vh;
  min-height: 380px;
  background: #1e0306;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Khung hiển thị trung tâm */
.vx-hero__frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Lớp phủ chuyển sắc bảo vệ tương phản chữ và nút bấm */
.vx-hero__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(25, 4, 7, 0.35) 0%,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.12) 60%,
    rgba(25, 4, 7, 0.75) 100%
  );
}

/* Slide ảnh nền Swiper */
.vx-hero__swiper {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.vx-hero__slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(90deg, #480c10 0%, #68151b 50%, #480c10 100%);
  background-size: 200% 100%;
  animation: vx-shimmer 1.8s ease-in-out infinite;
}

.vx-hero__slide:has(img.is-loaded) {
  animation: none;
  background: #140204;
}

.vx-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.vx-hero__slide img.is-loaded {
  opacity: 1;
}

/* Cụm hành động (Nút Khám phá Bản đồ số) */
.vx-hero__actions {
  position: absolute;
  z-index: 2;
  inset: auto 0 0 0;
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
  pointer-events: none;
}

.vx-hero__actions .btn-vx-gold {
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Nhãn địa danh góc phải (Location Badge) */
.vx-hero__caption {
  position: absolute;
  z-index: 2;
  right: clamp(16px, 3.5vw, 40px);
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font: 500 0.85rem/1.2 var(--vx-font-body);
  color: var(--vx-white);
  text-decoration: none;
  background: rgba(30, 10, 15, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  transition: all 0.25s ease;
}

.vx-hero__caption .bi {
  color: var(--vx-gold-300);
}

.vx-hero__caption:hover {
  color: var(--vx-gold-200);
  background: rgba(45, 15, 22, 0.85);
  transform: translateY(-2px);
}

/* Dấu chấm chuyển trang Swiper */
.vx-hero__dots.swiper-pagination {
  bottom: 12px;
  z-index: 3;
}

.vx-hero__dots .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  opacity: 1;
  transition: width 0.3s;
}

.vx-hero__dots .swiper-pagination-bullet-active {
  width: 24px;
  border-radius: 4px;
  background: var(--vx-gold-300);
}
.vx-search {
  display: flex; align-items: center; gap: .65rem;
  min-height: 56px; padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: var(--vx-radius);
  background: rgba(40, 20, 10, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--vx-white); width: min(100%, 430px);
}
.vx-search .form-control {
  background: transparent; border: 0; color: var(--vx-white); padding: 0; font-size: 1rem; box-shadow: none;
}
.vx-search .form-control::placeholder { color: rgba(255, 255, 255, .85); }
.vx-search:focus-within { border-color: var(--vx-gold-400); }
.vx-search--header {
  position: relative;
  width: 220px; max-width: 100%; min-height: 36px; flex-shrink: 0;
  gap: .5rem; padding: 0 .75rem; border-radius: 999px;
  transition: width 0.25s ease, border-color 0.25s ease;
}
.vx-search--header:focus-within {
  width: 270px;
  border-color: var(--vx-gold-400);
}
.vx-search--header .form-control { min-width: 0; font-size: .8rem; }
.vx-search--header button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0; width: 24px; height: 32px; flex-shrink: 0;
  border: 0; background: transparent; color: var(--vx-gold-300);
}
.vx-search--header button:focus-visible { outline: 2px solid currentColor; border-radius: 4px; }

/* Dropdown gợi ý tìm kiếm tức thì */
.vx-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-width: min(90vw, 360px);
  max-height: 380px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(205, 168, 81, 0.35);
  padding: 6px;
  z-index: 1060;
  text-align: left;
}
.vx-search-dropdown[hidden] {
  display: none !important;
}
.vx-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #1c1917;
  transition: background 150ms ease;
  cursor: pointer;
}
.vx-search-item:hover,
.vx-search-item.is-selected {
  background: #f7f3ec;
  color: #8d4e2a;
}
.vx-search-item__thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #eee;
}
.vx-search-item__icon {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: rgba(154, 91, 46, 0.12);
  color: #8d4e2a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.vx-search-item__info {
  min-width: 0;
  flex: 1;
}
.vx-search-item__name {
  font-family: var(--vx-font-body);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #1c1917;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vx-search-item:hover .vx-search-item__name,
.vx-search-item.is-selected .vx-search-item__name {
  color: #8d4e2a;
}
.vx-search-item__sub {
  font-size: 11px;
  color: #78716c;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vx-search-dropdown__empty {
  padding: 14px 12px;
  font-size: 12.5px;
  color: #78716c;
  text-align: center;
  margin: 0;
}
.vx-search-dropdown__header {
  padding: 6px 10px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c59b27;
  border-bottom: 1px solid #f0ebe1;
  margin-bottom: 4px;
}

/* ---------- 7. SECTIONS ---------- */
.vx-section { position: relative; padding: var(--vx-section-py) 0; background-repeat: no-repeat; background-size: cover; background-position: center; }
.vx-section--red-dark { background-color: var(--vx-crimson-850); background-image: var(--vx-bg-red-dark); }
.vx-section--red { background-color: var(--vx-crimson-600); background-image: var(--vx-bg-red); }
.vx-section--cream { background-color: var(--vx-paper); background-image: var(--vx-bg-cream); }
.vx-section > .container { position: relative; z-index: 1; }

/* Hoạ tiết trống đồng + mây ở 2 góc section đỏ */
.vx-section--orn { overflow: hidden; }
.vx-section--orn::before, .vx-section--orn::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none; opacity: .18;
  background-repeat: no-repeat; background-size: contain;
}
.vx-section--orn::before { top: 0; left: 0; width: clamp(140px, 16vw, 240px); aspect-ratio: 374 / 446; background-image: var(--vx-orn-drum); }
.vx-section--orn::after { bottom: 0; right: 0; width: clamp(180px, 24vw, 360px); aspect-ratio: 548 / 436; background-image: var(--vx-orn-drum-r); }

/* Section Lễ hội: Giữ nguyên 100% màu nền đỏ gấm gốc đồng bộ với Footer, chỉ thêm hoạ tiết Trống đồng & Mây cổ */
#le-hoi.vx-section--orn::before {
  top: 50%;
  left: 0;
  bottom: auto;
  transform: translateY(-50%);
  width: clamp(240px, 28vw, 420px);
  aspect-ratio: 374 / 446;
  background-image: url("../img/hoavan_left.webp");
  background-position: left center;
  background-size: contain;
  opacity: 0.88;
}
#le-hoi.vx-section--orn::after {
  top: auto;
  bottom: 0;
  right: 0;
  width: clamp(340px, 40vw, 580px);
  aspect-ratio: 548 / 436;
  background-image: url("../img/hoavan_right.webp");
  background-position: right bottom;
  background-size: contain;
  opacity: 0.95;
}

/* Section Khám phá di tích: Hoa văn vàng kim chuyên biệt trên nền kem giấy dó */
#di-tich.vx-section--orn::before {
  top: auto;
  bottom: 0;
  left: 0;
  right: auto;
  width: clamp(340px, 38vw, 560px);
  aspect-ratio: 524 / 456;
  background-image: url("../img/hoavangold_left.webp");
  background-position: left bottom;
  background-size: contain;
  opacity: 0.95;
}
#di-tich.vx-section--orn::after {
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  width: clamp(260px, 30vw, 440px);
  aspect-ratio: 424 / 434;
  background-image: url("../img/hoavangold_right.webp");
  background-position: right center;
  background-size: contain;
  opacity: 0.95;
}
/* (Thiết kế: các section nối thẳng, sóng đỏ chỉ dùng ở footer) */

/* Section heading */
.vx-head { text-align: center; margin-bottom: clamp(1.25rem, 1rem + 1.5vw, 2.25rem); }
.vx-eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--vx-font-body); font-weight: 600; font-size: var(--vx-fs-eyebrow);
  letter-spacing: .1em; text-transform: uppercase; color: var(--vx-gold-800); margin-bottom: .35rem;
}
.vx-eyebrow::before, .vx-eyebrow::after { content: ""; width: 42px; height: 1.5px; background: var(--vx-gold-600); }
.vx-title { font-weight: 700; font-size: var(--vx-fs-h2); color: var(--vx-crimson-800); margin: 0 0 .5rem; line-height: 1.15; }
.vx-title--lined { display: inline-flex; align-items: center; gap: clamp(.75rem, 2vw, 1.75rem); font-size: var(--vx-fs-display); }
.vx-title--lined::before, .vx-title--lined::after { content: ""; flex: 0 0 clamp(28px, 4vw, 48px); height: 2px; background: var(--vx-gold-line); }
.vx-text-gradient {
  background: var(--vx-gradient-gold-text); -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.vx-lead { font-size: 1rem; color: var(--vx-stone-600); margin: 0 auto; max-width: 672px; }
.vx-head--dark .vx-eyebrow { color: var(--vx-gold-450); }
.vx-head--dark .vx-title { color: var(--vx-gold-50); text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.vx-head--dark .vx-lead { color: rgba(254, 243, 199, .9); }
.vx-head--serif-lead .vx-lead { font-family: var(--vx-font-body); }

/* ---------- 8. MAP ---------- */
.vx-map-frame {
  position: relative; border-radius: var(--vx-radius-xl); overflow: hidden;
  border: 4px solid #efe3c6; box-shadow: var(--vx-shadow-xl);
  background: #f2ece0;
}
.vx-map-embed { display: block; width: 100%; height: clamp(360px, 40vw, 520px); border: 0; background: #f6efe1; }
.vx-map-open {
  position: absolute; z-index: 2; left: 16px; bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--vx-radius);
  font: 600 .85rem/1 var(--vx-font-body); color: var(--vx-white); text-decoration: none;
  background: var(--vx-crimson-800); box-shadow: var(--vx-shadow);
}
.vx-map-open:hover { background: var(--vx-crimson-400); color: var(--vx-white); }

/* ---------- 9. DISCOVER CAROUSEL (Swiper) ---------- */
.vx-carousel { position: relative; }
.vx-carousel__swiper { padding: 8px 0 1.5rem; overflow: hidden; }
/* Thẻ so le: thẻ chẵn thụt xuống */
.vx-carousel__item { height: auto; padding: 0 8px 2.5rem; }
.vx-carousel__item:nth-child(even) { padding-top: 2.5rem; padding-bottom: 0; }
/* Fallback khi không tải được Swiper: cuộn ngang */
.vx-carousel__swiper.is-fallback .swiper-wrapper { display: flex; gap: 2rem; overflow-x: auto; scroll-snap-type: x mandatory; }
.vx-carousel__swiper.is-fallback .swiper-slide { flex: 0 0 min(80%, 280px); scroll-snap-align: start; }
.vx-carousel__nav {

  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 0.85rem;

  margin-top: 0.5rem;

}

.vx-carousel__all-link {
  display: inline-block;
  font-family: var(--vx-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--vx-crimson-800);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(92, 14, 19, 0.4);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  padding: 0 0.5rem;
  line-height: 1.3;
}
.vx-carousel__all-link:hover {
  color: var(--vx-crimson-500);
  text-decoration-color: var(--vx-crimson-500);
}

.vx-card {
  position: relative; display: block; aspect-ratio: 3 / 4;
  border-radius: var(--vx-radius-sm); overflow: hidden; box-shadow: var(--vx-shadow);
  text-decoration: none; color: inherit; background: var(--vx-crimson-800);
  outline: 8px solid transparent; transition: box-shadow .3s ease, outline-color .3s ease;
}
.vx-card__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .35s ease, transform .6s ease;
}
.vx-card__img.is-loaded { opacity: 1; }
.vx-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .2) 30%, rgba(0, 0, 0, 0) 55%); }
.vx-card__title {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; margin: 0;
  padding: .85rem 1rem; background: rgba(0, 0, 0, .4);
  font-family: var(--vx-font-heading); font-weight: 700; font-size: var(--vx-fs-h3); letter-spacing: .025em;
  color: var(--vx-white); text-align: center; transition: opacity .3s ease;
}
/* Khung thông tin gấm đỏ – chỉ hiện khi hover/focus (luôn hiện với .is-open: di tích chưa có ảnh) */
.vx-card__info {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: center;
  padding: 1.25rem 1.1rem; color: var(--vx-white);
  background: linear-gradient(180deg, rgba(107, 18, 25, .93), rgba(66, 6, 9, .96));
  opacity: 0; transform: translateY(12px); transition: opacity .35s ease, transform .35s ease;
}
.vx-card__info::before { content: ""; position: absolute; left: 0; top: 0; width: 60%; aspect-ratio: 176 / 244; background: var(--vx-orn-drum) left top / contain no-repeat; opacity: .14; pointer-events: none; }
.vx-card__info > * { position: relative; }
.vx-card__icon { width: 52px; height: auto; color: var(--vx-gold-400); margin-bottom: .9rem; }
.vx-card__info-title { font-size: clamp(1.05rem, .95rem + .35vw, 1.3rem); font-weight: 700; color: var(--vx-white); margin-bottom: .9rem; line-height: 1.3; }
.vx-card__info-desc { font-size: .8rem; line-height: 1.55; color: rgba(254, 243, 199, .9); margin-bottom: 1.2rem; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.vx-card__info .btn { align-self: flex-start; min-width: 72%; }

.vx-card:hover, .vx-card:focus-visible, .vx-card.is-open { outline-color: rgba(255, 255, 255, .6); box-shadow: 0 2px 10px rgba(92, 14, 19, .12), var(--vx-shadow-lg); }
.vx-card:hover .vx-card__info, .vx-card:focus-visible .vx-card__info, .vx-card.is-open .vx-card__info { opacity: 1; transform: none; }
.vx-card:hover .vx-card__title, .vx-card:focus-visible .vx-card__title, .vx-card.is-open .vx-card__title { opacity: 0; }
.vx-card:hover .vx-card__img { transform: scale(1.06); }

/* ---------- 10. FESTIVAL CARDS ---------- */
.vx-fest {
  position: relative; display: block; aspect-ratio: 383 / 247; overflow: hidden; text-decoration: none;
  padding: 5px; border-radius: 3px;
  background: linear-gradient(135deg, var(--vx-gold-400), var(--vx-gold-700) 50%, var(--vx-gold-400));
  box-shadow: var(--vx-shadow-lg);
}
.vx-fest__inner { position: relative; height: 100%; overflow: hidden; border: 1.5px solid rgba(255, 242, 198, .85); border-radius: 1px; }
.vx-fest__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .35s ease, transform .5s ease;
}
.vx-fest__img.is-loaded { opacity: 1; }
.vx-fest:hover .vx-fest__img { transform: scale(1.05); }
.vx-fest__inner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(0deg, rgba(0, 0, 0, .8), rgba(0, 0, 0, 0)); }
.vx-fest__bar {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem 1rem .9rem 1.25rem;
}
.vx-fest__title { margin: 0; font-family: var(--vx-font-heading); font-weight: 700; font-size: clamp(1.05rem, .95rem + .45vw, 1.35rem); color: var(--vx-white); letter-spacing: .02em; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.vx-fest .btn-vx-circle { --vx-circle-size: 38px; flex: 0 0 auto; border-color: var(--vx-gold-200); }

.vx-fest__slide {
  height: auto;
  padding: 8px 0 1rem;
}

/* Link và nút điều hướng trên nền đỏ gấm của section Lễ hội */
.vx-section--red .vx-carousel__all-link {
  color: var(--vx-gold-200);
  text-decoration-color: rgba(228, 197, 131, 0.5);
}
.vx-section--red .vx-carousel__all-link:hover {
  color: #ffffff;
  text-decoration-color: #ffffff;
}

/* ---------- 11. FOOTER (nền hoa sen bám đáy) ---------- */
.vx-footer {
  position: relative; color: var(--vx-stone-300);
  /* màu nền phía trên trùng tông ảnh -> ảnh luôn neo ở đáy, hoa sen 2 góc luôn hiển thị trên mọi màn */
  background: var(--vx-orn-wave-red) center bottom / 100% auto no-repeat, var(--vx-red-band);
  background-color: #5d070c;
  min-height: 0;
  border-top: 1px solid rgba(228, 197, 131, .25);
  padding: clamp(2.5rem, 2rem + 2vw, 3.5rem) 0 1.25rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.vx-footer > .container { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
@media (min-width: 992px) { .vx-footer__cols { padding-left: clamp(0px, 14vw, 190px); padding-right: clamp(0px, 14vw, 190px); } }
.vx-footer__cols > [class*="col"] + [class*="col"] { border-left: 1px solid rgba(228, 197, 131, .35); }
.vx-footer h4 { font-weight: 700; font-size: 1rem; letter-spacing: .05em; text-transform: uppercase; color: var(--vx-gold-500); margin-bottom: .65rem; }
.vx-footer__brand h4 { font-size: 1.25rem; }
.vx-footer__brand p { font-family: var(--vx-font-body); color: var(--vx-gold-400); font-size: .9rem; }
.vx-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .875rem; }
.vx-footer ul strong { color: var(--vx-white); font-weight: 500; }
.vx-footer a { color: var(--vx-stone-300); text-decoration: none; }
.vx-footer a:hover { color: var(--vx-gold-300); }
.vx-footer__copy { font-family: var(--vx-font-body); text-align: center; font-size: .875rem; letter-spacing: .02em; color: rgba(255, 255, 255, .9); margin-top: clamp(2rem, 4vw, 3.5rem); }

/* ---------- 12. RESPONSIVE ---------- */
@media (max-width: 1199.98px) {
  .vx-header .nav-link { margin: 0 .85rem; }
}
@media (max-width: 991.98px) {
  :root { --vx-header-h: 64px; }
  .vx-header {
    min-height: var(--vx-header-h);
  }
  .vx-brand__logo { width: 38px; }

  /* Offcanvas Drawer Navigation trên Mobile */
  .vx-header .offcanvas {
    background: #4a080d linear-gradient(180deg, #5c0e13 0%, #3a0508 100%);
    border-left: 1px solid rgba(228, 197, 131, 0.25);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
    max-width: 320px;
    width: 82vw;
  }
  .vx-header .offcanvas-header {
    border-bottom: 1px solid rgba(228, 197, 131, 0.18);
    padding: 1rem 1.25rem;
  }
  .vx-header .offcanvas-body {
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }
  .vx-header .navbar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
  }
  .vx-header .nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.65rem 1rem !important;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .vx-header .nav-link:hover,
  .vx-header .nav-link.active {
    background: rgba(231, 177, 106, 0.16);
    color: var(--vx-gold-300);
  }
  .vx-header .nav-link.active::after {
    display: none;
  }
  .vx-header .vx-search--header {
    width: 100% !important;
    min-height: 44px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(228, 197, 131, 0.45);
    padding: 0 1rem;
    margin: 0 !important;
  }
  .vx-header .vx-search--header:focus-within {
    border-color: var(--vx-gold-400);
    box-shadow: 0 0 0 3px rgba(231, 177, 106, 0.25);
  }
  .vx-header .vx-search--header .form-control {
    font-size: 0.95rem;
  }
}
@media (max-width: 767.98px) {
  .vx-carousel__item { padding-bottom: 1.5rem; }
  .vx-carousel__item:nth-child(even) { padding-top: 1.5rem; }
  .vx-section--orn::before, .vx-section--orn::after { opacity: .14; }
  #le-hoi.vx-section--orn::before {
    width: clamp(140px, 35vw, 220px);
    opacity: 0.6;
  }
  #le-hoi.vx-section--orn::after {
    width: clamp(220px, 58vw, 340px);
    opacity: 0.7;
    right: -10px;
    bottom: -8px;
  }
  #di-tich.vx-section--orn::before {
    width: clamp(220px, 58vw, 340px);
    opacity: 0.85;
    left: -10px;
    bottom: -8px;
  }
  #di-tich.vx-section--orn::after {
    width: clamp(140px, 35vw, 220px);
    opacity: 0.80;
    right: -8px;
  }
  .vx-footer__cols > [class*="col"] + [class*="col"] { border-left: 0; border-top: 1px solid rgba(228, 197, 131, .3); padding-top: 1.25rem; }
  /* Footer mobile: tách 2 nửa ảnh để cụm hoa sen 2 góc luôn đủ lớn & không bị cắt */
  .vx-footer { padding-bottom: 8rem; }

  .vx-footer > .container { position: relative; z-index: 1; }
  .vx-hero { height: clamp(340px, 75vw, 440px); min-height: 0; max-height: none; }
  .vx-hero__frame { width: 100%; height: 100%; }
  .vx-hero__slide img { object-fit: cover; object-position: center 30%; }
  .vx-hero__actions .btn-vx-gold { width: 100%; justify-content: center; }
  .vx-hero__caption { display: none; }
  .vx-search { width: 100%; }
}
@media (max-width: 575.98px) {
  .vx-title--lined::before, .vx-title--lined::after { flex-basis: 20px; }
  .vx-carousel__nav {
    justify-content: center;
    width: 100%;
    gap: 0.5rem;
  }
  .vx-carousel__all-link {
    font-size: 0.875rem;
    padding: 0 0.25rem;
  }
}

/* Hoa sen 2 góc chân trang */
.vx-lotus-corner {
  position: absolute; bottom: 0; z-index: 0;
  width: clamp(120px, 15vw, 220px);
  pointer-events: none;
}
.vx-lotus-left { left: 0; }
.vx-lotus-right { right: 0; }
.vx-footer > .container { position: relative; z-index: 1; }

/* ---------- 15. SKELETON LOADING & IMAGE SHIMMER ---------- */
@keyframes vx-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.vx-skeleton {
  background: linear-gradient(90deg, #e8ddc9 0%, #f6f0e4 50%, #e8ddc9 100%) !important;
  background-size: 200% 100% !important;
  animation: vx-shimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
  color: transparent !important;
  pointer-events: none !important;
  user-select: none !important;
  border-color: rgba(228, 197, 131, 0.3) !important;
}

.vx-skeleton--dark {
  background: linear-gradient(90deg, #440a0e 0%, #63141a 50%, #440a0e 100%) !important;
  background-size: 200% 100% !important;
  animation: vx-shimmer 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite !important;
  color: transparent !important;
  border-color: rgba(92, 14, 19, 0.4) !important;
}

/* Khung ảnh có sẵn nền Shimmer để không bị trống khi ảnh đang tải */
.vx-card,
.vx-fest__inner,
.vx-hero__slide,
.vxd-hero,
.vxd-shot__frame,
.vx-item__thumb {
  background: linear-gradient(90deg, #480c10 0%, #68151b 50%, #480c10 100%);
  background-size: 200% 100%;
  animation: vx-shimmer 1.8s ease-in-out infinite;
}

.vx-section--cream .vx-card {
  background: linear-gradient(90deg, #e4d7c0 0%, #f4ecdf 50%, #e4d7c0 100%);
  background-size: 200% 100%;
  animation: vx-shimmer 1.8s ease-in-out infinite;
}

/* Tắt animation khi ảnh đã nạp xong để tối ưu hiệu năng CPU/GPU */
.vx-card:has(img.is-loaded),
.vx-fest__inner:has(img.is-loaded),
.vx-hero__slide:has(img.is-loaded),
.vxd-hero:has(img.is-loaded),
.vxd-shot__frame:has(img.is-loaded),
.vx-item__thumb:has(img.is-loaded) {
  animation: none;
}

.vxd-hero__img,
.vxd-shot__frame img {
  opacity: 0;
  transition: opacity 0.35s ease-in-out;
}
.vxd-hero__img.is-loaded,
.vxd-shot__frame img.is-loaded {
  opacity: 1;
}

/* Thẻ Skeleton mẫu cho Carousel khi trang vừa load */
.vx-card-skeleton {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: var(--vx-radius-sm);
  overflow: hidden;
  box-shadow: var(--vx-shadow);
}
.vx-fest-skeleton {
  position: relative;
  display: block;
  aspect-ratio: 383 / 247;
  overflow: hidden;
  padding: 5px;
  border-radius: 3px;
  box-shadow: var(--vx-shadow-lg);
}

/* ---------- 16. VIEW TRANSITIONS & TOP NAVIGATION LOADER ---------- */
@view-transition {
  navigation: auto;
}

.vx-header {
  view-transition-name: vx-header;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.vx-nav-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.vx-nav-loader.is-active {
  opacity: 1;
  visibility: visible;
}

.vx-nav-loader__bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--vx-crimson-700, #9e3b2e) 0%, var(--vx-gold-400, #e4c583) 65%, #fff6db 100%);
  box-shadow: 0 0 10px rgba(228, 197, 131, 0.85), 0 0 3px rgba(158, 59, 46, 0.8);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 0.26s cubic-bezier(0.12, 0.82, 0.28, 1);
}

.vx-nav-loader.is-completing .vx-nav-loader__bar {
  transform: scaleX(1) !important;
  transition: transform 0.14s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .vx-skeleton,
  .vx-skeleton--dark,
  .vx-card,
  .vx-fest__inner,
  .vx-hero__slide,
  .vxd-hero,
  .vxd-shot__frame,
  .vx-item__thumb,
  #listView .vx-place-card {
    animation: none !important;
  }
  .vx-nav-loader,
  .vx-preloader__line {
    animation: none !important;
  }
  .vx-nav-loader {
    display: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* ---------- 17. FULL-PAGE BRANDED PRELOADER ---------- */
.vx-preloader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(252, 250, 247, 0.96);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
  pointer-events: auto;
}

.vx-preloader.is-loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.vx-preloader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 90vw;
  padding: 24px;
}

.vx-preloader__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.vx-preloader__logo {
  width: 68px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.14));
  animation: vx-preloader-pulse 1.8s ease-in-out infinite;
}

@keyframes vx-preloader-pulse {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.05); opacity: 1; }
}

.vx-preloader__bar {
  position: relative;
  width: min(200px, 50vw);
  height: 3px;
  background: rgba(92, 14, 19, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.vx-preloader__line {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--vx-crimson-800, #5c0e13) 0%, var(--vx-gold-400, #e4c583) 50%, var(--vx-crimson-800, #5c0e13) 100%);
  border-radius: 999px;
  animation: vx-preloader-slide 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes vx-preloader-slide {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

@media (max-width: 575.98px) {
  .vx-preloader__brand {
    flex-direction: column;
    gap: 12px;
  }
  .vx-preloader__titles {
    text-align: center;
  }
}

