@import url("https://fonts.gstatic.com/s/dmmono/v14/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2");

:root {
  --primary-color: #1eea89;
  --primary-hover: #0dd375;
  --secondary-color: #074a2b;
  --accent-color: #e31837;

  --text-color: #0d0d0d;
  --light-text: #5f5f5f;
  --background-color: #ffffff;
  --section-background: rgba(255, 255, 255, 0.95);
  --section-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);

  --transition-speed: 0.3s;
  --header-height: 50px;
  --footer-height: 30px;
  --sidebar-width: 400px;
  --section-padding: 10px;
  --border-radius: 7px;

  --status-unknown: #686a68;
  --status-approved: #1eea89;
  --status-deferred: #ffd11a;
  --status-approved-conditions: #0dd375;
  --status-rejected: #e84a4a;
  --status-public-hearing: #5f5f5f;
  --status-withdrawn: #9c9d9c;

  --category-single-family: #8e44ad;
  --category-multi-family: #9b59b6;
  --category-office: #1abc9c;
  --category-industrial: #f39c12;
  --category-retail: #3498db;
  --category-hospitality: #2980b9;
  --category-mixed-use: #e74c3c;
  --category-marina: #00bcd4;
  --category-self-storage: #795548;
  --category-air-hangar: #607d8b;
  --category-rv-park: #ff9800;
  --category-school: #4caf50;

  /* Add font family variable */
  --primary-font: "DM Mono", monospace;
}
.color-primary {
  color: var(--primary-color);
}

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

html,
body {
  height: 100%;
  font-family: var(--primary-font);
  color: var(--text-color);
  scroll-behavior: smooth;
  overscroll-behavior: none;
  overflow-y: hidden;
}

body {
  overflow-x: hidden;
  background-color: var(--background-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--secondary-color);
}

button {
  cursor: pointer;
  font-family: var(--primary-font);
  border: none;
  outline: none;
}

.highlight {
  color: var(--primary-color);
  font-weight: 600;
}

#story-container {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: auto !important;
}

.story-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: #ffffff;
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  padding: 0 15px;
}

.brand {
  display: flex;
  align-items: center;
}

.logo {
  height: 35px;
  width: auto;
}

#story-title {
  color: #000000;
  font-size: 1.5rem;
  font-family: var(--primary-font);
  margin: 0;
  text-align: center;
  flex-grow: 1;
}

.share-header {
  display: flex;
}

.share-btn {
  background-color: white;
  color: var(--primary-color);
  border-radius: 4px;
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-speed);
}

.share-btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

main {
  flex: 1;
  position: relative;
  padding-top: var(--header-height);
  padding-bottom: var(--footer-height);
  z-index: 2;
  height: auto;
  min-height: 100vh;
  overflow-y: visible;
}

#map {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  z-index: 1;
  pointer-events: auto;
}

#features {
  position: absolute;
  top: 0;
  right: 4%;
  margin-top: var(--header-height);
  margin-bottom: var(--footer-height);
  z-index: 10;
  pointer-events: none;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  width: var(--sidebar-width);
  transition: transform 0.3s ease;
  background: transparent;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}

/* Hide scrollbar for WebKit browsers */
#features::-webkit-scrollbar {
    display: none;
}

/* Make interactive elements within #features capture pointer events */
.section-inner {
  pointer-events: none; /* Let map clicks pass through by default */
}

/* Only make specific interactive elements capture pointer events */
#features button, 
#features input, 
#features select,
#features textarea,
#features a,
#features .spotlight-card,
#features .filter-option,
#features .category-btn,
#features .social-share-btn,
#features .timeline-slider,
#features .cta-button,
#features h1,
#features h2,
#features h3,
#features h4,
#features h5,
#features h6,
#features label {
  pointer-events: auto; /* These elements should still be interactive */
}

/* Special handling for scrollable containers */
.section-inner.scrollable {
  pointer-events: auto; /* Enable pointer events for scrollable sections */
}

