/* ═══════════════════════════════════════════════════════════
   WINE CELLAR — Style Sheet
   Palette inspired by existing wine card (#6B2D3E burgundy)
═══════════════════════════════════════════════════════════ */

:root {
  --burgundy:       #6B2D3E;
  --burgundy-deep:  #4a0e2b;
  --burgundy-mid:   #7D3548;
  --burgundy-light: #9b4d6b;
  --cream:          #F5F0E8;
  --cream-dark:     #e8ddd0;
  --gold:           #C4A07A;
  --gold-dark:      #a8873a;
  --text:           #3D1220;
  --text-light:     #8B4A5A;
  --border:         rgba(107,45,62,0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  background: var(--cream-dark);
  color: var(--text);
  min-height: 100vh;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; }

a { color: var(--burgundy); text-decoration: none; }
a:hover { color: var(--burgundy-mid); }

/* ── Top Navigation ─────────────────────────────────────── */
.site-header {
  background: var(--burgundy-deep);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 64px;
}

.site-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--cream);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  flex: 1;
}

.nav-links a {
  display: block;
  padding: 0 1.25rem;
  height: 64px;
  line-height: 64px;
  color: rgba(245,240,232,0.75);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cream);
  background: rgba(255,255,255,0.08);
}

.nav-links a.active {
  border-bottom: 3px solid var(--gold);
}

/* ── Sub-navigation ─────────────────────────────────────── */
.sub-nav {
  background: var(--burgundy);
  border-bottom: 1px solid rgba(196,160,122,0.3);
}

.sub-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.sub-nav-inner::-webkit-scrollbar { display: none; }

.sub-nav a {
  display: block;
  padding: 0.6rem 1rem;
  color: rgba(245,240,232,0.65);
  font-size: 0.78rem;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}

.sub-nav a:hover,
.sub-nav a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Main content ────────────────────────────────────────── */
.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--burgundy-deep) 0%, var(--burgundy) 60%, var(--burgundy-mid) 100%);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C4A07A' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='18'/%3E%3Ccircle cx='30' cy='30' r='12'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-content { position: relative; max-width: 700px; margin: 0 auto; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 1rem;
}

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

.hero p {
  color: rgba(245,240,232,0.75);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.hero-pillar {
  background: rgba(245,240,232,0.1);
  border: 1px solid rgba(196,160,122,0.35);
  border-radius: 6px;
  padding: 1.2rem 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hero-pillar:hover {
  background: rgba(245,240,232,0.18);
  transform: translateY(-2px);
}

.hero-pillar .icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.hero-pillar .label {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--cream);
  font-size: 1rem;
}

/* ── Page headers ────────────────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-header h2 {
  font-size: 1.9rem;
  color: var(--burgundy-deep);
  margin-bottom: 0.35rem;
}

.page-header p {
  color: var(--text-light);
  font-size: 1rem;
  font-style: italic;
}

/* ── Cards grid ─────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ── Grape card ─────────────────────────────────────────── */
.grape-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.grape-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74,14,43,0.15);
}

.grape-card-band {
  height: 6px;
}

