body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background-color: black;
  color: white;
  overflow: auto;
}


.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;     /* Title centered horizontally */
  align-items: center;
  padding: 1em;
  z-index: 1000;
}

.logo {
  position: absolute;
  top: 2em;
  left: 2em;
  width: 140px;
  background-color: rgba(248, 245, 245, 1);
  padding: 8px;
  border-radius: 8px;
}

.title {
  font-size: 3em;
  text-align: center;
  color: white;
  margin: 0;
}



/* Map takes the entire screen */
#map {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 0;
  background-color: black;
}

.custom-map-label {
  color: white;
  font-family: Serif;
  font-style: italic;
  opacity: .5;
  text-align: center;
  width: 100px;
  font-size: 1.2em;
  pointer-events: none; /* ensures clicks go through to map */
}



#info-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 15%;
  overflow-y: hidden;
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 1em;
  box-sizing: border-box;
  z-index: 1000;
  transition: max-height 0.3s ease;
}

#info-panel::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: #888;
  border-radius: 2px;
  margin: 0 auto 10px auto;
}

/* Expanded view when hovered (desktop) */
#info-panel:hover {
  max-height: 78%;
  overflow-y: auto;
}

/* Collapsed default view */
#info-panel.collapsed {
  max-height: 15%;
  overflow: hidden;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
}

/* ---------- Desktop / default ---------- */
/* Two-column layout by default */
.info-content {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

/* Text on the left */
.info-text {
  flex: 1.5;
  text-align: left;
}

/* Image + info on the right */
.info-image {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
}

.info-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Styling */
.description-src {
  font-size: 0.9em;
  font: italic;
  color: white;
  margin-top: 0.3em;
}

.image-desc {
  font-size: 1em;
  font-style: italic;
  color: white;
  margin-top: 0.1em;
  margin-bottom: 0.2em;
}

.image-src {
  font-size: 0.8em;
  color: white;
  margin-top: 0.3em;
}



/* Mobile-specific adjustments */
@media (max-width: 768px) {

  .header {
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: row;
    padding: 1em;
  }

  .logo {
    position: static;
    width: 70px;
    height: auto;
    margin: 25px;
    background-color: rgba(255, 255, 255, 1);
  }

  .title {
    font-size: 1.7em;
    text-align: left;
    width: 60%;
    margin: 10px;
  }

  .custom-map-label {
    color: cyan;
    font: georgia;
    font-style: italic;
    opacity: .5;
    text-align: center;
    font-size: .6em;
    pointer-events: none; /* ensures clicks go through to map */
  }

  #info-panel {
    position: fixed;       /* better than absolute for mobile bottom sheets */
    bottom: 0;             /* always pinned to the very bottom */
    left: 0;
    right: 0;
    height: auto;          /* let content size it */
    max-height: 15%;       /* collapsed size */
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    transition: max-height 0.3s ease;
    padding: 0.5em 1em;    /* avoid too much padding on mobile */
    margin: 0;             /* prevent floating from margins */
    box-sizing: border-box;
    z-index: 1000;
    /* handles iOS safe area */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  #info-panel.expanded {
    max-height: 60% !important;
    overflow-y: auto !important;
  }

  #info-panel:hover {
    max-height: 15%; /* disable hover expansion on mobile */
    overflow: hidden;
  }

  /* Stack content vertically instead of side-by-side */
  .info-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 0.2em;
  }

  .info-text {
    flex: unset;
    width: 100%;
  }

  .description-src {
    font-size: 0.8em;
    color: white;
    margin-top: 0.5em;
  }

  .image-desc {
    font-size: 1em;
    font-style: italic;
    color: white;
    margin-top: 0.8em;
  }

  .info-image img {
    max-width: 100%;
    height: auto;
    margin: 0.5em 0;
    display: block;
  }

  .image-src {
    font-size: 0.8em;
    color: white;
    margin: 0.3em 0 1em 0;
  }

}
