/* #map-section {
  height: 100vh;
  position: relative;
  background: url('../images/starsbg1.jpeg') no-repeat center center fixed;
  background-size: cover;
  z-index: 0;
} */



#map-section {
  height: 100vh;
  position: relative;
  background: #000 !important;
}

.mapboxgl-ctrl-logo {
  display: none !important;
}



#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.mapboxgl-marker {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.mapboxgl-marker:hover {
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.6);
}

#buttons {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

#buttons button {
  padding: 15px 30px;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.2s ease;
}

#buttons button:hover {
  transform: scale(1.05);
}

#message {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

/* Popup Styles */
#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9;
  display: none;
}

#popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #fcfdfe 0%, #ffd699 60%, #ffffff 100%);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 10;
  width: 90vw;
  max-width: 600px;
  box-sizing: border-box;
}


#popup-title {
  margin-bottom: 8px;
}
#popup-country {
  font-size: 1.1em;
  color: #666;
  margin-bottom: 8px;
}
#popup-action {
  margin-bottom: 8px;
}
#popup-extra > div {
  margin-bottom: 6px;
}
#popup-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 18px;
  margin-bottom: 15px;
}

#popup button {
  margin-top: 10px;
  margin-right: 10px;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#popup-button {
  background-color: #1e90ff;
  color: white;
}

#popup-close {
  background-color: #f0f0f0;
  color: #333;
}

#popup-button:hover {
  background-color: #005cbf;
}

#popup-close:hover {
  background-color: #e0e0e0;
}

/* Submission Dots in Rectangle Popup */
#rectangle-popup {
  min-height: 80px;
  min-width: 320px;
  padding-top: 48px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#rectangle-popup .submission-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eee;
  box-shadow: 0 0 8px rgba(30,144,255,0.15);
  margin: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2px solid #fff;
}
#rectangle-popup .submission-dot:hover {
  transform: scale(1.12);
  box-shadow: 0 0 16px 2px #1e90ff;
}

#rectangle-popup > div {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#rectangle-popup > div > div {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

/* Map Section Buttons */
.map-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 18px 22px;
  margin-bottom: 8px;
  border: none;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  text-align: center;
  line-height: 1.2;
  min-width: 180px;
  max-width: 220px;
  display: block;
}
.map-btn span {
  display: block;
  white-space: pre-line;
  text-align: center;
}
.btn-unity {
  background: #e53935;
}
.btn-oneness {
  background: #1976d2;
}
.btn-bridge {
  background: #8e24aa;
}
.btn-voices {
  background: #43a047;
}
.btn-perspectives {
  background: #fc8db2;
}
.btn-showall {
  background: #fbc02d;
}
.btn-instructions {
  background: #424242;
}
.map-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(0,0,0,0.16);
  filter: brightness(1.08);
}
@media (max-width: 600px) {
  .map-btn {
    font-size: 0.98rem;
    min-width: 120px;
    max-width: 98vw;
    padding: 12px 10px;
  }
}

@media (max-width: 600px) {
  #rectangle-popup {
    min-width: 0;
    max-width: 98vw;
    padding: 16px 4px 16px 4px;
  }
  #rectangle-popup .submission-dot {
    width: 36px;
    height: 36px;
  }
  #rectangle-popup > div > div {
    gap: 8px;
  }
} 

#popup, #popup * {
  font-family: 'Helvetica', Arial, sans-serif;
} 

/* Instructions Popup */
#instructions-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: none;
}

