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

html,
body {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: black;
  height: 100%;
  font-family: "Geist", sans-serif;
  letter-spacing: 0.3px;
  line-height: 1.6;
}

.geist {
  font-family: "Geist", sans-serif;
  font-weight: 300;
  line-height: 16px;
}

/* TITLE STUFF */

.titlediv {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 24px 40px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.titlediv h1 {
  font-size: 24px;
  color: white;
  margin-bottom: 4px;
}

.frosted {
  background: rgba(255, 255, 255, 0.01); /* light translucent */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px); /* for Safari */
  /* border-radius: 12px; */
  /* padding: 1.5rem; */
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  /* border: 1px solid rgba(255, 255, 255, 0.3); */
}

.hike-stats {
  display: flex;
  flex-direction: row;
  gap: 16px;
  color: rgba(255, 255, 255, 0.6);
}

.stat {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.titlediv p {
  color: rgba(255, 255, 255, 0.6);
}

@media only screen and (max-width: 480px) {
  .titlediv {
    flex-direction: column;
    justify-content: start;
    align-items: start;
    gap: 16px;
    padding: 24px;
  }

  .titlediv h1 {
    font-size: 16px;
  }

  .titlediv p {
    color: rgba(255, 255, 255, 0.6);
  }

  #learn-more-btn {
    font-size: 14px !important;
    padding: 8px 12px !important;
  }

  .close-overlay {
    top: 12px;
    right: 12px !important;
  }
}

.mapboxgl-map {
  font-family: "Merriweather", serif;
  letter-spacing: 0.3px;
}

/* Map Container */
.map-container {
  height: 90vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  background-color: black;
}

/* Map dark background to match mask */
.mapboxgl-canvas-container {
  background-color: black;
}

/* Map controls */
.mapboxgl-ctrl-top-right {
  top: 10px;
  right: 10px;
}

.mapboxgl-ctrl-group {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

/* Marker and Popup Styling */
.photo-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.mapboxgl-popup-content {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  padding: 8px;
  backdrop-filter: blur(100px);
}

.note-popup h3 {
  color: #fff;
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 16px;
}

.note-popup p {
  margin: 0;
  color: #fff;
}

.photo-popup img {
  width: 100%;
  border-radius: 8px;
  /* margin-bottom: 8px; */
}

.photo-popup p {
  margin: 0;
  color: #fff;
  text-align: center;
  font-style: italic;
}

/* Add animated glow for trail */
@keyframes trailGlow {
  0% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 0.3;
  }
}

/* Footer */
footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
}

.mapboxgl-ctrl-bottom-right {
  display: none;
}
.mapboxgl-ctrl-bottom-left {
  display: none;
}

.back-button p {
  color: #fff !important;
}

/* LAYER STUFF */

.layers {
  position: absolute;
  top: 0;
  width: 100%;
  background: black;
  display: flex;
  flex-direction: row;
  padding: 200px 120px;
  gap: 40px;
  z-index: 99;
}

.layer-image-container {
  width: 70%;
  height: 100vh;
}

.layer-text-container {
  width: 30%;
}

.layer-image {
  max-width: 100%;
  height: auto;
}

/* Overlay layer */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: black; */
  background: rgba(0, 0, 0, 0.1); /* light translucent */
  backdrop-filter: blur(100px);
  -webkit-backdrop-filter: blur(100px); /* for Safari */

  display: flex;
  z-index: 9999;
  overflow: hidden;
}
.overlay.hidden {
  display: none;
}

.overlay-left {
  width: 60%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-left img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.overlay-right {
  width: 40%;
  height: 100%;
  overflow-y: scroll;
  padding: 0;
  color: white;
  font-size: 18px;
  line-height: 1.6;
  scroll-behavior: smooth;
  position: relative;
  scroll-snap-type: y mandatory;
}

.layer-block {
  height: 100vh;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: center;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.layer-block.active {
  opacity: 1;
}

.step-counter {
  font-size: 14px;
  color: #aaa;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.step-description {
  font-size: 18px;
}

.step-description a {
  text-decoration: underline;
  color: white;
}

.step-description a:visited {
  color: white;
}

.step-description a:hover {
  color: var(--primary);
  cursor: pointer;
}

.step-description-secondary {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 16px;
  font-size: 14px;
}

/* Button */
#learn-more-btn {
  background-color: rgba(255, 255, 255, 0.1); /* or a soft gray/blue */
  color: #fff; /* or white if on a dark background */
  font-weight: 400;
  font-size: 16px;
  padding: 10px 16px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#learn-more-btn:hover {
  background-color: rgba(255, 255, 255, 0.2); /* or a soft gray/blue */
  border: 1px solid var(--primary);
}

.layer-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.layer-stack img {
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 100%;
  width: calc(100% - 48px);
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  z-index: 1;
}

.layer-stack img.visible {
  opacity: 1;
  z-index: 2;
}

.layer-stack img.fading-out {
  opacity: 0;
  z-index: 2; /* so it fades out above previous ones */
}

.close-overlay {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  color: white;
  border-radius: 99px;
  background-color: rgba(255, 255, 255, 0.1); /* or a soft gray/blue */
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 10000;
}

.close-overlay:hover {
  background-color: rgba(255, 255, 255, 0.2); /* or a soft gray/blue */
  border: 1px solid var(--primary);
}

/* Swipe hint for small screens */
@media (max-width: 768px) {
  .overlay {
    flex-direction: column;
    background-color: black;
  }

  .overlay-left {
    width: 100%;
    height: 50%;
  }

  .overlay-right {
    width: 100%;
    height: 50%;
    scroll-snap-type: y mandatory;
  }

  .layer-block {
    height: 100%; /* match the 50 vh column, not 100 vh */
    padding: 0 24px; /* a bit thinner than desktop padding */
    scroll-snap-align: center; /* keep centring nicely */
  }
}
