:root {
  /* Brand */
  --color-primary: #4F46E5;       /* indigo-600 - primary CTAs, links, active states */
  --color-primary-dark: #4338CA;  /* indigo-700 - hover */
  --color-primary-light: #EEF2FF; /* indigo-50 - tinted backgrounds, badges */
  --color-secondary: #0EA5E9;     /* sky-500 - secondary accents, tech badges */
  --color-accent: #F97316;        /* orange-500 - featured badge, submit CTA */
  --color-success: #16A34A;
  --color-danger: #DC2626;

  /* Neutrals */
  --color-gray-900: #111827;
  --color-gray-600: #4B5563;
  --color-gray-400: #9CA3AF;
  --color-gray-300: #D1D5DB;
  --color-gray-200: #E5E7EB;
  --color-gray-100: #F3F4F6;
  --color-gray-50:  #F8FAFC;
  --color-white: #FFFFFF;

  /* Back-compat aliases used across the templates */
  --primary: var(--color-primary);
  --bg-color: var(--color-gray-50);
  --card-bg: var(--color-white);
  --text-dark: var(--color-gray-900);
  --text-muted: var(--color-gray-600);
  --border-color: var(--color-gray-200);

  /* Spacing scale (4px base) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  /* Radius scale */
  --radius-sm: 8px;  --radius-md: 12px; --radius-lg: 20px; --radius-full: 999px;
  --border-radius: var(--radius-md);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(17,24,39,0.06);
  --shadow-md: 0 4px 12px rgba(17,24,39,0.08);
  --shadow-lg: 0 16px 32px -8px rgba(17,24,39,0.16);
  --shadow: var(--shadow-md);

  --sidebar-width: 260px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scroll-reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

a { color: inherit; }

/* Layout */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 20px;
  z-index: 1000;
  transition: transform 0.3s ease;
}
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
  min-width: 0;
}
.container {
  padding: 40px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

/* Fit-viewport pages: everything except the startups list/directory page is
   short, self-contained content that should never need a page scrollbar —
   the sidebar is fixed-height, so the rest of the shell fills exactly one
   viewport too. If content is ever taller than the viewport (e.g. a very
   short window), the container scrolls internally as a safety net instead
   of the whole page growing past 100vh. */
.main-wrapper.fit-viewport {
  height: 100vh;
  overflow: hidden;
}
.fit-viewport .container {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Site footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: var(--space-6) 0 var(--space-5);
  flex-shrink: 0;
}
.site-footer .footer-container {
  padding-top: 0;
  padding-bottom: 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-5);
  flex-wrap: wrap;
}
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: var(--space-2); }
.footer-contact strong { display: block; color: var(--text-dark); font-size: 14px; margin-bottom: var(--space-2); }
.footer-contact p { margin: 4px 0; font-size: 14px; }
.footer-contact a { color: var(--color-primary); text-decoration: none; font-weight: 600; transition: color 0.15s ease; }
.footer-contact a:hover { color: var(--color-primary-dark); text-decoration: underline; }

.footer-legal {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-legal-links { display: flex; gap: var(--space-4); }
.footer-legal-links a { color: var(--text-muted); text-decoration: none; }
.footer-legal-links a:hover { color: var(--color-primary); text-decoration: underline; }

/* Legal pages (Privacy / Terms) */
.legal-page { max-width: 760px; margin: 0 auto; padding: var(--space-5) 0 var(--space-6); }
.legal-page h1 { font-size: 28px; margin-bottom: var(--space-2); }
.legal-page .legal-updated { color: var(--text-muted); font-size: 13px; margin-bottom: var(--space-2); }
.legal-page .legal-lang-notice { background: var(--color-primary-light); color: var(--color-primary-dark); padding: 10px 14px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: var(--space-4); }
.legal-page h2 { font-size: 18px; margin-top: var(--space-5); margin-bottom: var(--space-2); color: var(--text-dark); }
.legal-page p, .legal-page li { color: var(--text-muted); font-size: 15px; line-height: 1.7; }
.legal-page ul { padding-left: 22px; margin: var(--space-2) 0; }
.legal-page a { color: var(--color-primary); }

/* Mobile Header (Hidden by default) */
.mobile-header {
  display: none;
  background: var(--card-bg);
  padding: 15px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.mobile-header .logo { margin-bottom: 0; font-size: 18px; }
.hamburger {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-dark);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}
.hamburger:hover,
.hamburger:focus-visible { background: var(--color-gray-100); }

/* Sidebar Branding */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  text-decoration: none;
  margin-bottom: 40px;
}
.logo svg { color: var(--color-primary); }

/* Navigation Links */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-links a:hover { background-color: var(--color-gray-100); color: var(--text-dark); }
.nav-links a.active { background-color: var(--color-primary-light); color: var(--color-primary); }
.nav-icon { flex-shrink: 0; }
.btn-sidebar-submit {
  margin-top: 20px;
}
.nav-links a.btn-sidebar-submit,
.nav-links a.btn-sidebar-submit.active {
  background: var(--color-primary);
  color: #fff !important;
}
.nav-links a.btn-sidebar-submit:hover,
.nav-links a.btn-sidebar-submit.active:hover {
  background: var(--color-primary-dark);
  color: #fff !important;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lang-select {
  margin-bottom: 24px;
  padding: 10px;
  background: var(--color-gray-50);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 100%;
  font-family: inherit;
}

