:root {
  /* Core brand colors (Earth Palette: Green, Blue, Brown) */
  --primary-color: #2E8B57; /* Sea Green (Nature/Flora) */
  --secondary-color: #0284c7; /* Ocean Blue (Water/Sky) */
  --accent-color: #8B4513; /* Saddle Brown (Soil/Land) */
  
  /* Bootstrap Overrides */
  --bs-primary: #2E8B57;
  --bs-primary-rgb: 46, 139, 87;
  
  /* Light theme (Public Pages) */
  --bg-white: #ffffff;
  --bg-light: #f7f9f8;
  --bg-green: #1B4332; /* Deep forest green */
  
  --text-dark: #0f141e;
  --text-muted: #6b7280;
  --text-white: #ffffff;
  
  --border-color: #e5e7eb;
  
  /* Dark theme (Dashboards/Admin) - accessed via .dark-theme class */
  --bg-dark-main: #0B0F19;
  --bg-dark-card: #151A26;
  --bg-dark-hover: #1E2532;
  --border-dark: #2A3140;
  --text-dark-primary: #F3F4F6;
  --text-dark-muted: #9CA3AF;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 24px 48px rgba(0,0,0,0.12);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Dark Theme Utility Class */
body.dark-theme {
  --bg-white: var(--bg-dark-card);
  --bg-light: var(--bg-dark-main);
  --text-dark: var(--text-dark-primary);
  --text-muted: var(--text-dark-muted);
  --border-color: var(--border-dark);
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-md: 0 10px 15px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 25px rgba(0,0,0,0.5);
  background-color: var(--bg-dark-main);
  color: var(--text-dark-primary);
}

body.dark-theme .global-header {
  background: rgba(21, 26, 38, 0.95);
  border-bottom-color: var(--border-dark);
}
body.dark-theme .header-center a { color: var(--text-dark-muted); }
body.dark-theme .header-center a:hover, body.dark-theme .header-center a.active { color: var(--text-dark-primary); }
body.dark-theme .logo { color: var(--text-white); }

body.dark-theme .btn-secondary {
  background: transparent;
  color: var(--text-white);
  border-color: var(--border-dark);
}
body.dark-theme .btn-secondary:hover {
  background: var(--bg-dark-hover);
  border-color: var(--text-dark-muted);
}
body.dark-theme .card, body.dark-theme .stat-card, body.dark-theme .match-card, body.dark-theme .suggestion-item, body.dark-theme .ai-prompt-box, body.dark-theme .conversion-box, body.dark-theme form, body.dark-theme .admin-content {
  background: var(--bg-dark-card);
  border-color: var(--border-dark);
}
body.dark-theme .context-bar {
  background: var(--bg-dark-card) !important;
  border-bottom-color: var(--border-dark) !important;
}
body.dark-theme .sidebar {
  background: var(--bg-dark-main);
  border-right: 1px solid var(--border-dark);
}
body.dark-theme input, body.dark-theme select, body.dark-theme textarea {
  background: var(--bg-dark-main);
  border-color: var(--border-dark);
  color: var(--text-dark-primary);
}
body.dark-theme input:focus, body.dark-theme select:focus, body.dark-theme textarea:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.1);
}
body.dark-theme .chip {
  background: transparent;
  border-color: var(--border-dark);
  color: var(--text-dark-muted);
}
body.dark-theme .chip.active {
  background: rgba(204, 255, 0, 0.1);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}
body.dark-theme .badge.silver { background: #1f2937; color: #d1d5db; border: 1px solid #374151;}
body.dark-theme .badge.gold { background: #422006; color: #fef08a; border: 1px solid #713f12;}
body.dark-theme .constellation-mockup { background: var(--bg-dark-main); border-color: var(--border-dark); }
body.dark-theme .constellation-mockup .node { background: var(--bg-dark-card); border-color: var(--border-dark); color: var(--text-dark-primary); }
body.dark-theme .constellation-mockup .node.main { border-color: var(--secondary-color); color: var(--secondary-color); }
body.dark-theme #interactive-map { filter: invert(90%) hue-rotate(180deg) brightness(85%) contrast(105%); }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}
.section-padding { padding: 8rem 0; }
.bg-light { background-color: var(--bg-light); }
.bg-green { background-color: var(--bg-green); color: var(--text-white); }
.text-center { text-align: center; }
.text-white { color: var(--text-white); }
.opacity-80 { opacity: 0.8; }
.w-100 { width: 100%; }
.mt-2 { margin-top: 2rem; }
.mt-4 { margin-top: 4rem; }

h1, h2, h3, h4 {
  color: var(--text-dark);
  line-height: 1.2;
}
.bg-green h2, .bg-green h3, .bg-green h4 { color: var(--text-white); }

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.lead-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

/* Typography & Links */
a { text-decoration: none; color: inherit; }
.global-header {
  position: fixed;
  top: 0; width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-color);
}
.tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: none; /* hidden on small screens */
}
@media(min-width: 1024px) {
  .tagline { display: block; }
}

.header-center {
  display: flex;
  gap: 1.5rem;
}
.header-center a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.header-center a:hover { color: var(--primary-color); }

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.icon-btn {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { color: var(--primary-color); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary {
  background: var(--secondary-color);
  color: #0A0E17;
  border: 1px solid var(--secondary-color);
}
.btn-primary:hover {
  background: #B3E600;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(204, 255, 0, 0.2);
}
.btn-secondary {
  background: var(--bg-white);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-light);
  border-color: var(--text-muted);
}
.btn-outline-white {
  background: transparent;
  color: var(--text-white);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--text-white);
}

.mobile-menu-toggle {
  display: none;
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
}

/* 1. HERO SECTION */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 160px; /* extra space for overlapping search bar */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-background {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(0,102,255,0.05) 0%, transparent 70%);
  z-index: -1;
  /* Image will be imported or injected via js if we use the generated one */
  background-image: url('hero-bg.png'); /* placeholder name */
  background-size: cover;
  background-position: center;
  opacity: 0.2;
}

.hero-container {
  max-width: 900px;
  padding: 0 5%;
  z-index: 1;
  position: relative;
}

.search-container {
  position: absolute;
  top: 90px; /* Float on top edge */
  left: 0; right: 0;
  display: flex; justify-content: center;
  z-index: 50;
  padding: 0 5%;
}
.search-bar-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
}
.search-icon {
  position: absolute;
  left: 1.5rem; top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
}
.search-bar {
  width: 100%;
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
  font-size: 1.1rem;
  outline: none;
  transition: all 0.3s;
}
.search-bar:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(44,165,141,0.1);
}

.hero-copy h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--primary-color);
}
.hero-copy p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex; gap: 1rem; justify-content: center; margin-bottom: 4rem;
}