.grape-card-band.red    { background: linear-gradient(90deg, #6B2D3E, #9b4d6b); }
.grape-card-band.white  { background: linear-gradient(90deg, #C4A07A, #e8d06e); }
.grape-card-band.rosé   { background: linear-gradient(90deg, #c47a8a, #e8b0bc); }
.grape-card-band.orange { background: linear-gradient(90deg, #c4944a, #d4b84a); }

.grape-card-body { padding: 1.1rem 1.25rem 1.25rem; }

.grape-card h3 {
  font-size: 1.2rem;
  color: var(--burgundy-deep);
  margin-bottom: 0.25rem;
}

.grape-card .origin {
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.grape-card p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flavor-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.flavor-tag {
  background: rgba(107,45,62,0.1);
  color: var(--burgundy);
  border-radius: 50px;
  padding: 0.18rem 0.65rem;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

/* ── Stat bars (body/tannin/acidity) ────────────────────── */
.stat-bars { margin-top: 0.85rem; }

.stat-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  width: 60px;
  flex-shrink: 0;
}

.stat-track {
  flex: 1;
  height: 5px;
  background: var(--cream-dark);
  border-radius: 3px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  background: var(--burgundy);
  border-radius: 3px;
}

.stat-val {
  font-size: 0.7rem;
  color: var(--text-light);
  width: 40px;
  text-align: right;
}

/* ── Region card ────────────────────────────────────────── */
.region-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.region-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74,14,43,0.15);
}

.region-card-header {
  background: var(--burgundy-deep);
  padding: 1.25rem 1.25rem 1rem;
}

.region-card-header h3 {
  color: var(--cream);
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.region-card-header .country {
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.region-card-body { padding: 1rem 1.25rem 1.25rem; }

.region-card-body p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.region-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.region-meta-item { flex: 1; }

.region-meta-item .label {
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

.region-meta-item .value {
  font-size: 0.85rem;
  color: var(--text);
}

/* ── Wine Card ──────────────────────────────────────────── */
.wine-card {
  background: var(--cream);
  border: 1.5px solid var(--burgundy);
  border-radius: 5px;
  overflow: hidden;
  font-family: 'EB Garamond', Georgia, serif;
  transition: transform 0.2s, box-shadow 0.2s;
}

.wine-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(74,14,43,0.2);
}

.wine-card-header {
  padding: 1.1rem 1.1rem 0.9rem;
  text-align: center;
  position: relative;
}

.wine-card-header.style-red    { background: linear-gradient(160deg, #4a0e2b, #6B2D3E); }
.wine-card-header.style-white  { background: linear-gradient(160deg, #7a5c28, #a8873a); }
.wine-card-header.style-rosé   { background: linear-gradient(160deg, #6b2d47, #9b4d6b); }
.wine-card-header.style-sparkling { background: linear-gradient(160deg, #3a4a5c, #5a6a82); }
.wine-card-header.style-fortified { background: linear-gradient(160deg, #3a2010, #7a4a1a); }
.wine-card-header.style-dessert { background: linear-gradient(160deg, #6a4a0a, #a87a2a); }
.wine-card-header.style-default { background: linear-gradient(160deg, #4a0e2b, #6B2D3E); }

.wine-card-header .producer {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.wine-card-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: var(--cream);
  line-height: 1.25;
  margin-bottom: 0.35rem;
}

.wine-card-header .vintage-region {
  font-size: 0.82rem;
  color: rgba(245,240,232,0.7);
  font-style: italic;
}

.wine-card-body { padding: 0.9rem 1.1rem; }

.wine-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
}

.wine-grapes {
  font-size: 0.8rem;
  color: var(--text-light);
  font-style: italic;
}

.wine-rating-price {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.wine-stars { color: var(--burgundy); font-size: 0.85rem; }
.wine-price {
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 1px;
}

.wine-tasting {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  margin-bottom: 0.7rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wine-pairings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pairing-chip {
  font-size: 0.72rem;
  background: rgba(107,45,62,0.1);
  color: var(--burgundy);
  border-radius: 50px;
  padding: 0.15rem 0.55rem;
}

/* ── Detail page ────────────────────────────────────────── */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-light);
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.detail-back:hover { color: var(--burgundy); }

.detail-hero {
  background: linear-gradient(135deg, var(--burgundy-deep), var(--burgundy));
  border-radius: 8px;
  padding: 2.5rem 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.fun-fact-box {
  background: rgba(245,240,232,0.1);
  border: 1px solid rgba(196,160,122,0.4);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  width: 240px;
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  align-self: center;
}

.fun-fact-box:hover {
  background: rgba(245,240,232,0.17);
}

.fun-fact-label {
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.fun-fact-text {
  font-size: 0.85rem;
  color: var(--cream);
  line-height: 1.55;
  font-style: italic;
  transition: opacity 0.2s;
}

.fun-fact-hint {
  font-size: 0.65rem;
  color: rgba(196,160,122,0.6);
  margin-top: 0.5rem;
  letter-spacing: 0.5px;
}

/* ── Fun Facts Modal ─────────────────────────────────────── */
.ff-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74,14,43,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.25s;
}

.ff-modal-overlay.show { opacity: 1; }

.ff-modal {
  background: var(--cream);
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transform: translateY(12px);
  transition: transform 0.25s;
}

.ff-modal-overlay.show .ff-modal { transform: translateY(0); }

.ff-modal-header {
  background: var(--burgundy-deep);
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ff-modal-label {
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.ff-modal-title {
  font-size: 1.3rem;
  color: var(--cream);
}

.ff-modal-close {
  background: none;
  border: none;
  color: rgba(245,240,232,0.6);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}

.ff-modal-close:hover { color: var(--cream); }

.ff-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ff-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--cream-dark);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--burgundy);
}

.ff-card-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--burgundy-light);
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.5;
}

.ff-card-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
  font-style: italic;
}

.ff-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-light);
}

.ff-empty-icon {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

.ff-empty p {
  font-style: italic;
  font-size: 0.95rem;
}

.detail-hero-text h2 {
  font-size: 2rem;
  color: var(--cream);
  margin-bottom: 0.35rem;
}

.detail-hero-text .subtitle {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.detail-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.detail-stat { text-align: center; }
.detail-stat .val {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--cream);
  display: block;
}
.detail-stat .key {
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}

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

@media (max-width: 700px) {
  .detail-body { grid-template-columns: 1fr; }
  .hero-pillars { grid-template-columns: 1fr; }
  .detail-hero { flex-direction: column; }
}

.detail-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.detail-sidebar {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.detail-sidebar h4 {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.85rem;
}

.sidebar-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.sidebar-row:last-child { border-bottom: none; }
.sidebar-row .key { color: var(--text-light); }
.sidebar-row .val { color: var(--text); font-weight: 500; }

/* ── Education cards ────────────────────────────────────── */
.edu-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.edu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74,14,43,0.12);
}

.edu-card .category {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}

.edu-card h3 {
  font-size: 1.15rem;
  color: var(--burgundy-deep);
  margin-bottom: 0.5rem;
}

.edu-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-light);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Section heading with ornament ─────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
}

.section-heading h3 {
  font-size: 1.1rem;
  color: var(--burgundy-deep);
  white-space: nowrap;
  font-size: 0.75rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Loading state ──────────────────────────────────────── */
.loading {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
  font-style: italic;
}

.loading::before {
  content: '◌';
  display: block;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  animation: spin 2s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-style: italic; }

/* ── Toast notification ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--burgundy-deep);
  color: var(--cream);
  padding: 0.85rem 1.5rem;
  border-radius: 5px;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error { background: #8B0000; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner { gap: 1rem; }
  .site-logo { font-size: 1.1rem; }
  .nav-links a { padding: 0 0.75rem; font-size: 0.72rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .page-content { padding: 1.5rem 1rem 3rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
}

/* ── Country cards (Regions landing page) ───────────────── */
.country-card {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.country-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(74,14,43,0.18);
}

.country-card-header {
  background: linear-gradient(135deg, var(--burgundy-deep), var(--burgundy-mid));
  padding: 2rem 1.5rem 1.5rem;
}

.country-card-header h3 {
  font-size: 1.6rem;
  color: var(--cream);
  font-family: 'Playfair Display', Georgia, serif;
}

.country-card-body {
  padding: 1.1rem 1.5rem 1.4rem;
}

.country-card-body > p {
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.country-card-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.country-card-tag {
  font-size: 0.78rem;
  background: rgba(107,45,62,0.08);
  color: var(--burgundy);
  border-radius: 50px;
  padding: 0.2rem 0.65rem;
}

/* ── Country region boxes ───────────────────────────────── */
.country-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.country-region-box {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.country-region-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74,14,43,0.15);
  border-color: var(--burgundy);
}

.country-region-box .crb-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  color: var(--burgundy-deep);
  margin-bottom: 0.3rem;
}

.country-region-box .crb-sub {
  font-size: 0.78rem;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── Sub-regions section ────────────────────────────────── */
.subregions-wrap {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.sr-banks {
  display: flex;
  gap: 1.25rem;
  flex: 2;
  flex-wrap: wrap;
}

.sr-bank {
  flex: 1;
  min-width: 200px;
  background: var(--cream);
  border: 1.5px solid var(--burgundy);
  border-radius: 6px;
  overflow: hidden;
}

.sr-bank-label {
  background: var(--burgundy);
  color: var(--cream);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  text-align: center;
}

.srg-group {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
}

.srg-group:last-child { border-bottom: none; }

.srg-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  color: var(--burgundy-deep);
  margin-bottom: 0.35rem;
}

.srg-children {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.srg-child {
  font-size: 0.72rem;
  background: rgba(107,45,62,0.08);
  color: var(--burgundy);
  border-radius: 50px;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.3px;
}

.sr-extras {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
  min-width: 160px;
}

.sr-extra-box {
  flex: 1;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.95rem;
  color: var(--burgundy-deep);
  transition: border-color 0.2s, transform 0.2s;
}

.sr-extra-box:hover {
  border-color: var(--burgundy);
  transform: translateY(-2px);
}

/* ── Filter chips ───────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.filter-chip {
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-light);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip:hover { border-color: var(--burgundy); color: var(--burgundy); }
.filter-chip.active {
  background: var(--burgundy);
  border-color: var(--burgundy);
  color: var(--cream);
}

/* ── Edu article body ───────────────────────────────────── */
.article-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  max-width: 720px;
}

.article-body h2, .article-body h3 {
  color: var(--burgundy-deep);
  margin: 1.5rem 0 0.6rem;
}

.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol {
  margin: 0.75rem 0 1rem 1.5rem;
}

.article-body li { margin-bottom: 0.4rem; }

/* ── Region detail map (sub-region circles) ────────────── */
#region-detail-map {
  height: 400px;
  border-radius: 8px;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #e8ddd0;
}

/* ── Regions map ────────────────────────────────────────── */
#regions-map {
  height: 420px;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #e8ddd0;
}

.leaflet-container {
  font-family: 'EB Garamond', Georgia, serif;
  background: #e8ddd0;
}

.leaflet-popup-content-wrapper {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(74,14,43,0.15);
}

.leaflet-popup-content {
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--text);
  font-size: 0.95rem;
}

.leaflet-popup-tip { background: var(--cream); }

.map-tooltip {
  background: var(--burgundy-deep);
  color: var(--cream);
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(74,14,43,0.3);
}

.map-tooltip::before { display: none; }