/* Buttons */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline {
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.15s;
  background: var(--card-bg);
  display: inline-block;
  text-align: center;
}
.btn-outline:hover { background: var(--color-gray-100); border-color: var(--color-gray-300); }

/* Hero screen — fills the remaining space in the fit-viewport shell (see
   .main-wrapper.fit-viewport) so hero+stats+map are all visible with no
   page scroll, without hard-coding a vh figure that drifts out of sync
   with the actual header/footer height. */
.hero-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
  flex: 1;
  min-height: 0;
  padding: var(--space-3) 0;
}
/* Never let flexbox silently squash+clip these below their readable
   content height — if space is too tight, .container's overflow-y:auto
   takes over instead (see .fit-viewport .container). */
.hero-screen > * { flex-shrink: 0; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 20px var(--space-6);
  background-color: var(--color-gray-50);
  /* Layers (top to bottom): dot grid, white scrim that fades in from the
     right (keeps hero-content's text/search fully legible on the left),
     then the watermark photo pinned to the right edge. */
  background-image:
    radial-gradient(circle at 1px 1px, var(--color-gray-300) 1px, transparent 0),
    linear-gradient(to left, rgba(248, 250, 252, 0.82) 0%, rgba(248, 250, 252, 0.99) 55%),
    url('../img/hero-bg.jpg');
  background-size: 26px 26px, cover, cover;
  background-position: 0 0, 0 0, right center;
  background-repeat: repeat, no-repeat, no-repeat;
  isolation: isolate;
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.65;
  z-index: -1;
  animation: blob-float 14s ease-in-out infinite;
  pointer-events: none;
}
.hero::before {
  width: 460px;
  height: 460px;
  top: -200px;
  left: -120px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 72%);
}
.hero::after {
  width: 420px;
  height: 420px;
  bottom: -220px;
  right: -100px;
  background: radial-gradient(circle, var(--color-secondary) 0%, transparent 72%);
  animation-delay: -7s;
}
@keyframes blob-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, -22px) scale(1.1); }
}
.hero-content { position: relative; z-index: 1; max-width: 680px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-white);
  border: 1px solid var(--border-color);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
  box-shadow: var(--shadow-sm);
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-dot 1.8s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}
.hero h1 { font-size: 32px; margin-bottom: var(--space-2); color: var(--text-dark); }
.hero p { font-size: 15px; color: var(--text-muted); margin-bottom: var(--space-3); max-width: 620px; }

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin-bottom: var(--space-1);
}
.hero-search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.hero-search-icon {
  position: absolute;
  left: 16px;
  font-size: 15px;
  pointer-events: none;
  opacity: 0.6;
}
.hero-search-input-wrap input {
  width: 100%;
  padding: 13px 16px 13px 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--color-white);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.hero-search-input-wrap input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.hero-search .btn-primary { border-radius: var(--radius-full); padding: 13px 24px; white-space: nowrap; }

.hero-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-actions .btn-primary,
.hero-actions .btn-outline { transition: transform 0.15s ease, background 0.15s, box-shadow 0.15s; }
.hero-actions .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.hero-actions .btn-outline:hover { transform: translateY(-2px); }

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.hero-screen .stats-strip { margin: 0; }
.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: stat-fade-in 0.5s ease both;
}
.stat-card:nth-child(1) { animation-delay: 0s; }
.stat-card:nth-child(2) { animation-delay: 0.08s; }
.stat-card:nth-child(3) { animation-delay: 0.16s; }
@keyframes stat-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .stat-number { font-size: 26px; font-weight: 800; color: var(--color-primary); }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.section-title {
  font-size: 24px;
  margin: var(--space-7) 0 var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title a { font-size: 14px; color: var(--color-primary); text-decoration: none; font-weight: 700; }

/* Search Bar */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}
.search-bar input, .search-bar select {
  padding: 13px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-dark);
  font-size: 14px;
  flex: 1;
  min-width: 160px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
.search-bar input:focus, .search-bar select:focus { border-color: var(--color-primary); }
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  font-size: 14px;
  color: var(--text-dark);
  white-space: nowrap;
  cursor: pointer;
}
.filter-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
  padding-bottom: var(--space-6);
}

/* Card */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-gray-300);
}
.card-link-wrap { display: block; text-decoration: none; color: inherit; }

.card-cover {
  height: 180px;
  position: relative;
  background-color: var(--color-gray-100);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255,255,255,0.95);
  color: var(--text-dark);
  border: 1px solid rgba(0,0,0,0.08);
}
.badge-featured {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.badge-tech {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  font-size: 10px;
}

.bookmark-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 10;
}
.bookmark-btn:hover { transform: scale(1.1); }
.bookmark-btn.saved { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.card-logo-wrap {
  position: absolute;
  bottom: -24px;
  left: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--card-bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  z-index: 2;
}
.card-logo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }

