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

@font-face {
  font-family: "Bradford";
  src: url("BradfordLL-Book.otf") format("opentype");
}

body {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f8f8f8;
  position: relative;
}

#map-container {
  width: 350vw;
  height: 350vh;
  overflow: hidden;
  position: relative;
  user-select: none;
}

#map {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  transition: transform 0.1s ease-out;
}

.map-image {
  max-width: 500px;
  max-height: 500px;
  object-fit: cover;
  flex-shrink: 0;
  margin: 5px;
  position: absolute;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  user-select: none;
  box-shadow: 0 0 20px 0 rgba(102, 102, 102, 0.25);
}

.map-image,
.map-text-container {
  transition: transform 0.3s ease, opacity 0.3s ease;
  border: 3.5px dotted #000;
}

.map-image[src*="City1.png"],
.map-image[src*="City3.png"],
.map-image[src*="City4.png"],
.map-image[src*="City7.png"],
.map-image[src*="City10.png"],
.map-image[src*="City13.png"],
.map-image[src*="Health2.png"],
.map-image[src*="Health5.png"],
.map-image[src*="Health8.png"],
.map-image[src*="Health14.png"],
.map-image[src*="Industry2.png"],
.map-image[src*="Industry4.png"],
.map-image[src*="Industry13.png"],
.map-image[src*="Industry14.png"],
.map-image[src*="Ocean2.png"],
.map-image[src*="Ocean5.png"],
.map-image[src*="Ocean7.png"],
.map-image[src*="Ocean8.png"],
.map-image[src*="Ocean14.png"] {
  border: none !important; /* Ensure no borders are applied */
  box-shadow: none !important; /* Remove shadow for these images */
}

.map-text-container {
  position: absolute;
  width: 600px;
  padding: 15px;
  font-family: "Bradford", serif;
  font-size: 2.5rem;
  line-height: 2.5rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
  background-color: #f8f8f8;
}

.map-text-container:hover {
  transform: scale(1.05);
  z-index: 10;
  cursor: pointer;
}

.carousel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(254, 240, 240, 0.8);
  backdrop-filter: blur(15px);
  transition: backdrop-filter 0.5s ease, background-color 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}

.carousel-arrow {
  position: absolute;
  font-size: 2.25rem;
  color: black;
  user-select: none;
  text-decoration: underline dotted black;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 2000;
  transform-origin: center;
  font-family: "Bradford", serif;
}

.carousel-arrow:hover {
  transform: rotate(var(--random-rotation, 0)) scale(1.05);
}

.carousel-arrow.left {
  left: 10%;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-arrow.right {
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
}

.carousel-image {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: cover;
  transition: all 0.5s ease;
  transform: translate(-50%, -50%);
  border: 3.5px dotted #000;
  box-sizing: border-box;
  opacity: 0;
}

.relocate {
  font-size: 2.25rem;
  color: black;
  user-select: none;
  text-decoration: underline dotted black;
  cursor: pointer;
  transition: opacity 0.5s ease, transform 0.3s ease;
  z-index: 2000;
  font-family: "Bradford", serif;
  opacity: 0;
}

.relocate:hover {
  transform: translate(-50%, -50%) scale(1.1);
  cursor: pointer;
}

.background-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: rgb(197, 180, 180);
  font-family: "Bradford", serif;
  font-size: 4.45rem;
  line-height: 4.9rem;
  padding: 20px;
  white-space: pre-wrap;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  filter: blur(0.75px);
  background-image: radial-gradient(
      circle,
      rgba(0, 0, 0, 0.03) 1%,
      transparent 1%
    ),
    radial-gradient(circle, rgba(0, 0, 0, 0.02) 1%, transparent 1%);
  background-size: 3px 3px, 2px 2px;
  mix-blend-mode: multiply;
  padding: 20px;
}

.background-text-content {
  flex-grow: 1;
  overflow-y: auto;
  display: inline-block;
  transition: transform 0.3s ease;
  padding-right: 20px;
}

@media (max-width: 768px) {
  .map-image {
    max-width: 270px;
    max-height: 300px;
    border: 2px dotted #000;
  }

  .map-text-container {
    font-size: 1.25rem;
    line-height: 1.25rem;
    border: 2px dotted #000;
    width: 350px;
    padding: 15px;
  }

  .carousel-arrow {
    font-size: 1.25rem;
  }

  .carousel-arrow.left {
    left: 4%;
  }

  .carousel-arrow.right {
    right: 4%;
  }

  .carousel-image {
    max-width: 80vw;
    max-height: 50vh;
    object-fit: cover;
    transition: all 0.5s ease;
    transform: translate(-50%, -50%);
    border: 2px dotted #000;
    box-sizing: inherit;
  }

  .relocate {
    font-size: 1.25rem;
  }

  .background-text {
    font-size: 1.25rem;
    line-height: 1.5rem;
    overflow: hidden; /* Prevent mobile scrollbars */
    padding: 10px; /* Reduce padding for smaller screens */
    opacity: 0.3;
  }
  .background-text-content {
    overflow: hidden; /* Ensure no scrollbars */
    padding-right: 0; /* Keep consistent with the parent container */
  }
}