.featured-cities {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.city-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  width: 200px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.city-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.card-header {
  display: flex; justify-content: space-between; align-items: start;
  margin-bottom: 0.5rem;
}
.card-header h3 { font-size: 1rem; margin: 0;}
.badge {
  font-size: 0.7rem; font-weight: 700;
  padding: 0.2rem 0.5rem; border-radius: 4px;
}
.badge.gold { background: #fef08a; color: #854d0e; }
.badge.silver { background: #e2e8f0; color: #475569; }
.badge.bronze { background: #fed7aa; color: #9a3412; }

.card-body {
  display: flex; justify-content: space-between; align-items: center;
}
.score { font-weight: 700; color: var(--primary-color); }
.icons i { width: 16px; height: 16px; color: var(--secondary-color); margin-left: 4px;}

/* 3. WHO FOR */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.card {
  background: var(--bg-white); border: 1px solid var(--border-color);
  padding: 2.5rem; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); transition: transform 0.2s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 48px; height: 48px;
  color: var(--accent-color);
  background: rgba(0,102,255,0.1);
  border-radius: 12px; padding: 10px;
  margin-bottom: 1.5rem;
}
.card h3 { margin-bottom: 1rem; }
.card p { color: var(--text-muted); }

/* 4. HOW IT WORKS */
.timeline {
  max-width: 800px;
  margin: 3rem auto 0;
}
.step {
  display: flex; gap: 2rem; margin-bottom: 3rem;
  opacity: 0.3; transition: opacity 0.5s, transform 0.5s;
  transform: translateY(20px);
}
.step.active {
  opacity: 1; transform: translateY(0);
}
.step-number {
  font-size: 3rem; font-weight: 700; color: var(--border-color);
  line-height: 1; transition: color 0.3s;
}
.step.active .step-number { color: var(--secondary-color); }
.step-content h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.step-content p { color: var(--text-muted); font-size: 1.1rem;}

/* 5. CCFP */
.ccfp-scroller {
  display: flex; gap: 1.5rem; overflow-x: auto;
  padding: 2rem 0; scroll-snap-type: x mandatory;
  -ms-overflow-style: none; scrollbar-width: none;
}
.ccfp-scroller::-webkit-scrollbar { display: none; }

.ccfp-card {
  flex: 0 0 300px; scroll-snap-align: center;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  padding: 2rem; border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
}
.ccfp-card h3 { color: var(--text-white); font-size: 1.1rem; margin-bottom: 1rem; opacity: 0.9;}
.ccfp-highlight {
  font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.categories { line-height: 1.8; opacity: 0.9;}
.progress-bar {
  height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px;
  display: flex; overflow: hidden; margin-bottom: 0.5rem;
}
.progress.measured { background: var(--secondary-color); }
.progress.estimated { background: var(--accent-color); }
.small { font-size: 0.85rem; opacity: 0.8; }
.benchmark {
  background: rgba(0,102,255,0.1); padding: 0.5rem 1rem;
  border-radius: 4px; margin-bottom: 0.5rem; font-weight: 600;
  display: inline-block; width: 100%;
}

/* 6. AI MATCHMAKING */
.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
}
.align-center { align-items: center; }
.check-list { list-style: none; }
.check-list li {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1rem; font-size: 1.1rem;
}
.check-list i { color: var(--secondary-color); }
.constellation-mockup {
  position: relative; height: 400px;
  background: var(--bg-light); border-radius: var(--radius-lg);
  border: 1px solid var(--border-color); overflow: hidden;
}
.node {
  position: absolute; padding: 0.5rem 1rem;
  background: var(--bg-white); border: 1px solid var(--border-color);
  border-radius: 999px; font-weight: 600; box-shadow: var(--shadow-md);
  z-index: 10;
}
.node.main { top: 50%; left: 50%; transform: translate(-50%, -50%); border-color: var(--secondary-color); color: var(--primary-color);}
.n1 { top: 20%; left: 20%; }
.n2 { top: 80%; left: 30%; }
.n3 { top: 30%; right: 15%; }
.connection {
  position: absolute; background: var(--secondary-color); height: 2px;
  transform-origin: left center; z-index: 1; opacity: 0.3;
}
/* Rough mock lines */
.c1 { top: 50%; left: 50%; width: 150px; transform: rotate(-135deg); }
.c2 { top: 50%; left: 50%; width: 150px; transform: rotate(120deg); }
.c3 { top: 50%; left: 50%; width: 180px; transform: rotate(-30deg); }


/* 7. SDG */
.sdg-grid {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 3rem;
}
.sdg-icon {
  width: 100px; height: 100px;
  background: var(--bg-white); color: var(--text-dark);
  border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; box-shadow: var(--shadow-sm);
  transition: transform 0.2s; cursor: pointer;
}
.sdg-icon:hover { transform: scale(1.05); }

/* 8. Conversion */
.conversion-box {
  background: var(--bg-white); border: 1px solid var(--border-color);
  padding: 4rem 2rem; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); max-width: 800px; margin: 0 auto;
}
.benefits {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.5rem; margin: 2rem 0;
}
.benefits li {
  background: rgba(0,102,255,0.1); color: var(--accent-color);
  padding: 0.5rem 1rem; border-radius: 999px; font-weight: 500;
}
.microcopy { font-size: 0.85rem; color: var(--text-muted); margin-top: 1rem; }

/* Contact Forms */
.trust-signals ul { list-style: none; margin-top: 1rem; }
.trust-signals li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; color: var(--text-muted); }
.trust-signals i { color: var(--secondary-color); width: 18px; height: 18px; }

form {
  background: var(--bg-white); padding: 2.5rem;
  border-radius: var(--radius-md); border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.9rem;}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 0.75rem; border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--secondary-color);
}

/* Footer */
footer { padding: 4rem 0 2rem; background: var(--bg-light); border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 4rem; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer-brand h2 { color: var(--primary-color); font-size: 1.5rem; margin-bottom: 0.5rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem;}
.footer-col h4 { margin-bottom: 1.5rem; font-size: 1rem; }
.footer-col a { display: block; color: var(--text-muted); margin-bottom: 0.75rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border-color); padding-top: 2rem; }


/* Animations */
.fade-up {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- AI MATCHMAKING SPECIFIC STYLES --- */
.ai-prompt-box {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.source-city-selector {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--border-color);
}
.source-icon {
  width: 50px; height: 50px; border-radius: 12px; object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.ai-search-form {
  position: relative; display: flex; gap: 1rem;
}
.ai-sparkle-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--accent-color);
}
.ai-search-form input {
  flex: 1; padding: 1.25rem 1.25rem 1.25rem 3rem;
  border-radius: var(--radius-sm); border: 2px solid var(--border-color);
  font-size: 1.05rem; font-family: inherit; transition: all 0.3s;
}
.ai-search-form input:focus { outline: none; border-color: var(--secondary-color); }
.ai-search-form button { padding: 0 2rem; font-size: 1.05rem; }

.match-cards-panel { display: flex; flex-direction: column; gap: 1.5rem; }
.match-card {
  background: var(--bg-white); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 1.5rem;
  box-shadow: var(--shadow-sm); transition: all 0.3s; cursor: pointer;
}
.match-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-color); }
.match-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tags { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap;}
.tag { font-size: 0.75rem; background: rgba(0,102,255,0.1); color: var(--accent-color); padding: 0.2rem 0.6rem; border-radius: 999px; font-weight: 600; }
.ai-reasoning { font-size: 0.95rem; color: var(--text-muted); background: var(--bg-light); padding: 1rem; border-radius: var(--radius-sm); border-left: 3px solid var(--accent-color); line-height: 1.5; }
.match-card-footer { margin-top: 1rem; }

/* Large Constellation for AI page */
.constellation-mockup.large { height: 600px; background: var(--bg-white); box-shadow: var(--shadow-md); border: none; }
.constellation-mockup.large .node { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; cursor: pointer; transition: transform 0.2s; }
.constellation-mockup.large .node:hover { transform: scale(1.1); box-shadow: var(--shadow-lg); z-index: 20; border-color: var(--primary-color);}
.constellation-mockup.large .node-icon { width: 30px; height: 30px; border-radius: 6px; }

/* Spinner */
.spinner {
  width: 50px; height: 50px; border: 4px solid var(--border-color);
  border-top-color: var(--secondary-color); border-radius: 50%;
  animation: spin 1s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Matchmaking New Additions */
.chip { padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500; border: 1px solid var(--border-color); background: var(--bg-white); color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.chip.active { background: rgba(0,102,255,0.1); border-color: var(--accent-color); color: var(--accent-color); }
.chip:hover { border-color: var(--accent-color); }

.suggestion-item { background: var(--bg-white); padding: 1rem; border-radius: 8px; border: 1px solid var(--border-color); cursor: pointer; transition: all 0.2s; }
.suggestion-item:hover { border-color: var(--secondary-color); transform: translateX(5px); }

.slider-group { margin-bottom: 1.5rem; }
.slider-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.5rem; }
.priority-slider { width: 100%; -webkit-appearance: none; height: 6px; background: var(--border-color); border-radius: 3px; outline: none; }
.priority-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--secondary-color); cursor: pointer; transition: transform 0.2s; }
.priority-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Responsive adjustments */
@media (max-width: 1024px) {
  .ai-search-form { flex-direction: column; }
  .ai-search-form button { padding: 1.25rem; }
  .constellation-mockup.large { height: 400px; }

  /* Global */
  .header-center { display: none; }
  .mobile-menu-toggle { display: block; }
  .hero-copy h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-links { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column;}
}

/* =========================================
   AIRY INFOGRAPHIC LAYOUT (CITY PROFILE)
   ========================================= */

