/* ============================================================
   Vietnam Food Companion — styles.css
   Dark, premium, editorial food magazine aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Noto+Serif+Display:ital,wght@0,400;0,700;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  --clr-bg:        #0a0905;
  --clr-bg2:       #100e0a;
  --clr-surface:   #161310;
  --clr-surface2:  #1e1a14;
  --clr-border:    rgba(255,220,100,0.12);
  --clr-border2:   rgba(255,220,100,0.06);
  --clr-gold:      #e8c84a;
  --clr-gold2:     #f5dfa0;
  --clr-red:       #c94a2f;
  --clr-red2:      #e8705a;
  --clr-text:      #f0ead8;
  --clr-muted:     #8a7e68;
  --clr-muted2:    #6a5e4a;
  --clr-hanoi:     #d4824a;
  --clr-sapa:      #4a8a7a;
  --clr-hoian:     #e8b84a;
  --clr-danang:    #5a7ab8;
  --clr-saigon:    #c04a3a;
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     32px;
  --shadow-glow:   0 0 40px rgba(232,200,74,0.08);
  --shadow-card:   0 4px 24px rgba(0,0,0,0.5);
  --font-sans:     'Outfit', system-ui, sans-serif;
  --font-serif:    'Noto Serif Display', Georgia, serif;
  --transition:    0.25s cubic-bezier(0.4,0,0.2,1);
  color-scheme: dark;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--clr-gold);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--clr-gold2); }
a:focus-visible {
  outline: 2px solid var(--clr-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Container ── */
.container {
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 40%, rgba(180,80,20,0.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 75% 70%, rgba(232,200,74,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 100% 100% at 50% 50%, #1a1208 0%, #0a0905 100%);
  animation: hero-pulse 8s ease-in-out infinite alternate;
}

@keyframes hero-pulse {
  from { opacity: 0.9; }
  to   { opacity: 1; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* NAV */
.top-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--clr-border2);
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--clr-gold);
  letter-spacing: 0.02em;
}

.nav-cities {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-cities a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clr-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.nav-cities a:hover {
  color: var(--clr-gold);
  border-color: var(--clr-border);
  background: rgba(232,200,74,0.05);
}

/* HERO CONTENT */
.hero-content {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem clamp(1rem, 6vw, 5rem);
  max-width: 900px;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: 1.25rem;
  opacity: 0.85;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 0.92;
  color: var(--clr-text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: italic;
  color: var(--clr-gold);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--clr-muted);
  max-width: 60ch;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  padding: 1.25rem 1.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 1.5rem;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--clr-gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-top: 0.2rem;
}

.stat-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--clr-border);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clr-bg);
  background: var(--clr-gold);
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.hero-cta:hover {
  background: var(--clr-gold2);
  color: var(--clr-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(232,200,74,0.3);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-gold);
  opacity: 0.3;
}

.scroll-indicator span:nth-child(2) { opacity: 0.6; }
.scroll-indicator span:nth-child(3) { opacity: 1; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ══════════════════════════════════════
   PHILOSOPHY
══════════════════════════════════════ */
.philosophy {
  padding: 6rem 0;
  background: var(--clr-bg2);
  border-top: 1px solid var(--clr-border2);
  border-bottom: 1px solid var(--clr-border2);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .philosophy-grid { grid-template-columns: 1fr; }
}

.philosophy-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--clr-text);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.philosophy-text p {
  color: var(--clr-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.criteria-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.criterion-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border2);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all var(--transition);
}