section {
  opacity: 0;
  margin-bottom: 60px;
  transition: opacity var(--transition-speed);
  min-height: auto;
  display: flex;
  align-items: flex-start;
  padding-top: 20px;
  position: relative;
  z-index: 10;
  pointer-events: none;
  width: 100%;
  right: 0;
  overflow: hidden;
}

section.active {
  opacity: 1;
  pointer-events: none; /* Keep map interaction working by default */
}

/* Add a class that can be toggled via JS when scrolling is needed */
section.active.needs-scroll .section-inner {
  pointer-events: auto;
}

/* For mobile devices, enable pointer events on active sections */
@media (max-width: 768px) {
  section.active {
    pointer-events: auto; /* Mobile needs full interaction with active sections */
  }
  
  #features.visible {
    transform: translateX(0);
    scroll-snap-type: y mandatory;
    pointer-events: auto; /* Enable pointer events when panel is visible on mobile */
  }
}

.section-inner {
  background-color: var(--section-background);
  padding: var(--section-padding);
  border-radius: var(--border-radius);
  box-shadow: var(--section-shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 100%;
  margin: 10px;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
  overscroll-behavior: contain;
}

.section-inner::-webkit-scrollbar {
  display: none;
}

.section-inner::-webkit-scrollbar-track {
  background: transparent;
}

.section-inner::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 3px;
}

.stats {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--light-text);
}

.ui-component {
  margin: 5px 0;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
}

.filter-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.filter-option {
  display: flex;
  align-items: center;
}

.filter-option input[type="checkbox"] {
  margin-right: 8px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 15px;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.legend-color {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin-right: 6px;
}

.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* .category-btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

.category-btn.active {
  background-color: var(--primary-color);
  color: white;
} */

.category-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.category-stat {
  text-align: center;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: var(--border-radius);
  border-top: 3px solid var(--secondary-color);
}

.category-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.category-stat-label {
  font-size: 0.8rem;
  color: var(--light-text);
}

.spotlight-cards {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

.spotlight-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed);
  cursor: pointer;
  position: relative;
}

.spotlight-card:hover {
  transform: translateY(-5px);
}

.spotlight-header {
  padding: 15px;
  background-color: var(--primary-color);
  color: rgb(0, 0, 0);
}

.spotlight-title {
  font-size: 1.1rem;
  margin: 0;
  color: rgb(0, 0, 0);
}

.spotlight-body {
  padding: 15px 15px 0 15px;
}

.spotlight-detail {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.spotlight-label {
  font-weight: 600;
  margin-right: 5px;
}

.spotlight-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: var(--secondary-color);
  color: white;
}

.timeline-component {
  padding: 20px;
}

.timeline-controls {
  margin-bottom: 15px;
  text-align: center;
}

.timeline-btn {
  background-color: var(--primary-color);
  padding: 8px 16px;
  border-radius: 20px;
  transition: background-color var(--transition-speed);
}

.timeline-btn:hover {
  background-color: var(--secondary-color);
}

.timeline-btn i {
  margin-right: 5px;
}

.timeline-slider-container {
  margin: 20px 0;
}

.timeline-dates {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--light-text);
}

.timeline-slider {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  background: #e0e0e0;
  border-radius: 3px;
  outline: none;
  margin: 15px 0;
}

.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.timeline-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
}

.timeline-current-date {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 10px 0;
}

.timeline-info {
  text-align: center;
  margin-top: 15px;
}

.timeline-stat {
  font-size: 1.1rem;
}

.timeline-stat span {
  font-weight: 700;
  color: var(--primary-color);
}

.impact-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
  justify-content: space-between;
}