#instructions-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #f5f5f5;
  padding: 36px 36px 32px 36px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 2001;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  display: none;
}
#instructions-popup h2 {
  color: #222;
  margin-bottom: 18px;
  font-size: 1.7rem;
  font-weight: 700;
  text-align: center;
}
.instructions-section {
  margin-bottom: 22px;
}
.instructions-section:last-child {
  margin-bottom: 0;
}
.instructions-heading {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  margin-top: 0;
  font-size: 1.08rem;
}
#instructions-popup ul {
  margin: 0 0 0 18px;
  padding: 0;
  list-style: disc inside;
}
#instructions-popup ul li {
  margin-bottom: 7px;
  color: #444;
  font-size: 1rem;
  line-height: 1.6;
}
#instructions-popup p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
  font-size: 1rem;
}
#instructions-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: #666;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#instructions-close:hover {
  background: #444;
}

@media (max-width: 1024px) {
  #map-section {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
    height: 100vh;
    background: #fff !important;
    position: relative;
    padding-bottom: 80px; /* space for buttons */
    box-sizing: border-box;
  }
  .logo-container {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 10px 0 0 10px;
    z-index: 2;
  }
  .map-container {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 0;
    position: relative;
    height: 100%;
    width: 100%;
    padding-bottom: 64px; /* space for buttons and attribution */
    box-sizing: border-box;
  }
  #map {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0 auto;
    border-radius: 0;
    background: #fff !important;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    position: relative;
  }
  /* Ensure Mapbox copyright is always visible and inside the map */
  #map .mapboxgl-ctrl-bottom-left,
  #map .mapboxgl-ctrl-bottom-right {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    z-index: 10;
    background: rgba(255,255,255,0.8);
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 4px 4px 0 0;
  }
  #map-section #buttons {
    position: absolute;
    left: 50%;
    bottom: 0;
    top: auto;
    right: auto;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    gap: 6px;
    background: linear-gradient(to top, rgba(255,255,255,0.95) 60%, rgba(255,255,255,0.0) 100%);
    z-index: 1001;
    padding: 8px 0 8px 0;
    box-sizing: border-box;
  }
  #map-section .map-btn {
    font-size: 0.95rem;
    min-width: 110px;
    max-width: 44vw;
    padding: 10px 6px;
    border-radius: 8px;
    line-height: 1.1;
    word-break: break-word;
    margin: 0 2px 4px 2px;
    flex: 1 1 44vw;
    box-sizing: border-box;
  }
  #map-section .map-btn.btn-instructions {
    width: 60vw;
    max-width: 320px;
    min-width: 140px;
    margin: 0 auto 0 auto;
    display: block;
    justify-self: center;
  }
}
@media (max-width: 480px) {
  #map-section #buttons {
    gap: 3px;
    padding: 4px 0 4px 0;
  }
  #map-section .map-btn {
    font-size: 0.82rem;
    min-width: 80px;
    max-width: 48vw;
    padding: 6px 2px;
    border-radius: 7px;
    margin: 0 1px 2px 1px;
    flex: 1 1 48vw;
  }
}


@media (max-width: 500px) and (max-height: 700px) {
  #popup {
    width: calc(100vw - 20px);
    /* height: calc(100vh - 20px); */
    max-width: 400px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  #popup, #popup * {
    font-size: 0.8rem;
    line-height: 1.2;
  }
  #popup-image {
    height: 180px;
    margin-top: 8px;
    margin-bottom: 0px;
    border-radius: 3px;
  }
  #popup-title {
    margin-top: 4px;
    margin-bottom: 4px;
  }
  #popup-extra > div {
    margin-bottom: 3px;
  }
}

@media (max-width: 500px) and (min-height: 701px) {
  #popup {
    width: calc(100vw - 20px);
    /* height: 600px; */
    max-width: 400px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  /* #popup, #popup * {
    font-size: 0.98rem;
    line-height: 1.25;
  } */
}

@media (min-width: 501px) and (max-width: 850px) {
  #popup {
    width: 85vw;
    max-width: 460px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 851px) and (max-width: 1024px) {
  #popup {
    width: 75vw;
    max-width: 540px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    
  }
}

@media (min-width: 1025px) {
  #popup {
    width: 30vw;
    max-width: 800px;
  }
  #popup-image {
    height: 250px;
  }
}