.airy-section {
  padding: 6rem 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.airy-section.bg-light { background-color: var(--bg-light); }
.airy-section.bg-white { background-color: #ffffff; }

.content-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.massive-title {
  font-size: 6rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -2px;
  line-height: 1;
  text-align: center;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
}

/* Minimal Circular Dial */
.dial-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4rem auto;
  width: 400px;
  height: 400px;
}

.dial-score {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.dial-score-value {
  font-size: 8rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 0.9;
}

.dial-score-label {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Metric Grid & Pictograms */
.pictogram-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4rem;
  margin-top: 4rem;
}

.metric-block {
  text-align: center;
}

.metric-icon {
  margin-bottom: 1.5rem;
  color: var(--accent-color); /* Gold/Olive */
  display: flex;
  justify-content: center;
}

.metric-block svg {
  width: 64px;
  height: 64px;
  stroke-width: 1.5;
}

.massive-number {
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-label {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Floating Glass Badges */
.glass-badge-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.glass-badge {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  padding: 1rem 2rem;
  border-radius: 100px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--primary-color);
}

.glass-badge.gold { color: #b8860b; }
.glass-badge.silver { color: #708090; }

/* Elegant Landscape Section */
.landscape-container {
  width: 100%;
  height: 600px;
  margin-top: 2rem;
  position: relative;
}

.landscape-overlay-text {
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 10;
  pointer-events: none;
}

/* =========================================
   THEMATIC INFOGRAPHIC SECTIONS (CITY)
   IPA-Istanbul-inspired data dossier blocks
   layered on top of the airy design system.
   ========================================= */

/* Each thematic section sets its own --accent. */
.thematic-section {
  --accent: var(--primary-color);
  padding: 5rem 2rem;
  border-top: 1px solid var(--border-color);
}
.thematic-section.bg-light  { background-color: var(--bg-light); }
.thematic-section.bg-white  { background-color: #ffffff; }

.thematic-section .section-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
  padding: 0.4rem 0.9rem; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  margin-bottom: 1rem;
}
.thematic-section .section-eyebrow i { width: 16px; height: 16px; }

.thematic-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800; margin-bottom: 0.5rem;
  color: var(--text-dark); letter-spacing: -0.5px;
}

.thematic-section .section-lede {
  color: var(--text-muted); font-size: 1.05rem; max-width: 640px;
  margin-bottom: 2.5rem;
}

/* Period chip (year range) */
.period-chip {
  display: inline-block;
  font-size: 0.72rem; font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--primary-color)) 15%, transparent);
  color: var(--accent, var(--primary-color));
  font-variant-numeric: tabular-nums;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Airy info card (chart container) */
.airy-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.airy-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.airy-card h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem;
  color: var(--text-dark); display: flex; align-items: center;
}
.airy-card .chart-wrap { position: relative; flex: 1; min-height: 220px; }
.airy-card .chart-wrap canvas { max-width: 100%; }

/* KPI tile — small stat in a card */
.airy-kpi {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.airy-kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.airy-kpi .kpi-label {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-muted);
  display: flex; align-items: center; gap: 0.4rem;
}
.airy-kpi .kpi-value {
  font-size: 2.4rem; font-weight: 800; line-height: 1.1;
  color: var(--primary-color); font-variant-numeric: tabular-nums;
}
.airy-kpi .kpi-meta {
  font-size: 0.75rem; color: var(--text-muted);
}

/* Source citation — small caps under each chart */
.source-cite {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
  display: flex; align-items: center; gap: 0.5rem;
}
.source-cite::before { content: "↳"; opacity: 0.6; }
.source-cite code {
  background: var(--bg-light);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.7rem;
}

/* Sub-grid layouts */
.airy-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.airy-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.airy-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) {
  .airy-grid-2, .airy-grid-3, .airy-grid-4 { grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 600px) {
  .airy-grid-2, .airy-grid-3, .airy-grid-4 { grid-template-columns: 1fr; }
}

/* Sticky section nav (TOC pills) — sits directly under the global header.
   Header = 64px logo + 1.25rem (20px) padding × 2 ≈ 104px tall */
.thematic-nav {
  position: sticky;
  top: 104px;
  z-index: 999;     /* below header (1000) but above all section content */
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
@media (max-width: 700px) {
  .thematic-nav { top: 80px; }
}
.thematic-nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; gap: 0.5rem; overflow-x: auto;
  padding: 0.6rem 5%; scrollbar-width: none;
}
.thematic-nav-inner::-webkit-scrollbar { display: none; }
.thematic-nav a {
  flex: 0 0 auto;
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.9rem; border-radius: 999px;
  white-space: nowrap; transition: all 0.2s;
  text-decoration: none;
}
.thematic-nav a:hover { background: var(--bg-light); color: var(--primary-color); }
.thematic-nav a.active { background: var(--primary-color); color: #fff; }

/* Empty / no-data state */
.no-data {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 200px; color: var(--text-muted); font-size: 0.9rem; text-align: center;
  border: 1px dashed var(--border-color); border-radius: var(--radius-sm);
  padding: 2rem;
}
.no-data i { width: 28px; height: 28px; margin-bottom: 0.5rem; opacity: 0.4; }

/* Inline trend deltas */
.delta-up::before    { content: "▲"; margin-right: 0.25rem; color: #15803d; }
.delta-down::before  { content: "▼"; margin-right: 0.25rem; color: #b91c1c; }
.delta-flat::before  { content: "—"; margin-right: 0.25rem; color: var(--text-muted); }

/* =========================================
   BRAND SIGNATURE — 3-dot tri-color palette
   Used across hero, taglines, loaders, and
   the scroll-progress indicator.
   ========================================= */
:root {
  --dot-brown: #9c6c44;
  --dot-blue:  #6bbce6;
  --dot-green: #c4d756;
}

/* Scroll-progress indicator — fixed at top */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 4px; z-index: 9999;
  background: rgba(0,0,0,0.05);
  pointer-events: none;
}
.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--dot-brown), var(--dot-blue), var(--dot-green));
  width: 0%;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(107,188,230,0.4);
}
.scroll-progress-dots {
  position: fixed; top: 16px; right: 24px;
  display: flex; gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.scroll-progress-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  opacity: 0.25;
  transform: scale(0.8);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}
.scroll-progress-dots .dot.brown { background: var(--dot-brown); }
.scroll-progress-dots .dot.blue  { background: var(--dot-blue); }
.scroll-progress-dots .dot.green { background: var(--dot-green); }
.scroll-progress-dots .dot.active {
  opacity: 1; transform: scale(1.15);
  animation: dotBounce 1.2s infinite ease-in-out;
}
.scroll-progress-dots .dot.brown.active { box-shadow: 0 0 12px rgba(156,108,68,0.55); }
.scroll-progress-dots .dot.blue.active  { box-shadow: 0 0 12px rgba(107,188,230,0.55); }
.scroll-progress-dots .dot.green.active { box-shadow: 0 0 12px rgba(196,215,86,0.55); }
@keyframes dotBounce {
  0%, 100% { transform: scale(1.15) translateY(0); }
  50%      { transform: scale(1.15) translateY(-3px); }
}

/* =========================================
   CITY HERO BANNER — TripAdvisor style
   Full-bleed image + dark gradient + content
   ========================================= */