.impact-metric {
  flex: 1 1 calc(33.333% - 10px);
  min-width: 100px;
  max-width: calc(33.333% - 10px);
  padding: 10px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-metric:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.metric-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.metric-label {
  color: var(--light-text);
}

.impact-chart-container {
  margin-top: 30px;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  overflow-x: hidden;
}

.chart-title {
  text-align: center;
  margin-bottom: 15px;
  font-weight: 600;
  color: var(--primary-color);
}

.chart {
  height: 250px;
  width: 100%;
  max-width: 100%;
}

.cta-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 10px 0;
  z-index: 1;
  position: relative;
}

.cta-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 5px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed);
  position: relative;
  z-index: 1;
}

/* Styling for the single call-to-action card */
.single-cta {
  max-width: 600px;
  margin: 30px auto;
  padding: 30px;
  border-top: 4px solid var(--primary-color);
  grid-column: 1 / -1;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.single-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.single-cta h4 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.single-cta p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 25px;
}

.cta-card:hover {
  transform: translateY(-5px);
}

.cta-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.cta-card h3 {
  margin-bottom: 10px;
}

.cta-card p {
  font-size: 0.9rem;
  margin-bottom: 20px;
  color: var(--light-text);
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  padding: 8px 16px;
  border-radius: 20px;
  transition: background-color var(--transition-speed);
  color: #000000;
  text-decoration: none;
}

.cta-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.single-cta .cta-button {
  padding: 12px 30px;
  font-size: 1.1rem;
  margin-top: 10px;
  border-radius: 25px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-hover)
  );
  box-shadow: 0 4px 10px rgba(30, 234, 137, 0.3);
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.single-cta .cta-button:hover {
  background: linear-gradient(
    90deg,
    var(--primary-hover),
    var(--primary-color)
  );
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(30, 234, 137, 0.4);
}

.share-cta {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.social-share-btn {
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 4px;
  background-color: #f5f5f5;
  color: #333;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 5px;
}

.social-share-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.social-share-btn i {
  margin-right: 5px;
}

.map-controls {
  position: fixed;
  bottom: calc(var(--footer-height) + 40px);
  left: 10px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-control-btn {
  width: auto;
  min-width: 120px;
  height: 40px;
  border-radius: 20px;
  color: black;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-speed);
  padding: 0 15px;
  gap: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.map-control-btn:hover {
  background-color: var(--primary-color);
  color: black;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.map-control-btn i {
  font-size: 1.1rem;
}

.map-control-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.map-control-btn.active {
  background-color: var(--primary-color);
  color: black;
}

.story-progress {
  position: fixed;
  top: 45%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 100;
}

.progress-markers {
  display: flex;
  flex-direction: column;
  gap: 15px;
  counter-reset: markerCounter; /* Initialize counter */
}

.marker {
  width: 28px; /* Increased size for padding */
  height: 28px; /* Increased size for padding */
  /* border-radius: 50%; */ /* Remove border-radius */
  /* background-color: white; */ /* Remove default background */
  /* border: 2px solid var(--primary-color); */ /* Remove border */
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  counter-increment: markerCounter; /* Increment counter */
  display: flex; /* Use flexbox for centering */
  align-items: center;
  justify-content: center;
  font-size: 0.85rem; /* Size for the number */
  font-weight: 700; /* Make number bolder */
  /* color: var(--light-text); */ /* Default number color */
  /* background-color: #f0f0f0; */ /* Default background */
  color: #333; /* Default number color - darker */
  background-color: white; /* Clear default background */
  border: 1px solid #ccc; /* Add border for definition */
  border-radius: 50%; /* Make it circular */
}

.marker::before {
  content: counter(markerCounter); /* Display the counter value */
}

.marker:hover {
  /* transform: scale(1.3); */ /* Remove scaling */
  /* background-color: #e0e0e0; */ /* Subtle hover background */
  background-color: #f5f5f5; /* Slightly off-white hover */
  border-color: #aaa;
}

.marker.active {
  background-color: var(--primary-color);
  /* transform: scale(1.3); */ /* Remove scaling */
  color: black; /* Number color when active - good contrast */
  border-color: var(--primary-color); /* Match border to background */
}

/* Keep completed distinct but less prominent than active */
.marker.completed:not(.active) {
  /* background-color: var(--light-text); */ /* Darker gray background */
  /* color: white; */ /* White number for contrast */
  background-color: #bbb; /* Medium gray for completed */
  color: white;
  border-color: #bbb; /* Match border */
}

.marker-tooltip {
  position: absolute;
  right: 34px; /* Adjust position based on new marker size */
  top: 2px; /* Adjust vertical alignment */
  background-color: var(--primary-color);
  color: black;
  padding: 6px 10px;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed), transform var(--transition-speed);
  transform: translateX(10px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Ensure these selectors don't override the new completed style */
/* .marker.completed {
  background-color: var(--primary-color);
} */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: white;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
  margin: 0;
}

.close-modal {
  background: none;
  font-size: 1.5rem;
  color: var(--light-text);
  cursor: pointer;
}

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

.modal-body {
  padding: 20px;
}

.share-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.share-option {
  flex: 1;
  min-width: 120px;
  padding: 10px;
  text-align: center;
  border-radius: 4px;
  background-color: #f0f0f0;
  transition: all var(--transition-speed);
}

.share-option:hover {
  background-color: var(--primary-color);
  color: white;
}

.copy-link {
  display: flex;
  margin: 20px 0;
}

.copy-link input {
  flex: 1;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px 0 0 4px;
}

#copy-link-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 15px;
  border-radius: 0 4px 4px 0;
}

.embed-code {
  margin-top: 20px;
}

.embed-code h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.embed-code textarea {
  width: 100%;
  height: 80px;
  padding: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  resize: none;
  margin-bottom: 10px;
  font-family: var(--primary-font);
  font-size: 0.9rem;
}

#copy-embed-btn {
  background-color: var(--primary-color);
  color: white;
  padding: 8px 15px;
  border-radius: 4px;
}

.story-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background-color: #ffffff;
  color: #000000;
  z-index: 1000;
}