.criterion-card:hover {
  border-color: var(--clr-border);
  background: var(--clr-surface2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.criterion-card.penalty { border-left: 3px solid var(--clr-red); }
.criterion-card.bonus   { border-left: 3px solid var(--clr-gold); }

.criterion-pct {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--clr-gold);
  margin-bottom: 0.3rem;
}

.criterion-card.penalty .criterion-pct { color: var(--clr-red); }

.criterion-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--clr-text);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.criterion-desc {
  font-size: 0.75rem;
  color: var(--clr-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   CITY SECTIONS
══════════════════════════════════════ */
.city-section {
  padding-bottom: 6rem;
}

.city-header {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4rem;
  margin-bottom: 4rem;
}

.city-header-bg {
  position: absolute;
  inset: 0;
  opacity: 0.12;
}

.hanoi-header .city-header-bg {
  background: radial-gradient(ellipse 80% 100% at 20% 50%, var(--clr-hanoi), transparent);
}
.sapa-header .city-header-bg {
  background: radial-gradient(ellipse 80% 100% at 20% 50%, var(--clr-sapa), transparent);
}
.hoian-header .city-header-bg {
  background: radial-gradient(ellipse 80% 100% at 20% 50%, var(--clr-hoian), transparent);
}
.danang-header .city-header-bg {
  background: radial-gradient(ellipse 80% 100% at 20% 50%, var(--clr-danang), transparent);
}
.saigon-header .city-header-bg {
  background: radial-gradient(ellipse 80% 100% at 20% 50%, var(--clr-saigon), transparent);
}

.city-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.city-name {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hanoi-header .city-name  { color: var(--clr-hanoi); }
.sapa-header .city-name   { color: var(--clr-sapa); }
.hoian-header .city-name  { color: var(--clr-hoian); }
.danang-header .city-name { color: var(--clr-danang); }
.saigon-header .city-name { color: var(--clr-saigon); }

.city-alt {
  font-size: 0.45em;
  color: var(--clr-muted);
  font-style: normal;
  font-weight: 400;
}

.city-desc {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--clr-muted);
  max-width: 65ch;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.city-quick-facts {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.city-quick-facts span {
  font-size: 0.8rem;
  color: var(--clr-muted2);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border2);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

/* ── Section Headers ── */
.section-header {
  margin-bottom: 2rem;
}

.section-header h2,
.section-header h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--clr-text);
  margin-bottom: 0.5rem;
}

.section-sub {
  font-size: 0.9rem;
  color: var(--clr-muted);
  margin-bottom: 1rem;
}

/* ── Top 10 Grid ── */
.top10-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.top10-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: all var(--transition);
  cursor: default;
}

.top10-card:hover {
  background: var(--clr-surface2);
  border-color: var(--clr-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.top10-card[data-rank="1"] {
  border-left: 3px solid var(--clr-gold);
  background: linear-gradient(135deg, rgba(232,200,74,0.06), var(--clr-surface));
}

.rank-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--clr-muted2);
  min-width: 28px;
  text-align: center;
}

.top10-card[data-rank="1"] .rank-badge { color: var(--clr-gold); }

.dish-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}

.top10-content {
  flex: 1;
  min-width: 0;
}

.dish-vn {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--clr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-en {
  font-size: 0.75rem;
  color: var(--clr-muted);
  margin-bottom: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.restaurant-rec {
  font-size: 0.7rem;
  color: var(--clr-gold);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-pill {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--clr-bg);
  background: var(--clr-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.score-pill.score-high   { background: var(--clr-gold); }
.score-pill.score-perfect { background: #e8c84a; color: #0a0905; }

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.filter-btn {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--clr-muted);
  background: var(--clr-surface);
  border: 1px solid var(--clr-border2);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--clr-border);
  color: var(--clr-text);
}

.filter-btn.active {
  background: var(--clr-gold);
  color: var(--clr-bg);
  border-color: var(--clr-gold);
  font-weight: 700;
}

/* ── Table ── */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--clr-border2);
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
}

.food-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.food-table thead {
  background: var(--clr-surface2);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.food-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-muted);
  white-space: nowrap;
}

.food-table th.sortable {
  cursor: pointer;
  transition: color var(--transition);
  user-select: none;
}
.food-table th.sortable:hover { color: var(--clr-gold); }

.food-table tbody tr {
  border-bottom: 1px solid var(--clr-border2);
  transition: background var(--transition);
}

.food-table tbody tr:last-child { border-bottom: none; }

.food-table tbody tr:hover {
  background: rgba(255,220,100,0.03);
}

.food-table tbody tr[style*="display: none"] { display: none !important; }

.food-table td {
  padding: 0.9rem 1.25rem;
  vertical-align: top;
  color: var(--clr-text);
  line-height: 1.5;
}

.food-table td.vn-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--clr-text);
  white-space: nowrap;
}

.food-table td.restaurant-cell strong {
  color: var(--clr-gold);
  font-size: 0.88rem;
}

.food-table td.why {
  max-width: 380px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--clr-muted);
}

.food-table td.price {
  white-space: nowrap;
  font-weight: 600;
  color: var(--clr-gold);
  font-size: 0.8rem;
}

.food-table td.time {
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--clr-muted);
}

/* ── Tags ── */
.tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
}

