body {
  margin: 0;
  border-width: 0;
  box-sizing: border-box;
  height: 100vh;
  font-family: 'Open Sans', sans-serif;
}

html, body {
  height: 100%;
  margin: 0;
}

#map {
  width: 100%;
  height: 100vh;
}

.map-container {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 0;
}

.slide2-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  background: none;
}

.slide2-overlay.active {
  opacity: 1;
  visibility: visible;
}

.slide2-overlay .image-section {
  width: 100%;
  height: 65%;
  position: relative;
  z-index: 2001;
  background-color: #000;
  overflow: hidden;
}

.slide2-overlay .slide-image {
  width: auto;
  height: auto;
  max-width: 120%;
  max-height: 120%;
  min-width: 100%;
  min-height: 100%;
  object-fit: none;
  display: block;
  border: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.slide2-overlay .image-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9em;
  font-style: italic;
  text-align: center;
  backdrop-filter: blur(3px);
  z-index: 1002;
}

.slide2-overlay .text-section {
  width: 100%;
  height: 35%;
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 60px;
  box-sizing: border-box;
  position: relative;
}

.slide2-overlay h2 {
  color: white;
  margin: 0 0 20px 0;
  font-size: 2.2em;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  width: 100%;
}

.slide2-overlay .text-content {
  color: white;
  font-size: 1.05em;
  line-height: 1.5;
  text-align: center;
  max-width: 900px;
  width: 100%;
}

.slide2-overlay .text-content p {
  margin: 0 0 15px 0;
}

.slide2-overlay .text-content p:last-child {
  margin-bottom: 0;
}

.slide2-overlay.active ~ .slide-section #slide2 {
  display: none;
}

#slide2 {
  opacity: 0;
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  position: relative;
}

@media (max-width: 768px) {
  .slide2-overlay .image-section {
    height: 55%;
  }
  
  .slide2-overlay .text-section {
    height: 45%;
    padding: 25px 30px;
  }
  
  .slide2-overlay h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  
  .slide2-overlay .text-content {
    font-size: 0.95em;
  }
}

@media (max-width: 480px) {
  .slide2-overlay .text-section {
    padding: 20px 25px;
  }
  
  .slide2-overlay h2 {
    font-size: 1.6em;
  }
  
  .slide2-overlay .text-content {
    font-size: 0.9em;
  }
}

.map {
  height: 100%;
}

.slide-section {
  position: relative;
  margin-top: -30vh;
  z-index: 100;
  pointer-events: none;
  border-bottom: 1px solid rgb(0 0 0 / 10%);
  transition: margin-top 0.3s ease-out;
}

.slide {
  margin-top: 90vh;
  margin-bottom: 90vh;
  margin-left: auto;
  margin-right: 2rem;
  padding: 1rem;
  box-shadow: -0.5rem 0 1rem rgba(0 0 0 / 50%);
  border: 1px solid gray;
  border-radius: 0.5rem;
  pointer-events: initial;
  width: 25rem;
  background-color: white;
  color: black;
}

.slide:first-child {
  margin-top: 0;
}

.slide:last-child {
  margin-bottom: 40vh;
}

.slide-controls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  column-gap: 0.5rem;
  width: 100%;
}

.slide-nav-button {
  transition: all 0.1s;
  padding: 0;
  margin: 1rem;
  width: 4rem;
  height: 3rem;
  border: 1px solid #888;
  border-radius: 0.25rem;
  background-color: #eee;
  font-size: 1.5em;
}

.slide-nav-button:hover {
  background-color: #444;
  color: #fff;
}

.slide-nav-select {
  min-width: 0;
}

.cover-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
  background: linear-gradient(to bottom, #7f8c8d, #2ecc71);
  color: white;
  text-align: center;
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  box-shadow: none;
  border: none;
}

.cover-slide h1 {
  font-size: 4rem; 
  margin: 0.5rem 0;
  font-weight: 700;
}

.cover-slide h3 {
  font-size: 2rem; 
  font-weight: 300;
  margin: 0.25rem 0;
}

.popup-content {
  font-family: 'Open Sans', sans-serif;
  max-width: 250px;
}

.popup-content h4 {
  margin: 0 0 10px 0;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.popup-content p {
  margin: 5px 0;
  font-size: 14px;
}

.popup-content strong {
  color: #555;
}

.slide-image-container {
  margin: 1rem 0;
  text-align: center;
}

.slide-image {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 0.5rem;
}

.image-caption {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
  margin: 0.5rem 0 1rem 0;
}

.legend {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.legend h4 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1em;
}

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

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  margin-right: 0.5rem;
  border: 1px solid #999;
  flex-shrink: 0;
}

.legend-primary {
  font-weight: bold;
  font-size: 1em;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
}

.legend-secondary {
  opacity: 0.7;
  font-size: 0.85em;
}

.wayne-avenue-marker {
  z-index: 1000;
}

.wayne-marker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.wayne-marker-pin {
  width: 24px;
  height: 24px;
  background-color: #720606;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  position: relative;
}

.wayne-marker-pin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: white;
  border-radius: 50%;
}

.wayne-marker-label {
  background-color: #ff4444;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  margin-top: 8px;
  position: relative;
}

.wayne-marker-label::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 4px solid #ff4444;
}

.wayne-popup {
  font-family: 'Open Sans', sans-serif;
}

.wayne-popup h4 {
  margin: 0 0 10px 0;
  color: #ff4444;
  border-bottom: 2px solid #ff4444;
  padding-bottom: 5px;
}

.resident-quote {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #ff4444;
  margin: 10px 0;
}

.resident-quote p {
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.quote-attribution {
  text-align: right;
  font-weight: bold;
  color: #666;
  font-size: 0.9em;
}

.case-study-box {
  background-color: #e8f5e8;
  border: 2px solid #4caf50;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.case-study-box h4 {
  margin: 0 0 0.5rem 0;
  color: #2e7d32;
}

.resident-testimonial {
  background-color: #fff3e0;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  border-left: 4px solid #ff9800;
  position: relative;
}

.quote-icon {
  position: absolute;
  top: -10px;
  left: 15px;
  background-color: #774304;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.resident-testimonial blockquote {
  margin: 0;
  padding: 0;
  font-style: italic;
  line-height: 1.5;
  color: #333;
}

.resident-testimonial cite {
  display: block;
  text-align: right;
  margin-top: 0.5rem;
  font-weight: bold;
  color: #666;
  font-style: normal;
}

.cover-slide h1,
.cover-slide h3 {
  color: #000000;  
  text-shadow: none;
}

.sources {
  font-size: 0.8em;
  color: #333;
  text-align: center;
  max-width: 700px;
  margin: 1em auto 0 auto;
}

.sources a {
  color: #333;
  text-decoration: none;
}

.sources a:hover {
  text-decoration: underline;
}