.card-content { padding: 34px 18px 18px; flex: 1; }
.card-title { color: var(--text-dark); font-size: 18px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.location-text { color: var(--text-muted); font-size: 13px; margin-bottom: 10px; }
.card-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.metrics { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.metrics span, .tech-tag {
  background: var(--color-gray-100);
  padding: 4px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tech-tag { background: var(--color-primary-light); color: var(--color-primary); font-weight: 600; }
/* Darker than --color-secondary on purpose: sky-500 text on this light tint
   background only measures ~2.5:1 contrast (fails WCAG AA); sky-700 clears 5:1. */
.provider-tag { background: rgba(14,165,233,0.12); color: #0369A1; font-weight: 600; }

/* Skeleton loading state */
.skeleton-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  height: 360px;
  display: flex;
  flex-direction: column;
}
.skeleton-card .skeleton-cover { height: 180px; background: var(--color-gray-100); }
.skeleton-card .skeleton-line {
  height: 12px;
  margin: 18px 18px 0;
  border-radius: 4px;
  background: var(--color-gray-100);
}
.skeleton-card .skeleton-line.short { width: 50%; }
.skeleton-cover, .skeleton-line {
  background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 37%, var(--color-gray-100) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; color: var(--text-muted); }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-family: inherit;
  background: var(--card-bg); color: var(--text-dark); font-size: 14px;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}
.admin-editor {
  background: var(--card-bg); padding: 40px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); max-width: 800px;
  box-shadow: var(--shadow-sm);
}

/* Ad slots - fixed heights per standard IAB sizes so real AdSense units never shift layout */
.ad-slot {
  width: 100%;
  background-color: var(--color-gray-50);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--color-gray-400);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: var(--space-6) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}
.ad-slot.ad-slot-rectangle { min-height: 280px; max-width: 336px; margin-left: auto; margin-right: auto; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 40px; }
.pagination-status { color: var(--text-muted); font-size: 14px; }

/* Ecosystem network — interactive SVG replacing the old Google GeoChart */
.network-section {
  margin: 0;
  background: var(--card-bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}
.network-header { text-align: center; margin-bottom: var(--space-2); }
.network-header h2 { font-size: 17px; margin-bottom: 3px; }
.network-header p { color: var(--text-muted); font-size: 12px; }
.network-svg-wrap { width: 100%; }

.startup-leaflet-map {
  width: 100%;
  height: min(265px, 30vh);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,0.1));
}
.startup-leaflet-map .marker-cluster-small,
.startup-leaflet-map .marker-cluster-medium,
.startup-leaflet-map .marker-cluster-large {
  background-clip: padding-box;
}
.startup-leaflet-map .marker-cluster div {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

/* About modal */
#about-modal-trigger { cursor: pointer; }
body.modal-open { overflow: hidden; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 2000;
  animation: modal-fade-in 0.15s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  position: relative;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-6);
  animation: modal-pop-in 0.18s ease;
}
@keyframes modal-pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal h2 { font-size: 22px; margin-bottom: var(--space-3); padding-right: var(--space-5); color: var(--text-dark); }
.modal p { color: var(--text-muted); font-size: 15px; line-height: 1.7; margin-bottom: var(--space-3); }
.modal .btn-primary { display: inline-block; margin-top: var(--space-2); }
.modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-gray-50);
  color: var(--text-dark);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.modal-close:hover { background: var(--color-gray-300); }

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .mobile-header { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }

  .main-wrapper { margin-left: 0; padding-top: 60px; }
  .container { padding: 20px; }

  /* Larger touch targets on mobile (44px minimum per WCAG/Apple/Google
     guidance) — desktop keeps the tighter, mouse-friendly sizing. */
  .nav-links a { padding: 13px 14px; font-size: 16px; }
  .bookmark-btn { width: 40px; height: 40px; }
  .lang-select { padding: 12px 10px; min-height: 44px; }

  /* On mobile everything reverts to normal document scroll — trying to
     lock content into exactly one screen doesn't work once the sidebar
     becomes a hamburger menu and content stacks vertically. */
  .main-wrapper.fit-viewport { height: auto; overflow: visible; }
  .fit-viewport .container { flex: none; overflow: visible; }

  .search-bar { flex-direction: column; gap: 10px; }
  .search-bar input, .search-bar select, .search-bar button { width: 100%; }

  .hero-screen { flex: none; }
  .hero {
    padding: var(--space-6) var(--space-4);
    /* Narrow screens have no room for the left-text/right-photo split, so
       fade the watermark uniformly and much fainter behind the text. */
    background-image:
      radial-gradient(circle at 1px 1px, var(--color-gray-300) 1px, transparent 0),
      linear-gradient(rgba(248, 250, 252, 0.93), rgba(248, 250, 252, 0.93)),
      url('../img/hero-bg.jpg');
    background-position: 0 0, 0 0, center;
  }
  .hero h1 { font-size: 30px !important; }
  .hero p { font-size: 15px !important; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary, .hero-actions .btn-outline { width: 100%; }

  .stats-strip { grid-template-columns: 1fr; }

  .admin-editor { padding: 20px; }
  .admin-editor div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  .startup-leaflet-map { height: 300px; }
}