.tag-pho      { background: rgba(180,80,20,0.25); color: #d4824a; }
.tag-noodles  { background: rgba(90,120,180,0.2); color: #8ab0d8; }
.tag-bbq      { background: rgba(180,60,30,0.25); color: #e07060; }
.tag-coffee   { background: rgba(100,70,40,0.35); color: #c09060; }
.tag-rolls    { background: rgba(70,130,100,0.2); color: #7abf9a; }
.tag-soup     { background: rgba(80,100,160,0.2); color: #90b0d8; }
.tag-sandwich { background: rgba(160,120,40,0.25); color: #d0a050; }
.tag-beer     { background: rgba(100,90,30,0.3); color: #c8a040; }
.tag-dessert  { background: rgba(130,60,100,0.25); color: #c87090; }
.tag-snacks   { background: rgba(100,140,60,0.2); color: #90c070; }
.tag-hotpot   { background: rgba(160,50,30,0.25); color: #d86040; }
.tag-seafood  { background: rgba(40,100,160,0.25); color: #70b0d0; }
.tag-poultry  { background: rgba(80,60,20,0.35); color: #b09040; }
.tag-pork     { background: rgba(160,60,60,0.2); color: #d08080; }
.tag-drinks   { background: rgba(40,120,80,0.2); color: #60b090; }
.tag-rice     { background: rgba(140,110,30,0.25); color: #c8a040; }
.tag-dumplings{ background: rgba(140,60,140,0.2); color: #c070c0; }
.tag-pancake  { background: rgba(160,100,20,0.25); color: #d09040; }
.tag-beef     { background: rgba(140,40,30,0.25); color: #c86050; }
.tag-rolls    { background: rgba(50,130,90,0.2); color: #70b090; }
.tag-stew     { background: rgba(100,60,30,0.3); color: #c08050; }
.tag-clams    { background: rgba(40,100,130,0.25); color: #60b0c0; }

/* ── Scores ── */
.score {
  display: inline-block;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.score.s10   { background: rgba(232,200,74,0.2); color: var(--clr-gold); }
.score.s10.perfect { background: rgba(232,200,74,0.3); }
.score.s95   { background: rgba(180,200,100,0.15); color: #aad066; }
.score.s90   { background: rgba(120,180,120,0.15); color: #80c080; }
.score.s85   { background: rgba(100,140,100,0.15); color: #70a870; }

/* ── Badges ── */
.backup {
  font-size: 0.72rem;
  color: var(--clr-muted2);
  margin-top: 0.2rem;
  display: block;
}

.stars {
  font-size: 0.8rem;
  letter-spacing: -0.1em;
  white-space: nowrap;
}

.local-badge,
.mixed-badge,
.tourist-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}

.local-badge  { background: rgba(40,180,80,0.15); color: #60d080; }
.mixed-badge  { background: rgba(200,180,40,0.15); color: #d0c040; }
.tourist-badge{ background: rgba(200,60,60,0.15); color: #d06060; }

/* ── City pills in master table ── */
.city-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.hanoi-pill  { background: rgba(212,130,74,0.2); color: var(--clr-hanoi); }
.sapa-pill   { background: rgba(74,138,122,0.2); color: var(--clr-sapa); }
.hoian-pill  { background: rgba(232,184,74,0.2); color: var(--clr-hoian); }
.danang-pill { background: rgba(90,122,184,0.2); color: var(--clr-danang); }
.saigon-pill { background: rgba(192,74,58,0.2); color: var(--clr-saigon); }

/* ── Side Tables ── */
.side-tables {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.side-table-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.side-table-card.trap {
  border-left: 3px solid var(--clr-red2);
}

.side-table-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--clr-border2);
}

.side-table-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.side-table-card li {
  font-size: 0.8rem;
  color: var(--clr-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.side-table-card li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--clr-gold);
  opacity: 0.5;
}

.side-table-card li strong {
  color: var(--clr-text);
}

/* ══════════════════════════════════════
   MASTER TABLE
══════════════════════════════════════ */
.master-table-section {
  padding: 6rem 0;
  background: var(--clr-bg2);
  border-top: 1px solid var(--clr-border2);
}

.master-table-section .section-header h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.master-search {
  position: relative;
  margin: 1rem 0;
  max-width: 480px;
}

#master-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}

#master-search-input::placeholder { color: var(--clr-muted2); }

#master-search-input:focus {
  border-color: var(--clr-gold);
  box-shadow: 0 0 0 3px rgba(232,200,74,0.12);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.master-table { min-width: 1100px; }

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  background: #07060400;
  border-top: 1px solid var(--clr-border2);
  padding: 4rem 0 2rem;
  background: var(--clr-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-text);
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.footer-col p {
  font-size: 0.82rem;
  color: var(--clr-muted);
  line-height: 1.7;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col li a {
  font-size: 0.82rem;
  color: var(--clr-muted);
  transition: color var(--transition);
}

.footer-col li a:hover { color: var(--clr-gold); }

.footer-bottom {
  border-top: 1px solid var(--clr-border2);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--clr-muted2);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════
   SAPA GRID ACCENT
══════════════════════════════════════ */
.sapa-grid .top10-card[data-rank="1"] {
  border-left-color: var(--clr-sapa);
  background: linear-gradient(135deg, rgba(74,138,122,0.08), var(--clr-surface));
}

/* ══════════════════════════════════════
   HIDDEN ROW STATE
══════════════════════════════════════ */
tr.hidden-row { display: none; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 900px) {
  .nav-cities { display: none; }
  .hero-content { padding: 2rem 1.5rem; }
  .hero-stats { gap: 0; }
  .stat { padding-inline: 0.85rem; }
  .stat-num { font-size: 1.5rem; }
  .top10-grid { grid-template-columns: 1fr 1fr; }
  .criteria-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .top10-grid { grid-template-columns: 1fr; }
  .side-tables { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; gap: 0.5rem; padding: 1rem; }
  .stat-divider { display: none; }
}

/* ══════════════════════════════════════
   SCROLL ANIMATION
══════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
  .top10-card,
  .criterion-card,
  .side-table-card {
    animation: fade-up 0.5s ease both;
  }

  @keyframes fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