.footer-content {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.footer-logo img {
  height: 30px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #000000;
  font-size: 0.9rem;
  font-family: var(--primary-font);
}

.footer-copyright {
  font-size: 0.9rem;
  opacity: 0.8;
  color: #000000;
  font-family: var(--primary-font);
}

/* Enhanced Popup Styles */
.mapboxgl-popup {
  font-family: var(--primary-font) !important;
}

.mapboxgl-popup-content {
  padding: 10px;
  border-radius: 8px;
  max-width: 380px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-family: var(--primary-font);
}

/* Improved popup close button */
.mapboxgl-popup .mapboxgl-popup-close-button {
  position: absolute;
  font-size: 20px;
  width: 30px;
  height: 30px;
  line-height: 26px;
  text-align: center;
  color: #333;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  right: 5px;
  top: 5px;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mapboxgl-popup .mapboxgl-popup-close-button:hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* Popup content styling */
.popup-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: var(--primary-color);
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.popup-detail {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  margin-bottom: 8px;
  align-items: center;
}

.popup-label {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
  min-width: 110px;
}

.popup-detail > span:last-child {
  text-align: right;
  justify-self: end;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
}

/* Mobile-specific popup styles */
@media (max-width: 768px) {
  .mapboxgl-popup {
    max-width: 90vw !important;
    width: 90vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    top: 10% !important;
  }

  .mapboxgl-popup-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 12px;
    border-radius: 8px;
  }

  .mapboxgl-popup-tip {
    display: none !important;
  }

  .mapboxgl-popup-anchor-top-left,
  .mapboxgl-popup-anchor-top-right,
  .mapboxgl-popup-anchor-top,
  .mapboxgl-popup-anchor-bottom-left,
  .mapboxgl-popup-anchor-bottom-right,
  .mapboxgl-popup-anchor-bottom,
  .mapboxgl-popup-anchor-left,
  .mapboxgl-popup-anchor-right {
    transform: translateX(-50%) !important;
  }

  .popup-content {
    max-width: 100%;
  }

  .popup-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .popup-detail {
    grid-template-columns: 100px 1fr;
    gap: 6px;
    font-size: 0.9rem;
  }

  .map-control-btn {
    min-width: 100px;
    height: 36px;
    padding: 0 12px;
  }
  
  .map-control-label {
    font-size: 0.8rem;
  }

  .impact-metrics {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
    margin: 20px 0;
    width: 100%;
  }

  .impact-metric {
    flex: none;
    width: 100%;
    margin: 0;
    min-width: 100%;
    max-width: 100%;
    padding: 20px;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }

  .metric-value {
    font-size: 2.5rem;
  }

  .metric-label {
    font-size: 1rem;
  }
}

@media (max-width: 992px) {
  :root {
    --sidebar-width: 320px;
  }

  .cta-cards {
    grid-template-columns: 1fr;
  }

  .single-cta {
    padding: 20px;
    margin: 20px auto;
  }

  .impact-metrics {
    gap: 15px;
  }

  .category-stat-value {
    font-size: 1rem;
  }

  .stats {
    margin: 0;
  }

  #call-to-action .section-inner {
    max-height: 75vh;
  }

  .social-share-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 500px) {
  .category-btn {
    padding: 3px 6px !important;
    font-size: 0.75rem !important;
  }

  .single-cta {
    padding: 15px;
    margin: 15px auto;
  }

  .single-cta .cta-button {
    padding: 8px 20px;
    font-size: 1rem;
  }

  .impact-metric {
    flex-direction: column;
  }
  .metric-label {
    font-size: 0.7rem;
  }
  .cta-icon {
    font-size: 1.2rem !important;
    color: var(--primary-color);
    margin-bottom: 0 !important;
  }
  .scroll-hint {
    display: none !important;
  }

  #call-to-action .section-inner {
    max-height: 70vh;
    padding: 15px;
  }

  .share-buttons {
    justify-content: center;
  }

  .social-share-btn {
    flex: 0 0 calc(50% - 5px);
    justify-content: center;
  }

  .impact-metrics {
    gap: 10px;
    padding: 0 5px;
  }
}
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --sidebar-width: 100%;
  }

  main {
    padding-top: var(--header-height);
    padding-bottom: 0;
    height: 100vh;
    overflow: hidden;
  }

  #map {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    z-index: 1;
  }

  #features {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 85%;
    height: calc(100vh - var(--header-height));
    margin: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    background: transparent;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #features.visible {
    transform: translateX(0);
    scroll-snap-type: y mandatory;
  }

  section {
    margin: 0;
    padding: 0;
    min-height: auto;
    opacity: 0;
    pointer-events: none;
    height: auto;
    transition: opacity 0.3s ease-in-out;
    background: transparent;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  section.active {
    opacity: 1;
    pointer-events: auto;
  }

  .section-inner {
    background: rgba(255, 255, 255, 0.98);
    margin: 10px;
    padding: 15px;
    max-height: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .story-footer {
    display: none;
  }

  /* Adjust content spacing */
  .stats {
    margin: 10px 0;
  }

  .impact-metrics {
    margin: 10px 0;
  }

  .spotlight-cards {
    margin: 10px 0;
  }

  /* Ensure proper spacing for the last section */
  section:last-child {
    margin-bottom: 10px;
  }
}

/* Additional mobile optimizations */
@media (max-width: 380px) {
  #features {
    width: 100%;
  }

  .section-inner {
    margin: 8px;
    padding: 12px;
  }

  .impact-metrics {
    gap: 10px;
    padding: 0 5px;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fadeIn {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slideIn {
  animation: slideIn 0.5s ease-in-out;
}

.pulsing-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: red;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

html.page-loading {
  scroll-behavior: auto !important;
  overflow-y: hidden;
}

html.page-ready {
  scroll-behavior: smooth;
  overflow-y: auto;
}

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 83, 155, 0.2);
  border-top-color: rgb(30 234 137);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.status-approved {
  background-color: var(--status-approved);
  color: black;
}

.status-deferred {
  background-color: var(--status-deferred);
  color: black;
}

.status-approved-conditions {
  background-color: var(--status-approved-conditions);
  color: black;
}

.status-rejected {
  background-color: var(--status-rejected);
  color: white;
}

.status-public-hearing {
  background-color: var(--status-public-hearing);
  color: white;
}

.status-withdrawn {
  background-color: var(--status-withdrawn);
  color: black;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.legend-color {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  margin-right: 8px;
}

.category-btn {
  padding: 6px 12px;
  background-color: #f0f0f0;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all var(--transition-speed);
  border: 1px solid transparent;
}

.spotlight-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed),
    box-shadow var(--transition-speed);
  cursor: pointer;
  position: relative;
  border-left: 4px solid var(--primary-color);
}

.spotlight-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.spotlight-header {
  padding: 15px;
  background-color: var(--primary-color);
  color: white;
}

.mapboxgl-popup-content {
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  border-top: 4px solid var(--primary-color);
}

.popup-content h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.1rem;
  color: var(--primary-color);
  font-weight: 600;
}

