/* =========================================================
   GLOBAL RESET AND THEME
   ========================================================= */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #1f2937;
  --muted: #5b687a;
  --border: #dbe3ee;
  --primary: #4f46e5;
  --primary-dark: #4037d3;
  --secondary: #0f766e;
  --secondary-soft: #dff6f2;
  --success-soft: #dff3e4;
  --success-text: #1f6b3a;
  --danger-soft: #f8dfe2;
  --danger-text: #8d2830;
  --warning-soft: #fff4cc;
  --warning-text: #7a6200;
  --blue-soft: #dde8ff;
  --blue-text: #1e4ea1;
  --orange-soft: #fce8d5;
  --orange-text: #8a4f08;
  --shadow-sm: 0 6px 18px rgba(31, 41, 55, 0.06);
  --shadow-md: 0 14px 34px rgba(31, 41, 55, 0.08);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --max-width: 1280px;
}

/* =========================================================
   BASE ELEMENTS
   ========================================================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
  color: var(--text);
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-block {
  padding: 34px 0 42px 0;
}

/* =========================================================
   STICKY TOPBAR
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.brand-subtitle {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  background: #edf2ff;
  color: var(--primary);
}

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero-section {
  padding: 34px 0 22px 0;
}

.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 24px;
}

.hero-pill {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: #edf2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.hero-text h1 {
  margin: 16px 0 14px 0;
  font-size: 42px;
  line-height: 1.15;
  color: var(--text);
}

.hero-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.85;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mini-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.mini-panel h3 {
  margin: 0 0 10px 0;
  font-size: 17px;
  color: var(--text);
}

.mini-panel p,
.mini-panel li {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}

.mini-panel ul,
.mini-panel ol {
  margin: 0;
  padding-left: 20px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #eef3ff;
  color: var(--primary);
}

.btn-secondary:hover {
  background: #e1e9ff;
}

.btn-clear {
  background: #1f7a48;
  color: #ffffff;
}

.btn-clear:hover {
  background: #17653a;
}

/* =========================================================
   SHARED SECTION HEADER
   ========================================================= */
.section-card,
.map-card,
.info-card,
.tool-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.section-card {
  padding: 24px;
}

.section-title-wrap {
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title-wrap h2,
.section-header h2,
.info-card h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
}

.section-description {
  margin: 10px 0 0 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.8;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

/* =========================================================
   STATS CARDS
   ========================================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.stat-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

/* =========================================================
   RESULTS STATUS + RESULTS PANEL
   ========================================================= */
.results-status {
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
}

.info-status {
  background: #eef5ff;
  border-color: #d7e6ff;
  color: #2453a6;
}

.success-status {
  background: #edf9f1;
  border-color: #d7efdf;
  color: #1d6c3c;
}

.warning-status {
  background: #fff8e1;
  border-color: #f3e4a1;
  color: #7a6200;
}

.error-status {
  background: #fdecef;
  border-color: #f3ccd3;
  color: #8d2830;
}

.results-panel {
  background: #f8fbfe;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  min-height: 140px;
}

.results-panel p,
.results-panel li {
  margin: 8px 0;
  font-size: 15px;
  line-height: 1.8;
  color: #374151;
}

.results-panel ul {
  margin: 10px 0 10px 20px;
  padding: 0;
}

.results-panel hr {
  border: none;
  border-top: 1px solid #e5ebf2;
  margin: 14px 0;
}

/* =========================================================
   MAP SECTION
   ========================================================= */
.map-section {
  padding-top: 10px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.tool-card {
  padding: 18px;
}

.tool-card h3 {
  margin: 0 0 8px 0;
  font-size: 17px;
  color: var(--text);
}

.tool-card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

.map-card {
  padding: 10px;
  overflow: hidden;
}

#viewDiv {
  width: 100%;
  height: 72vh;
  min-height: 600px;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

/* =========================================================
   INFO SECTION
   ========================================================= */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  padding: 22px;
}

.info-card p,
.info-card li {
  font-size: 15px;
  line-height: 1.85;
  color: #374151;
}

.info-card ol {
  margin: 0;
  padding-left: 20px;
}

/* =========================================================
   BADGES
   ========================================================= */
.result-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-yes {
  background: var(--success-soft);
  color: var(--success-text);
}

.badge-no {
  background: var(--danger-soft);
  color: var(--danger-text);
}

.badge-low {
  background: var(--orange-soft);
  color: var(--orange-text);
}

.badge-medium {
  background: var(--warning-soft);
  color: var(--warning-text);
}

.badge-high {
  background: var(--success-soft);
  color: var(--success-text);
}

.badge-rating {
  background: var(--blue-soft);
  color: var(--blue-text);
}

/* =========================================================
   FOOTER
   ========================================================= */
.page-footer {
  margin-top: 8px;
  padding: 24px 0 38px 0;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
}

.footer-inner p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 14.5px;
}

/* =========================================================
   BACK TO TOP BUTTON
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 1120px) {
  .hero-card {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .container {
    padding: 0 16px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
  }

  .hero-card {
    padding: 24px;
  }

  .hero-text h1 {
    font-size: 31px;
  }

  .hero-lead {
    font-size: 15.5px;
  }

  .section-title-wrap h2,
  .section-header h2,
  .info-card h2 {
    font-size: 24px;
  }

  .tool-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  #viewDiv {
    height: 60vh;
    min-height: 460px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}