.city-hero-banner {
  position: relative;
  min-height: 75vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  color: #fff;
  background: #0f141e;
}
.city-hero-banner .hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65) saturate(1.05);
  transform: scale(1.05);
  transition: transform 8s ease-out;
}
.city-hero-banner.loaded .hero-bg { transform: scale(1); }
.city-hero-banner .hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.55) 60%, rgba(0,0,0,0.85) 100%),
    radial-gradient(ellipse at 80% 20%, rgba(107,188,230,0.18), transparent 60%);
}
.city-hero-banner .hero-inner {
  position: relative; z-index: 2;
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding: 4rem 5% 3rem;
}
.city-hero-banner .hero-country-row {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem;
}
.city-hero-banner .hero-country {
  font-size: 0.85rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--dot-blue); font-weight: 700;
}
.city-hero-banner .hero-country-row .dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.city-hero-banner .hero-name {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800; line-height: 1; letter-spacing: -0.02em;
  margin: 0.25rem 0 1rem;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.city-hero-banner .hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2rem;
  font-size: 0.95rem; color: rgba(255,255,255,0.85);
}
.city-hero-banner .hero-meta-item {
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.city-hero-banner .hero-meta-item strong { color: #fff; font-weight: 700; }

/* CCFP score chip in hero (compact) */
.hero-score-chip {
  position: absolute; top: 4rem; right: 5%;
  z-index: 3;
  background: rgba(255,255,255,0.95);
  border-radius: 999px;
  padding: 0.85rem 1.6rem 0.85rem 1.2rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  backdrop-filter: blur(8px);
}
.hero-score-chip .score-num {
  font-size: 2.4rem; font-weight: 800; color: var(--primary-color); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-score-chip .score-meta {
  display: flex; flex-direction: column; gap: 2px;
}
.hero-score-chip .score-label {
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700;
}
.hero-score-chip .score-tier {
  font-size: 0.85rem; font-weight: 700; color: var(--text-dark);
}
@media (max-width: 700px) {
  .hero-score-chip { top: auto; bottom: 1rem; right: 1rem; padding: 0.6rem 1rem 0.6rem 0.8rem; }
  .hero-score-chip .score-num { font-size: 1.8rem; }
}

/* =========================================
   GAMIFICATION SHIELD BADGES
   CSS-only shields with tier ribbons; sit
   in a strip between hero and content.
   ========================================= */
.shield-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem;
  padding: 3rem 2rem; background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}
.shield {
  --shield-color: var(--dot-blue);
  --shield-color-dim: rgba(107,188,230,0.15);
  position: relative;
  width: 130px;
  text-align: center;
  cursor: default;
  transition: transform 0.3s ease;
}
.shield:hover { transform: translateY(-6px); }
.shield-body {
  position: relative;
  width: 110px; height: 130px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--shield-color), color-mix(in srgb, var(--shield-color) 60%, #000));
  clip-path: polygon(50% 0%, 100% 12%, 100% 65%, 50% 100%, 0% 65%, 0% 12%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18), inset 0 0 0 3px rgba(255,255,255,0.18);
}
.shield-body i {
  width: 42px; height: 42px; color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.shield-body .shield-score {
  position: absolute; bottom: 18px;
  font-size: 1.05rem; font-weight: 800; color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  font-variant-numeric: tabular-nums;
}
.shield-ribbon {
  margin-top: 0.5rem;
  background: var(--text-dark); color: #fff;
  font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  display: inline-block;
}
.shield-label {
  margin-top: 0.5rem;
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
/* Tier color variants */
.shield.tier-gold     { --shield-color: #eab308; --shield-color-dim: rgba(234,179,8,0.15); }
.shield.tier-silver   { --shield-color: #94a3b8; --shield-color-dim: rgba(148,163,184,0.15); }
.shield.tier-bronze   { --shield-color: #c2826b; --shield-color-dim: rgba(194,130,107,0.15); }
.shield.tier-emerald  { --shield-color: var(--primary-color); --shield-color-dim: rgba(46,139,87,0.15); }
.shield.tier-ocean    { --shield-color: var(--secondary-color); --shield-color-dim: rgba(2,132,199,0.15); }

/* =========================================
   INSIGHT / CONCLUSION BOX
   Auto-generated narrative under each section
   ========================================= */
.insight-box {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, var(--primary-color)) 6%, white), white);
  border: 1px solid color-mix(in srgb, var(--accent, var(--primary-color)) 25%, transparent);
  border-left: 4px solid var(--accent, var(--primary-color));
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex; gap: 1rem; align-items: flex-start;
}
.insight-box .insight-icon {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 8px;
  background: color-mix(in srgb, var(--accent, var(--primary-color)) 15%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent, var(--primary-color));
}
.insight-box .insight-icon i { width: 20px; height: 20px; }
.insight-box .insight-text {
  font-size: 0.95rem; line-height: 1.55; color: var(--text-dark);
}
.insight-box .insight-text strong { color: var(--accent, var(--primary-color)); }
.insight-box .insight-tag {
  display: inline-block; margin-top: 0.4rem;
  font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 700;
  color: var(--accent, var(--primary-color));
}

/* Brand-logo image variant in header */
.global-header .logo-img {
  height: 32px; width: auto; display: block;
}

/* =========================================
   SISTER CITIES — formal twinning section
   on the public city page (between Culture
   and Live Infrastructure).
   ========================================= */
.sis-filters {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.sis-filter {
  font-size: 0.78rem; font-weight: 600;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  background: var(--bg-white); color: var(--text-dark);
  border: 1px solid var(--border-color);
  cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.sis-filter:hover { border-color: var(--accent, #ffc222); }
.sis-filter.active {
  background: var(--accent, #ffc222);
  border-color: var(--accent, #ffc222);
  color: #5d3818;
}
.sis-filter .sis-filter-count {
  font-size: 0.7rem; padding: 0.05rem 0.4rem;
  background: rgba(0,0,0,0.08); border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.sis-filter.active .sis-filter-count { background: rgba(0,0,0,0.18); }

.sis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}
.sis-card {
  position: relative; overflow: hidden;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; flex-direction: column; gap: 0.5rem;
  text-decoration: none; color: inherit;
}
.sis-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--cat-color, #ffc222);
}
.sis-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--cat-color, #ffc222);
}
.sis-card-head {
  display: flex; align-items: center; gap: 0.6rem;
}
.sis-card-flag { font-size: 1.6rem; line-height: 1; }
.sis-card-name {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-dark); line-height: 1.15;
}
.sis-card-country {
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 1px;
}
.sis-card-meta {
  display: flex; align-items: center; gap: 0.4rem;
  flex-wrap: wrap; margin-top: 0.25rem;
}
.sis-card-year {
  font-size: 0.7rem; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 999px;
  background: rgba(255,194,34,0.15); color: #9c6c44;
  font-variant-numeric: tabular-nums;
}
.sis-card-tag {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem; border-radius: 4px;
  text-transform: uppercase;
  color: var(--cat-color, #9c6c44);
  background: color-mix(in srgb, var(--cat-color, #ffc222) 15%, transparent);
}
.sis-card-tag.cohort {
  background: rgba(34,197,94,0.15); color: #15803d;
}
.sis-card-projects {
  font-size: 0.78rem; color: var(--text-muted);
  margin-top: auto; padding-top: 0.4rem;
  display: flex; align-items: center; gap: 0.3rem;
}
.sis-card-projects strong { color: var(--cat-color, #9c6c44); font-weight: 700; }

/* Sister-city drilldown modal */
.sis-modal {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15,20,30,0.55);
  backdrop-filter: blur(6px);
  display: none; align-items: flex-start; justify-content: center;
  padding: 4rem 1rem 2rem;
  overflow-y: auto;
}
.sis-modal.open { display: flex; }
.sis-modal-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  width: 640px; max-width: 100%;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
  position: relative;
}
.sis-modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--bg-light); border: none;
  width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--text-dark); z-index: 2;
}
.sis-modal-close:hover { background: var(--border-color); }
.sis-modal-header {
  padding: 2rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat-color, #ffc222) 8%, white), white);
}
.sis-modal-header .smh-flag-row {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 0.5rem;
}
.sis-modal-header .smh-flag { font-size: 3rem; line-height: 1; }
.sis-modal-header h3 { font-size: 1.6rem; font-weight: 800; color: var(--text-dark); margin: 0; }
.sis-modal-header .smh-country { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.sis-modal-header .smh-meta {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-top: 1rem;
}
.sis-modal-body { padding: 1.5rem 2rem; }
.sis-modal-body h4 {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 1rem;
}

.sis-timeline { position: relative; padding-left: 1.75rem; }
.sis-timeline::before {
  content: ""; position: absolute; left: 0.55rem; top: 0.5rem; bottom: 0.5rem;
  width: 2px; background: var(--border-color);
}
.sis-event {
  position: relative; padding-bottom: 1.4rem;
}
.sis-event:last-child { padding-bottom: 0; }
.sis-event::before {
  content: ""; position: absolute; left: -1.45rem; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--cat-color, #ffc222);
  border: 2px solid var(--bg-white);
  box-shadow: 0 0 0 2px var(--border-color);
}
.sis-event.historical::before { background: #9c6c44; }
.sis-event.active::before     { background: #15803d; }
.sis-event.paused::before     { background: var(--text-muted); }
.sis-event-year {
  font-size: 0.72rem; font-weight: 800;
  color: var(--cat-color, #9c6c44);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
.sis-event-title {
  font-size: 0.95rem; font-weight: 700;
  color: var(--text-dark); margin: 2px 0;
  display: flex; align-items: center; gap: 0.4rem;
  flex-wrap: wrap;
}
.sis-event-status-pill {
  font-size: 0.62rem; font-weight: 700;
  padding: 0.1rem 0.4rem; border-radius: 4px;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.sis-event-status-pill.historical { background: rgba(156,108,68,0.15); color: #9c6c44; }
.sis-event-status-pill.active     { background: rgba(34,197,94,0.15); color: #15803d; }
.sis-event-status-pill.paused     { background: rgba(107,114,128,0.15); color: #4b5563; }
.sis-event-focus-pill {
  font-size: 0.62rem; font-weight: 700;
  padding: 0.1rem 0.4rem; border-radius: 4px;
  letter-spacing: 0.05em; text-transform: uppercase;
  background: color-mix(in srgb, var(--cat-color, #ffc222) 12%, transparent);
  color: var(--cat-color, #9c6c44);
}
.sis-event-summary {
  font-size: 0.85rem; line-height: 1.55;
  color: var(--text-dark);
  margin-top: 4px;
}

.sis-modal-footer {
  display: flex; gap: 0.5rem; padding: 1.25rem 2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}
.sis-modal-btn {
  flex: 1; min-width: 140px;
  padding: 0.7rem 1rem; border-radius: 8px;
  font-weight: 700; font-size: 0.88rem;
  text-decoration: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 1px solid var(--border-color); background: var(--bg-white); color: var(--text-dark);
  transition: all 0.15s;
}
.sis-modal-btn:hover { border-color: var(--cat-color, #ffc222); }
.sis-modal-btn.primary {
  background: var(--cat-color, #ffc222); color: #5d3818;
  border-color: var(--cat-color, #ffc222);
}
.sis-modal-btn.primary:hover {
  filter: brightness(0.9);
}

/* =========================================
   QoL BAND — citizen-facing wellbeing band
   on the public city page (above CCFP shields)
   ========================================= */
.qol-band {
  background: linear-gradient(135deg, #f0fdfa 0%, #fef3f2 50%, #f0f9ff 100%);
  border-bottom: 1px solid var(--border-color);
  position: relative; overflow: hidden;
}
.qol-band::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 16%, #2ca58d 33%, #0284c7 50%, #5b6fef 66%, #ec4899 83%, #a855f7 100%);
}
.qol-band-score {
  flex-shrink: 0;
  text-align: center;
  background: rgba(255,255,255,0.85);
  border: 1px solid color-mix(in srgb, var(--secondary-color) 20%, transparent);
  border-radius: var(--radius-md);
  padding: 1.25rem 2rem;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
}
.qol-band-num {
  font-size: 3.4rem; font-weight: 800; line-height: 1;
  color: var(--secondary-color);
  font-variant-numeric: tabular-nums;
}
.qol-band-tier {
  font-size: 0.9rem; font-weight: 700; color: var(--text-dark);
  margin-top: 0.4rem; letter-spacing: 0.04em;
}
.qol-band-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  margin-top: 0.4rem;
}
.qol-band-text { flex: 1; min-width: 280px; }
.qol-band-eyebrow {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #ef4444;
  background: rgba(239,68,68,0.1);
  padding: 0.3rem 0.8rem; border-radius: 999px;
}
.qol-band-text h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 800; color: var(--text-dark);
  margin: 0.6rem 0 0.5rem; letter-spacing: -0.01em;
}
.qol-band-text p {
  font-size: 0.95rem; color: var(--text-muted); line-height: 1.55;
  margin: 0 0 0.85rem; max-width: 720px;
}
.qol-band-pills { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.qol-band-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 600;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.75rem; border-radius: 999px;
  color: var(--text-dark);
}
.qol-band-pill .pill-score {
  font-weight: 800; font-variant-numeric: tabular-nums;
  margin-left: 0.2rem;
}
.qol-band-pill.up    .pill-score { color: #15803d; }
.qol-band-pill.down  .pill-score { color: #b91c1c; }
.qol-band-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.82rem; font-weight: 600;
  color: var(--primary-color);
  margin-top: 0.85rem;
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-color);
}
.qol-band-link:hover { color: var(--bg-green); border-bottom-style: solid; }

@media (max-width: 700px) {
  .qol-band .container { flex-direction: column; align-items: stretch !important; }
  .qol-band-score { width: 100%; }
}

/* =========================================
   DISTRICT CHOROPLETH — IPA-Istanbul style
   ========================================= */
.districts-wrap {
  position: relative;
  background: linear-gradient(180deg, #f6f4f1 0%, #ffffff 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-top: 1.5rem;
  overflow: hidden;
}
.districts-map {
  position: relative;
  height: 480px;
  border-radius: var(--radius-md);
  background: #ececec;
}
.districts-map .leaflet-container {
  background: #f0f0ee;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
}
.districts-map path.district {
  stroke: #ffffff;
  stroke-width: 1.2;
  transition: fill-opacity 0.2s, stroke-width 0.2s, filter 0.2s;
  cursor: pointer;
}
.districts-map path.district:hover {
  stroke-width: 2.5;
  fill-opacity: 0.95;
  filter: brightness(1.1);
}

/* Floating callout — top-right of map (mirrors IPA layout) */
.districts-callout {
  position: absolute;
  top: 2.5rem; right: 2.5rem;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(10px);
  border: 1px solid color-mix(in srgb, var(--accent, #d2222d) 35%, transparent);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 500;
}
.districts-callout .dc-num {
  font-size: 2.2rem; font-weight: 800; line-height: 1;
  color: var(--accent, #d2222d); font-variant-numeric: tabular-nums;
  margin-bottom: 0.5rem;
}
.districts-callout .dc-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.districts-callout .dc-body {
  font-size: 0.85rem; line-height: 1.5; color: var(--text-dark);
}
.districts-callout .dc-body strong { color: var(--accent, #d2222d); }

/* Color-scale legend strip below the map */
.districts-legend {
  margin-top: 1rem;
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 0.78rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.districts-legend .legend-bar {
  flex: 1; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #fde8e8 0%, #f8c0c0 25%, #ed8a8a 50%, #de4a4a 75%, #b91c1c 100%);
}
.districts-legend .legend-tick {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}

/* District tooltip on hover */
.leaflet-tooltip.dist-tip {
  background: rgba(15,20,30,0.92); color: #fff;
  border: none; border-radius: 6px;
  padding: 0.5rem 0.75rem; font-size: 0.82rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.leaflet-tooltip.dist-tip::before { display: none; }
.leaflet-tooltip.dist-tip strong { color: #ffd24d; display: block; margin-bottom: 2px; font-size: 0.78rem; letter-spacing: 0.04em; }

/* Empty state when GeoJSON missing */
.districts-empty {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted); font-size: 0.92rem; line-height: 1.6;
}
.districts-empty i { width: 32px; height: 32px; opacity: 0.4; margin-bottom: 0.75rem; }
.districts-empty code { background: var(--bg-light); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.82rem; }

@media (max-width: 700px) {
  .districts-callout { position: static; max-width: 100%; margin-bottom: 1rem; }
  .districts-map { height: 360px; }
}

/* =========================================
   ATTRACTIONS — tourism cards from OSM
   ========================================= */
.attraction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.attraction-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: all 0.25s ease;
  position: relative; overflow: hidden;
  text-decoration: none; color: inherit;
}
.attraction-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--accent, #ec4899);
  opacity: 0.7; transition: opacity 0.2s;
}
.attraction-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent, #ec4899);
}
.attraction-card:hover::before { opacity: 1; }
.attraction-card .att-cat {
  font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  color: var(--accent, #ec4899);
}
.attraction-card .att-name {
  font-size: 1rem; font-weight: 700;
  color: var(--text-dark); line-height: 1.3;
  display: flex; align-items: center; gap: 0.4rem;
}
.attraction-card .att-name i { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.attraction-card .att-link {
  font-size: 0.78rem; color: var(--secondary-color);
  margin-top: auto; padding-top: 0.5rem;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
.attraction-card .att-link:hover { text-decoration: underline; }

.tourism-callout {
  margin-top: 2.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent, #ec4899) 8%, white), white);
  border: 1px dashed color-mix(in srgb, var(--accent, #ec4899) 35%, transparent);
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 1.5rem;
  flex-wrap: wrap;
}
.tourism-callout .tc-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent, #ec4899) 15%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent, #ec4899); flex-shrink: 0;
}
.tourism-callout .tc-icon i { width: 28px; height: 28px; }
.tourism-callout .tc-body { flex: 1; min-width: 220px; }
.tourism-callout .tc-body h4 { margin: 0 0 0.4rem; font-size: 1.05rem; font-weight: 700; }
.tourism-callout .tc-body p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.tourism-callout .tc-cta { flex-shrink: 0; }

/* =========================================
   REQUEST A CITY — community submission CTA
   ========================================= */
.request-city {
  background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
  border-top: 4px solid var(--dot-brown);
  padding: 4rem 2rem;
}
.request-city-inner {
  max-width: 980px; margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem;
  align-items: center;
}
@media (max-width: 800px) {
  .request-city-inner { grid-template-columns: 1fr; gap: 2rem; }
}
.request-city .rc-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dot-brown);
  background: rgba(156,108,68,0.12);
  padding: 0.4rem 0.9rem; border-radius: 999px;
  margin-bottom: 1rem;
}
.request-city h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; color: #5d3818;
  letter-spacing: -0.5px; margin-bottom: 0.75rem;
}
.request-city p { color: #6b4a26; line-height: 1.6; margin-bottom: 1.25rem; }
.request-city .rc-list {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  display: grid; gap: 1rem;
}
.request-city .rc-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.85rem;
  align-items: start;
}
.request-city .rc-list li .rc-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(196,215,86,0.18);
  display: flex; align-items: center; justify-content: center;
  color: #6a8419;
  flex-shrink: 0;
}
.request-city .rc-list li .rc-icon i { width: 16px; height: 16px; }
.request-city .rc-list li .rc-text { display: flex; flex-direction: column; gap: 2px; }
.request-city .rc-list li .rc-text strong {
  font-size: 0.95rem; color: #5d3818; font-weight: 700;
  line-height: 1.3;
}
.request-city .rc-list li .rc-text span {
  font-size: 0.85rem; color: #8b6f4a; line-height: 1.45;
}

.request-city-form {
  background: #fff;
  border: 1px solid rgba(156,108,68,0.2);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}
.request-city-form h4 { margin: 0 0 1rem; font-size: 1.05rem; color: var(--text-dark); }
.request-city-form .form-row { margin-bottom: 0.85rem; }
.request-city-form label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 0.3rem;
}
.request-city-form input,
.request-city-form select,
.request-city-form textarea {
  width: 100%; padding: 0.7rem 0.9rem;
  border: 1px solid #e5e7eb; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.95rem;
  background: #fff; color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.request-city-form input:focus,
.request-city-form select:focus,
.request-city-form textarea:focus {
  outline: none; border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(2,132,199,0.12);
}
.request-city-form button {
  width: 100%; padding: 0.85rem;
  background: var(--dot-brown); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.95rem;
  cursor: pointer; transition: background 0.2s, transform 0.2s;
  margin-top: 0.5rem;
}
.request-city-form button:hover { background: #7a5536; transform: translateY(-1px); }
.request-city-form .rc-success {
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3);
  color: #15803d; padding: 1rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; text-align: center;
}

/* =========================================
   CITTOPIA FOOTER — multi-column, branded
   Used on public pages (city, explore, index)
   ========================================= */
.cit-footer {
  background: linear-gradient(180deg, #0f1f1a 0%, #061612 100%);
  color: rgba(255,255,255,0.72);
  padding: 4rem 5% 1.5rem;
  position: relative;
  overflow: hidden;
}
.cit-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dot-brown), var(--dot-blue), var(--dot-green));
}
.cit-footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; gap: 3rem;
  grid-template-columns: 1.5fr repeat(3, 1fr);
}
@media (max-width: 900px) {
  .cit-footer-inner { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
@media (max-width: 540px) {
  .cit-footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

.footer-brand {
  display: flex; flex-direction: column; gap: 1rem;
}
.footer-brand .footer-logo {
  height: 48px; width: auto; object-fit: contain;
  display: block; max-width: 220px;
  filter: brightness(0) invert(1);   /* white silhouette of the wordmark */
  opacity: 0.95;
}
.footer-brand .footer-tagline {
  font-size: 0.95rem; font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
  margin: 0;
}
.footer-brand .footer-dots {
  display: flex; gap: 0.6rem; margin-top: 0.5rem;
}
.footer-brand .footer-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
}
.footer-brand .footer-blurb {
  font-size: 0.82rem; line-height: 1.6;
  color: rgba(255,255,255,0.55);
  max-width: 320px;
  margin-top: 0.5rem;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dot-green);
  margin-bottom: 1.25rem;
}
.footer-col a {
  display: block;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
  position: relative;
  padding-left: 0;
}
.footer-col a:hover {
  color: #fff;
  transform: translateX(4px);
}
.footer-col a .ext {
  font-size: 0.7rem; opacity: 0.5; margin-left: 0.3rem;
}

.cit-footer-bottom {
  max-width: 1200px; margin: 3rem auto 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 0.5rem 1.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}
.cit-footer-bottom .footer-credit a {
  color: var(--dot-blue);
  text-decoration: none;
}
.cit-footer-bottom .footer-credit a:hover { color: var(--dot-green); }
.cit-footer-bottom .footer-mini-dots {
  display: inline-flex; gap: 4px; vertical-align: middle; margin: 0 0.5rem;
}
.cit-footer-bottom .footer-mini-dots .dot {
  width: 5px; height: 5px; border-radius: 50%;
}

/* ─── Mobile hamburger menu — shared across .global-header pages ─── */
.global-header .hamburger {
    display: none;
    background: none; border: 0; padding: 8px;
    cursor: pointer;
    width: 40px; height: 40px;
    flex-direction: column; gap: 5px;
    align-items: center; justify-content: center;
    border-radius: 8px; transition: background 0.2s;
    margin-left: 0.5rem;
}
.global-header .hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--cit-dark, #1b3a2f); border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.global-header.menu-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.global-header.menu-open .hamburger span:nth-child(2) { opacity: 0; }
.global-header.menu-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .global-header { padding: 0.65rem 1rem; }
    .global-header .header-left img { height: 36px !important; }
    .global-header .header-left .logo { font-size: 1.05rem; }

    .global-header .hamburger { display: inline-flex; }

    .global-header .header-center {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(14px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        flex-direction: column; align-items: stretch;
        padding: 0.75rem 0; gap: 0;
        border-top: 1px solid var(--border-color, #e8edf0);
    }
    .global-header.menu-open .header-center { display: flex; }
    .global-header .header-center a {
        padding: 0.85rem 1.5rem;
        border-bottom: 1px solid var(--border-color, #e8edf0);
        font-size: 0.95rem;
        color: var(--cit-dark, #1b3a2f) !important;
    }
    .global-header .header-center a:last-child { border-bottom: 0; }

    .global-header .header-right .btn {
        padding: 0.5rem 1rem; font-size: 0.85rem;
    }
    /* Hide secondary CTAs on tiny mobile, keep primary */
    .global-header .header-right .btn-secondary,
    .global-header .header-right .btn-outline-primary { display: none; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE OPTIMISATION — city.html & shared statistics blocks
   Added 2026-04-30 to clamp the desktop-only sizes that overflowed phones.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Page-level overflow guards */
  body { overflow-x: hidden; }
  img, canvas, svg, video { max-width: 100%; height: auto; }

  /* Section padding tighter */
  .thematic-section { padding-left: 0.85rem !important; padding-right: 0.85rem !important; padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .thematic-section h2 { font-size: clamp(1.4rem, 6vw, 1.7rem); }
  .thematic-section .section-lede { font-size: 0.95rem; margin-bottom: 1.5rem; }
  .thematic-section .section-eyebrow { font-size: 0.65rem; letter-spacing: 1px; }

  /* Pictogram grid (Transport / Environment / Economy / Living) */
  .pictogram-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.25rem !important;
    margin-top: 2rem !important;
  }
  .metric-block svg { width: 36px !important; height: 36px !important; }
  .metric-icon { margin-bottom: 0.65rem; }
  .massive-number { font-size: 1.9rem !important; line-height: 1.1; margin-bottom: 0.25rem; }
  .metric-label { font-size: 0.78rem !important; letter-spacing: 0.5px; }

  /* KPI tile values */
  .airy-kpi { padding: 1rem !important; gap: 0.25rem !important; }
  .airy-kpi .kpi-label { font-size: 0.68rem; letter-spacing: 0.04em; }
  .airy-kpi .kpi-value { font-size: 1.5rem !important; }
  .airy-kpi .kpi-meta { font-size: 0.7rem; }

  /* Airy card (chart container) */
  .airy-card { padding: 1rem !important; }
  .airy-card h3 { font-size: 0.95rem; margin-bottom: 0.65rem; }
  .airy-card .chart-wrap { min-height: 200px; }
  .airy-card .chart-wrap canvas { width: 100% !important; height: auto !important; }

  /* Trophy case grid (inline minmax(200px, 1fr) overflows on 360px screens) */
  #trophy-case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
    padding: 0 0.5rem;
  }

  /* Source citation (becomes very tight on mobile) */
  .source-cite { font-size: 0.66rem; gap: 0.3rem; }
  .source-cite code { font-size: 0.62rem; }

  /* Period chips (year ranges) */
  .period-chip { font-size: 0.66rem; padding: 0.15rem 0.45rem; }

  /* Glass badges (e.g. on city profile hero) */
  .glass-badge-container { gap: 0.55rem !important; margin-top: 1.25rem !important; }
  .glass-badge { padding: 0.55rem 0.85rem !important; font-size: 0.78rem; }
}

/* ──── very small phones (<= 380px) ──── */
@media (max-width: 380px) {
  .pictogram-grid { grid-template-columns: 1fr !important; gap: 0.85rem !important; }
  #trophy-case-grid { grid-template-columns: 1fr !important; }
  .airy-kpi .kpi-value { font-size: 1.35rem !important; }
  .massive-number { font-size: 1.7rem !important; }
}

/* ════════════════════════════════════════════════════════════
   MOBILE — city.html hero & QoL band fixes
   Added 2026-04-30 to fix CCFP chip overlap + horizontal overflow.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Hero banner overall */
  .city-hero-banner {
    min-height: auto !important;
    overflow: hidden !important;
  }
  .city-hero-banner .hero-inner {
    padding: 2rem 1.1rem 1.5rem !important;
    max-width: 100% !important;
  }

  /* CCFP chip — STOP absolute positioning so it stops overlapping the
     source badge. Make it sit inline at the top of the hero content. */
  .hero-score-chip {
    position: static !important;
    top: auto !important; bottom: auto !important; right: auto !important;
    margin: 0 0 1rem 0 !important;
    width: fit-content;
    max-width: 100%;
    padding: 0.6rem 1rem !important;
  }
  .hero-score-chip .score-num { font-size: 1.6rem !important; }
  .hero-score-chip .score-label { font-size: 0.6rem; }
  .hero-score-chip .score-tier { font-size: 0.78rem; }

  /* Hero name */
  .city-hero-banner .hero-name {
    font-size: clamp(2rem, 9vw, 2.6rem) !important;
    margin: 0.25rem 0 0.85rem !important;
  }
  .city-hero-banner .hero-country { font-size: 0.7rem; letter-spacing: 2px; }

  /* Hero meta — tighter wrap, font down */
  .city-hero-banner .hero-meta {
    gap: 0.5rem 1.1rem !important;
    font-size: 0.82rem !important;
  }
  .city-hero-banner .hero-meta-item { word-break: break-word; }

  /* Source badge — let it wrap, smaller font, no negative-space overflow */
  #hero-source-badge {
    align-self: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    line-height: 1.4 !important;
    font-size: 0.72rem !important;
    padding: 0.5rem 0.85rem !important;
    box-sizing: border-box;
  }
  #hero-source-badge a { word-break: break-word !important; }

  /* QoL band — eyebrow / heading / pills shrink and wrap */
  .qol-band .container { padding: 1.5rem 1rem !important; gap: 1rem !important; }
  .qol-band-num { font-size: 2.6rem !important; }
  .qol-band-tier { font-size: 0.95rem !important; }
  .qol-band-label { font-size: 0.7rem !important; }
  .qol-band-text h2 { font-size: 1.25rem !important; line-height: 1.25 !important; }
  .qol-band-text p { font-size: 0.88rem !important; word-break: break-word; }
  .qol-band-pills { gap: 0.35rem !important; }
  .qol-band-pill { font-size: 0.72rem !important; padding: 0.3rem 0.55rem !important; }

  /* Shield strip (gamification badges between hero & content) */
  .shield-strip { padding: 1.5rem 1rem !important; gap: 0.85rem !important; }
  .shield-strip .shield { transform: scale(0.78); margin: -0.5rem; }

  /* Trophy case — already targeted earlier, re-affirm here */
  #trophy-case { padding: 2rem 0 !important; }
  #trophy-case .content-container { padding: 0 0.85rem; }
  #trophy-case h2.subtitle { font-size: 1.4rem !important; }
  #trophy-case p { font-size: 0.88rem !important; padding: 0 0.5rem; }

  /* Progress dots fixed top-right shouldn't visually hint at extra width */
  .scroll-progress-dots { right: 12px !important; top: 10px !important; }
  .scroll-progress-dots .dot { width: 7px !important; height: 7px !important; }

  /* Final safety net: nothing is allowed to escape viewport horizontally */
  .city-hero-banner, .qol-band, .shield-strip, .thematic-section, .thematic-nav { max-width: 100vw !important; overflow-x: hidden !important; }
}

/* ════════════════════════════════════════════════════════════
   GLOBAL — kill horizontal scroll anywhere, full stop.
   This is unconditional (no media query) so it protects every page.
   ════════════════════════════════════════════════════════════ */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}
img, canvas, svg, video, iframe { max-width: 100% !important; }

/* ════════════════════════════════════════════════════════════
   MOBILE — section nav vertical, hide scroll-dots
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* SECTION NAV — stack categories vertically, full width pills.
     Replaces the horizontal-scroll behaviour that was clipping pills. */
  .thematic-nav { padding: 0 !important; border-bottom: 1px solid var(--border-color); }
  .thematic-nav-inner {
    display: flex !important;
    flex-direction: column !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding: 0.5rem 0.85rem !important;
    gap: 0.35rem !important;
    max-width: 100% !important;
  }
  .thematic-nav a {
    flex: 1 1 100% !important;
    width: 100%;
    text-align: center;
    font-size: 0.92rem !important;
    padding: 0.7rem 0.9rem !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color);
  }
  .thematic-nav a.active { border-color: var(--primary-color); }

  /* Make sticky position more compact when expanded vertically */
  .thematic-nav { top: 56px !important; }

  /* Hide the scroll progress dots — they're decorative and on small screens
     they create the illusion that something is off-screen on the right. */
  .scroll-progress-dots { display: none !important; }
  /* Keep the slim progress bar at the very top — it's only 4px tall */
  .scroll-progress { height: 3px; }

  /* Defensive: any flex/grid child can shrink below its content */
  .container, .container-fluid, .content-container, .thematic-section, section {
    max-width: 100% !important;
    overflow-x: hidden;
  }
}

/* ════════════════════════════════════════════════════════════
   COLLAPSIBLE SECTION NAV — optional accordion behaviour on tiny screens
   The nav becomes a collapsed dropdown that the user can tap to expand.
   ════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .thematic-nav-inner {
    max-height: 50vh;
    overflow-y: auto !important;
  }
  .thematic-nav a { font-size: 0.88rem !important; padding: 0.6rem 0.8rem !important; }
}

/* ════════════════════════════════════════════════════════════
   PUBLIC NAV — REDESIGN (added 2026-05-04)
   Three visual tiers: regular text links · soft CTA · strong CTA.
   Animated underline on hover, active-page indicator, more breathing room.
   ════════════════════════════════════════════════════════════ */
.global-header {
    padding: 0.85rem 2rem !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(14px) !important;
    box-shadow: 0 1px 0 rgba(20, 28, 40, 0.04), 0 4px 24px rgba(20, 28, 40, 0.04);
    border-bottom: 0 !important;
}

/* Center nav with proper spacing */
.global-header .header-center {
    display: flex !important;
    align-items: center;
    gap: 0.4rem !important;
    flex: 1;
    justify-content: center;
}

/* Regular nav link — text with animated underline */
.global-header .header-center a {
    position: relative;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    transition: color 0.18s, background 0.18s;
    line-height: 1.3;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* Animated underline (transforms from center out) */
.global-header .header-center a::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.3rem;
    height: 2px;
    background: linear-gradient(90deg, #2ca58d, #1f8773);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.22s ease;
}
.global-header .header-center a:hover {
    color: #1b3a2f !important;
    background: rgba(44, 165, 141, 0.06);
}
.global-header .header-center a:hover::after {
    transform: scaleX(1);
}

/* Active page — coloured underline + slight tint */
.global-header .header-center a.active,
.global-header .header-center a[aria-current="page"] {
    color: #1f8773 !important;
}
.global-header .header-center a.active::after,
.global-header .header-center a[aria-current="page"]::after {
    transform: scaleX(1);
}

/* CTA #1: Bring your city — green pill, outlined → fills on hover */
.global-header .header-center a[href="bring-your-city.html"] {
    color: #1f8773 !important;
    border: 1.5px solid #1f8773 !important;
    border-radius: 99px !important;
    padding: 0.45rem 1.1rem !important;
    margin: 0 0.2rem;
    background: transparent !important;
    font-weight: 700 !important;
    transition: all 0.2s;
}
.global-header .header-center a[href="bring-your-city.html"]::after { display: none; }
.global-header .header-center a[href="bring-your-city.html"]:hover {
    background: #1f8773 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(31, 135, 115, 0.25);
}

/* CTA #2: Be a Cittopian ★ — solid red pill, the strongest CTA */
.global-header .header-center a[href="proof-of-belief.html"] {
    color: #fff !important;
    background: linear-gradient(135deg, #d2222d 0%, #a01820 100%) !important;
    border-radius: 99px !important;
    padding: 0.45rem 1.2rem !important;
    margin: 0 0.2rem;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(210, 34, 45, 0.22);
    transition: all 0.2s;
}
.global-header .header-center a[href="proof-of-belief.html"]::after { display: none; }
.global-header .header-center a[href="proof-of-belief.html"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(210, 34, 45, 0.35);
    filter: brightness(1.05);
}

/* Subtle vertical divider before the CTAs (between Roadmap and Bring your city) */
.global-header .header-center a[href="bring-your-city.html"] {
    margin-left: 0.85rem !important;
    position: relative;
}
.global-header .header-center a[href="bring-your-city.html"]::before {
    content: "";
    position: absolute;
    left: -0.55rem;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background: #e6ebf0;
}

/* Logo — slightly more breathing room */
.global-header .header-left { gap: 1.25rem; }
.global-header .header-left .logo { line-height: 0; }

/* City Login button — more polished */
.global-header .header-right .btn.btn-primary {
    background: #1b3a2f !important;
    border-color: #1b3a2f !important;
    border-radius: 99px !important;
    padding: 0.5rem 1.1rem !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s;
}
.global-header .header-right .btn.btn-primary:hover {
    background: #2ca58d !important;
    border-color: #2ca58d !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(27, 58, 47, 0.25);
}

/* Mobile — keep everything readable when collapsed */
@media (max-width: 991.98px) {
    .global-header { padding: 0.7rem 1rem !important; }
    .global-header.menu-open .header-center {
        flex-direction: column !important;
        gap: 0.25rem !important;
        padding: 1rem 0;
    }
    .global-header.menu-open .header-center a {
        width: 100%;
        text-align: center;
        padding: 0.85rem 1rem !important;
        margin: 0 !important;
    }
    .global-header.menu-open .header-center a::before { display: none !important; }
    .global-header.menu-open .header-center a::after {
        position: static;
        display: block;
        margin: 0 auto;
        width: 30px;
    }
    .global-header.menu-open .header-center a[href="bring-your-city.html"],
    .global-header.menu-open .header-center a[href="proof-of-belief.html"] {
        margin: 0.5rem 1rem !important;
        width: calc(100% - 2rem);
    }
}

/* Wide screens — comfortable spacing */
@media (min-width: 1280px) {
    .global-header .header-center { gap: 0.6rem !important; }
    .global-header .header-center a { padding: 0.6rem 1.1rem; }
}

/* ════════════════════════════════════════════════════════════
   NAV — DOT ANIMATIONS (added 2026-05-04)
   Brand 3-dot signature integrated into the menu.
   ════════════════════════════════════════════════════════════ */

/* 3-dot brand pulse, injected between logo and nav via JS */
.cit-brand-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    margin: 0 0.65rem;
    flex-shrink: 0;
}
.cit-brand-dots .d {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0.45;
    animation: cit-brand-pulse 2.4s ease-in-out infinite;
}
.cit-brand-dots .d:nth-child(1) { background: #9c6c44; animation-delay: 0s;   }
.cit-brand-dots .d:nth-child(2) { background: #6bbce6; animation-delay: 0.4s; }
.cit-brand-dots .d:nth-child(3) { background: #c4d756; animation-delay: 0.8s; }
@keyframes cit-brand-pulse {
    0%, 100% { transform: scale(1); opacity: 0.45; }
    40%      { transform: scale(1.55); opacity: 1; }
}

/* Active nav item — replace the underline with 3 tiny brand dots */
.global-header .header-center a.active::after,
.global-header .header-center a[aria-current="page"]::after {
    background: none !important;
    height: 4px !important;
    bottom: 0.15rem !important;
    transform: scaleX(1) !important;
    background-image: radial-gradient(circle, #9c6c44 1.5px, transparent 1.5px),
                      radial-gradient(circle, #6bbce6 1.5px, transparent 1.5px),
                      radial-gradient(circle, #c4d756 1.5px, transparent 1.5px) !important;
    background-size: 8px 4px, 8px 4px, 8px 4px !important;
    background-position: left center, center center, right center !important;
    background-repeat: no-repeat !important;
    width: 30px !important;
    left: 50% !important;
    right: auto !important;
    margin-left: -15px !important;
    border-radius: 0 !important;
}

/* Hover — single travelling dot in brand gradient (overrides earlier underline) */
.global-header .header-center a:not(.active):not([aria-current="page"]):not([href="bring-your-city.html"]):not([href="proof-of-belief.html"]):hover::after {
    background: linear-gradient(90deg, #9c6c44 0%, #6bbce6 50%, #c4d756 100%) !important;
    height: 2.5px !important;
    border-radius: 99px !important;
    bottom: 0.25rem !important;
    animation: cit-nav-slide 0.5s ease-out;
}
@keyframes cit-nav-slide {
    from { transform: scaleX(0); opacity: 0; }
    to   { transform: scaleX(1); opacity: 1; }
}

/* Bring your city CTA — pulsing green dot inside the pill on hover */
.global-header .header-center a[href="bring-your-city.html"] {
    overflow: hidden;
    position: relative !important;
}
.global-header .header-center a[href="bring-your-city.html"]::after {
    display: block !important;
    content: "" !important;
    position: absolute;
    width: 6px; height: 6px; border-radius: 50%;
    background: #c4d756 !important;
    bottom: auto !important;
    top: 50% !important;
    right: 0.65rem !important;
    left: auto !important;
    transform: translateY(-50%) !important;
    animation: cit-cta-dot 1.6s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(196, 215, 86, 0.6);
}
@keyframes cit-cta-dot {
    0%, 100% { transform: translateY(-50%) scale(0.8); opacity: 0.6; }
    50%      { transform: translateY(-50%) scale(1.3); opacity: 1; }
}

/* Be a Cittopian — gold star micro-bounce on hover */
.global-header .header-center a[href="proof-of-belief.html"] {
    transition: all 0.2s, letter-spacing 0.2s;
}
.global-header .header-center a[href="proof-of-belief.html"]:hover {
    letter-spacing: 0.03em;
}

/* City Login — animated dot indicator (logged-in status sim) */
.global-header .header-right .btn.btn-primary {
    position: relative;
}
.global-header .header-right .btn.btn-primary::before {
    content: "";
    position: absolute;
    top: 8px; right: 8px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #6bbce6;
    box-shadow: 0 0 8px rgba(107, 188, 230, 0.8);
    animation: cit-login-pulse 2.2s ease-in-out infinite;
}
@keyframes cit-login-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.3); }
}

/* Subtle scroll-progress dots in the nav (top-right corner, accents) */
.global-header::before {
    content: "";
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        #9c6c44 0%, #9c6c44 33%,
        #6bbce6 33%, #6bbce6 66%,
        #c4d756 66%, #c4d756 100%);
    opacity: 0;
    transition: opacity 0.3s;
}
.global-header.scrolled::before { opacity: 0.3; }

/* Mobile — keep dots animations more subtle */
@media (max-width: 991.98px) {
    .cit-brand-dots { display: none; }
    .global-header .header-center a[href="bring-your-city.html"]::after {
        right: 1.5rem !important;
    }
}

/* ════════════════════════════════════════════════════════════
   FIXES (added 2026-05-04)
   1. City Login button — force white text on dark-green pill.
   2. Hero sections need breathing room below the fixed nav.
   ════════════════════════════════════════════════════════════ */

/* — City Login button readable contrast — */
.global-header .header-right .btn.btn-primary,
.global-header .header-right .btn.btn-primary:visited {
    color: #ffffff !important;
}
.global-header .header-right .btn.btn-primary i,
.global-header .header-right .btn.btn-primary svg {
    color: #ffffff !important;
    stroke: #ffffff !important;
}
.global-header .header-right .btn.btn-primary:hover {
    color: #ffffff !important;
    background: #2ca58d !important;
    border-color: #2ca58d !important;
}

/* — Hero sections — push the headline below the fixed nav — */
.byc-hero,
.gi-hero,
.sis-hero,
.sdg-hero,
.hiw-hero,
.pricing-hero,
.agora-hero,
.lh-hero {
    padding-top: clamp(6rem, 9vw, 8rem) !important;
}

/* Index page — push the search hero below the nav too */
#hero {
    padding-top: clamp(7rem, 10vw, 9rem) !important;
}

/* About / proof-of-belief / roadmap / lighthouse — also push their heroes down */
.hero {
    padding-top: clamp(7rem, 10vw, 9rem);
}

/* Login + super-admin shouldn't be affected (they have their own layouts) */
body[data-thunderal] .pricing-hero,
body[data-thunderal] .byc-hero { padding-top: 0 !important; }

/* Sister-cities breadcrumb on the lighthouse page also needs the gap */
.lh-breadcrumb { margin-top: 4.5rem !important; }
@media (min-width: 992px) { .lh-breadcrumb { margin-top: 5rem !important; } }

/* ════════════════════════════════════════════════════════════
   FIX: Bring your city pill — dot was stretching to a band
   when the page was the active one (active::after + dot::after
   were colliding). Force every geometry property explicitly so
   .active rules never win.
   ════════════════════════════════════════════════════════════ */
.global-header .header-center a[href="bring-your-city.html"]::after,
.global-header .header-center a[href="bring-your-city.html"].active::after,
.global-header .header-center a[href="bring-your-city.html"][aria-current="page"]::after {
    background: #c4d756 !important;
    background-image: none !important;
    width: 7px !important;
    height: 7px !important;
    top: 50% !important;
    right: 0.7rem !important;
    left: auto !important;
    bottom: auto !important;
    margin-left: 0 !important;
    border-radius: 50% !important;
    transform: translateY(-50%) !important;
    transition: none !important;
    animation: cit-cta-dot 1.6s ease-in-out infinite !important;
    box-shadow: 0 0 8px rgba(196, 215, 86, 0.65) !important;
    display: block !important;
    content: "" !important;
}

/* Make sure the divider-line (::before) on bring-your-city stays put
   even when the page is active */
.global-header .header-center a[href="bring-your-city.html"]::before {
    content: "" !important;
    position: absolute !important;
    left: -0.55rem !important;
    top: 25% !important;
    bottom: 25% !important;
    width: 1px !important;
    height: auto !important;
    background: #e6ebf0 !important;
    border-radius: 0 !important;
    transform: none !important;
    animation: none !important;
}

/* Make room for the dot inside the pill — slightly more right padding */
.global-header .header-center a[href="bring-your-city.html"] {
    padding-right: 1.85rem !important;
}

/* Same protection for Be a Cittopian — active state should not draw underline */
.global-header .header-center a[href="proof-of-belief.html"]::after,
.global-header .header-center a[href="proof-of-belief.html"].active::after,
.global-header .header-center a[href="proof-of-belief.html"][aria-current="page"]::after {
    display: none !important;
    content: none !important;
}