.popup-detail {
  margin-bottom: 8px;
  font-size: 0.95rem;
  display: inline-block;
  align-items: baseline;
}

.popup-label {
  font-weight: 600;
  min-width: 100px;
  color: var(--light-text);
}

.impact-chart-container {
  margin-top: 30px;
  background-color: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
}

.chart-title {
  text-align: center;
  margin-bottom: 15px;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.chart {
  height: 300px;
  width: 100%;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 2px 0;
}

.filter-option input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
}

.filter-option label {
  font-size: 0.8rem;
  cursor: pointer;
}

.impact-metric {
  text-align: center;
  flex: 1;
  padding: 5px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--primary-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.impact-metric:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.metric-icon {
  font-size: 1.2rem;
  color: var(--primary-color);
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.metric-label {
  color: var(--light-text);
}

.marker {
  border-radius: 50%;
  background-color: white;
  border: 2px solid var(--primary-color);
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.marker:hover,
.marker.active {
  background-color: var(--primary-color);
  transform: scale(1.3);
}

.marker.completed {
  background-color: var(--primary-color);
}

.marker-tooltip {
  position: absolute;
  right: 24px;
  top: -5px;
  background-color: var(--primary-color);
  color: black;
  padding: 6px 10px;
  border-radius: var(--border-radius);
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-speed), transform var(--transition-speed);
  transform: translateX(10px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.marker:hover .marker-tooltip {
  opacity: 1;
  transform: translateX(0);
}

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(30, 234, 137, 0.2);
  border-top-color: #1eea89;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.marker.completed {
  background-color: var(--primary-color);
}

.status-approved {
  background-color: var(--status-approved);
  color: black;
}

.status-deferred {
  background-color: var(--status-deferred);
  color: black;
}

.status-approved-conditions {
  background-color: var(--status-approved-conditions);
  color: black;
}

.status-rejected {
  background-color: var(--status-rejected);
  color: white;
}

.status-public-hearing {
  background-color: var(--status-public-hearing);
  color: white;
}

.status-withdrawn {
  background-color: var(--status-withdrawn);
  color: black;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--primary-font);
}

/* Add styles for Call to Action section */
#call-to-action .section-inner {
  overflow-y: visible;
  padding-bottom: 20px !important;
}

/* Hide scroll indicator in Call to Action section permanently */
#call-to-action .scroll-indicator {
  display: none !important;
}

/* Improve social media buttons layout */
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
}

.social-share-btn {
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 4px;
  background-color: #f5f5f5;
  color: #333;
  transition: all 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px;
}

.social-share-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

#status-filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

#status-filters div {
  display: flex;
  align-items: center;
  gap: 8px;
}

#status-filters input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

#status-filters label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

#status-filters input[type="checkbox"]:checked + label {
  font-weight: 500;
} 

/* Responsive adjustments for the call to action section */
@media (max-width: 992px) {
  .social-share-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }
}

@media (max-width: 500px) {
  #call-to-action .section-inner {
    padding: 15px;
  }

  .share-buttons {
    justify-content: center;
  }

  .social-share-btn {
    flex: 0 0 calc(50% - 10px);
    justify-content: center;
  }
}

/* Additional compact styles for Call to Action section */
#call-to-action .cta-cards {
  margin-bottom: 15px;
}

#call-to-action .single-cta {
  max-width: 100%;
  padding: 12px;
  margin: 0;
  border-top-width: 3px;
}

#call-to-action .single-cta h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

#call-to-action .single-cta p {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

#call-to-action .single-cta .cta-button {
  padding: 6px 15px;
  font-size: 0.85rem;
  margin-top: 0;
}

#call-to-action .single-cta .cta-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

/* Compact share section */
#call-to-action .share-cta {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #eee;
}

#call-to-action .share-cta h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

#call-to-action .share-buttons {
  gap: 5px;
  margin-top: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

#call-to-action .social-share-btn {
  padding: 5px 8px;
  font-size: 0.8rem;
  flex: 0 0 auto;
}

/* Make sure section height doesn't exceed viewport */
@media (max-height: 700px) {
  #call-to-action .section-inner {
    max-height: 65vh;
  }

  #call-to-action .single-cta {
    padding: 10px;
  }

  #call-to-action .single-cta .cta-icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
  }

  #call-to-action .single-cta h4 {
    font-size: 1rem;
    margin-bottom: 5px;
  }

  #call-to-action .single-cta p {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }
}

/* Add toggle button for mobile */
.sections-toggle {
  display: none;
  position: fixed;
  right: 20px;
  top: calc(var(--header-height) + 10px);
  z-index: 1001;
  background: #1eea89;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  color: black;
  font-size: 18px;
  transition: all 0.3s ease;
}

.sections-toggle:hover {
  background: #0dd375;
  transform: scale(1.1);
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --sidebar-width: 100%;
  }

  .story-header {
    padding: 0 10px;
  }

  .brand {
    flex: 0 0 auto;
  }

  .logo {
    height: 30px;
  }

  #story-title {
    font-size: 1.1rem;
    text-align: center;
    margin: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sections-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #features {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 85%;
    height: calc(100vh - var(--header-height));
    margin: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    background: transparent;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #features.visible {
    transform: translateX(0);
    scroll-snap-type: y mandatory;
  }

  section {
    margin-bottom: 20px;
    min-height: auto;
    padding-top: 20px;
    opacity: 0;
    pointer-events: none;
    background: transparent;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  section.active {
    opacity: 1;
    pointer-events: auto;
  }

  .section-inner {
    background: rgba(255, 255, 255, 0.98);
    margin: 10px;
    padding: 15px;
    max-height: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  /* Improve touch targets */
  .category-btn,
  .filter-option,
  .spotlight-card,
  .timeline-btn {
    padding: 12px;
    margin: 5px 0;
  }

  .spotlight-card {
    margin-bottom: 15px;
  }
}

/* Smaller mobile devices */
@media (max-width: 380px) {
  #story-title {
    font-size: 1rem;
  }

  .logo {
    height: 25px;
  }

  .sections-toggle {
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  #features {
    width: 100%;
  }
}

#features .spotlight-cards,
#features .filter-options,
#features #petition-filters,
#features #status-filters,
#features #category-filters,
#features .timeline-component,
#features .impact-metrics,
#features .cta-cards,
#features .impact-chart-container {
  pointer-events: auto; /* These need to be scrollable and fully interactive */
}

/* Elements that should always be clickable */
#features .mapboxgl-popup,
#features .mapboxgl-popup-content,
#features .mapboxgl-popup-close-button {
  pointer-events: auto !important;
}
