/* CSS Variables */
:root {
  --background-color: rgb(39, 74, 104);
  --background-color-semitransparent: #274a6890;
  --text-color: #333333;
  --secondary-color: #e0f7fa;
  --hover-color: #cce7ff;
}

/* Global Layout */
html,
body,
#container {
  height: 100%;
  width: 100%;
}

body {
  background-color: var(--background-color) !important;
  color: var(--text-color);
  font-family: "Lato", sans-serif;
}

/* Navbar Overrides (in addition to Bootstrap) */
.navbar,
.navbar-brand,
.nav-item {
  font-family: "Lato", sans-serif;
}

.navbar {
  font-size: 15px;
  color: #ffffff;
  background-color: var(--background-color) !important;
}

.navbar-brand {
  padding: 0;
  font-size: 1.25rem;
}

.nav-item {
  font-weight: 500;
  font-size: 16px !important;
  line-height: 18px;
  color: #ffe3e3;
  text-decoration: none;
}

.navbar-dark .navbar-nav .nav-link:hover {
  color: rgb(239, 203, 0);
}
.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 1);
}
/* Anchor Defaults */
a {
  color: goldenrod;
  text-decoration: none;
  background-color: transparent;
  font-variant: small-caps;
}

/* Map Container */
#map {
  position: absolute;
  top: 53px;
  bottom: 0;
  left: 25%;
  right: 0;
  width: 75%;
}

/* Fallback Image */
.fallback-image {
  background-image: url("data/photos/ina.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Maplibre Popup Overrides */
.maplibregl-popup-content {
  font: 400 15px/22px;
  font-family: "Quintessential", cursive !important;
  padding: 0;
  width: 100%;
  background-color: transparent;
  box-shadow: none;
}
.maplibregl-popup-content-wrapper {
  padding: 1%;
}
.maplibregl-popup-content h6 {
  font-family: "Lato", sans-serif;
  background-color: var(--background-color) !important;
  color: white;
  margin: 0;
  display: block;
  padding: 10px;
  text-shadow: 1px 1px #83510636;
  border: thin ridge #29251f6e;
}
.maplibregl-popup-content h5 {
  color: #212529;
  background-color: var(--background-color) !important;
  margin: 0;
  display: block;
  padding: 10px;
  border-radius: 3px 3px 0 0;
  font-weight: 700;
}
.maplibregl-popup-anchor-bottom > .maplibregl-popup-tip {
  border-top-color: #343a40;
  margin-bottom: 10px;
}
.maplibregl-popup-close-button {
  display: none;
}
/* Slider Control (used in the layer control panel) */
.slider {
  width: 50%;
  opacity: 0.9;
  position: absolute;
}

/* Menu / Sidebar Panels */
#menu {
  background: #e4e4e4;
  width: 100%;
  z-index: 1;
}
#menu a {
  color: #404040;
  display: block;
  margin: 0;
  padding: 8px;
  text-decoration: none;
}
#menu a:hover {
  background-color: var(--background-color) !important;
  color: #404040;
}
#menu a.active {
  background-color: var(--background-color) !important;
  color: rgb(214, 214, 214);
}

#menuNew {
  background: #e4e4e4;
  z-index: 1;
}
#menuNew a {
  color: #ffffff;
  display: block;
  margin-right: 5px;
  font-variant: unset;
  padding: 2px;
  text-decoration: none;
}
#menuNew a:hover {
  color: rgb(179, 179, 179);
}
#menuNew a.active {
  background-color: var(--background-color) !important;
  color: rgb(239, 203, 0);
}

/* Miscellaneous Utility Classes */
.nosp {
  margin: 0;
}
.tab-pane {
  margin-top: 1rem;
}
/* Map Overlays (Left Panels) */
.map-overlay {
  position: absolute;
  width: 25%;
  top: 52px;
  bottom: 0;
  left: 0;
  font-family: "Lato", sans-serif;
  background-color: var(--background-color) !important;
  color: white;
  padding-bottom: 55px;
  overflow-y: auto;
  overflow-x: hidden;
  letter-spacing: -0.1px;
  text-shadow: 1px 1px #83510636;
  border: thin ridge #29251f6e;
}
.map-overlay2 {
  display: none;
  position: absolute;
  width: 25%;
  top: 52px;
  left: 25%;
  font-family: "Lato", sans-serif;
  background-color: var(--background-color-semitransparent) !important;
  color: white;
  padding: 15px;
  overflow-y: hidden;
  overflow-x: hidden;
  line-height: 1.4;
  border: thin ridge #29251f6e;
  z-index: 5000;
}
#menuNew2 {
  overflow-y: hidden;
  max-height: 90%;
}
.map-overlay3 {
  display: none;
  position: absolute;
  width: 25%;
  min-width: 350px;
  top: 52px;
  bottom: 0 !important;
  font-family: "Lato", sans-serif;
  background-color: var(--background-color) !important;
  max-height: 100%;
  color: white;
  padding: 15px;
  overflow-y: auto;
  overflow-x: hidden;
  line-height: 1.4;
  border: thin ridge #29251f6e;
  z-index: 5000;
}

/* Overlays: Input and Listing */
.map-overlay input {
  display: block;
  border: none;
  width: 75%;
  border-radius: 3px;
  margin: 6px;
  box-sizing: border-box;
}
.map-overlay .listing {
  max-height: 100%;
}
.map-overlay .listing > * {
  display: block;
  margin: 0;
}
.map-overlay .listing a {
  color: #fff !important;
  text-decoration: none;
}
.map-overlay .listing a:hover {
  background-color: var(--background-color) !important;
}
#feature-listing {
  color: #fff;
  padding-left: 1.5em;
}
#feature-listing a {
  cursor: pointer;
  text-indent: -1.5em;
  padding-bottom: 0.5em;
}

/* Search Results */
.NPlisting {
  overflow-y: auto;
  max-height: 100%;
}
.NPlisting > * {
  display: block;
  padding: 5px 10px;
  margin: 0;
}
.NPlisting a {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
}
.NPlisting a:last-child {
  border: none;
}
.NPlisting a:hover {
  color: rgb(239, 203, 0);
}

/* Thumbnails (in Modal Gallery) */
.thumbnail {
  width: 50px;
  height: 50px;
  object-fit: contain; /* or 'cover' if you prefer cropping */
  margin: 5px;
  cursor: pointer;
}
.thumbnail:hover {
  transform: scale(1.1);
}

/* Search Bar & Clear Button */
#searchBar {
  padding-right: 30px;
}
#clearButton {
  font-size: 16px;
  color: #e8e8e8;
  cursor: pointer;
  padding-right: 2px;
}
#clearButton:hover {
  color: #debd1b;
}

/* Table Body */
#tableBody tr:hover,
#NPList a:hover {
  cursor: pointer;
}
td {
  padding: 2px 2px 8px;
}

/* Filter Section */
.filter-group {
  display: flex; /* Put label and select in a row */
  align-items: center; /* Vertically center them */
  margin-bottom: 8px; /* Spacing between each row */
}

.filter-group label {
  display: inline-block; /* Needed for a fixed width to apply */
  width: 120px; /* Adjust as needed to accommodate the widest label */
  text-align: left; /* Ensure label text is left-aligned */
  margin-right: 8px; /* Spacing between label and select */
}

.filter-group select {
  width: 90%; /* Fixed width for all dropdowns */
  max-width: 100%; /* Prevent overflow if container is narrow */
  text-align: left; /* Left-align the text inside the dropdown */
}
hr {
  margin-top: 0.5rem;
  margin-bottom: 0.1rem;
}

/* Legend Text */
#piccolo {
  font-size: 0.8em;
}
#legend3 {
  letter-spacing: -0.5px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  .map-overlay,
  .map-overlay2,
  .map-overlay3,
  #menuNew2,
  #menuNew3 {
    display: none;
  }
  #map {
    left: 0;
    width: 100%;
  }
}
@media (max-width: 1200px) {
  #splashModal {
    margin: 15%; /* Remove default Bootstrap margin */
    width: 70%;
    max-width: 80%;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: hidden;
  }
}
@media (max-width: 1500px) {
  .map-overlay {
    width: 350px;
  }
  .map-overlay2 {
    left: 350px;
  }
  #map {
    left: 0;
    width: 100%;
  }
}

/* Card (used in legend panels) */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--background-color) !important;
  background-clip: border-box;
  border: none;
  border-radius: 0;
}

/* Reset Button (in Filter Tab) */
#resetButton {
  background-color: #4e85b6 !important;
  color: #dddddd;
  margin-bottom: 5%;
}
#resetButton:hover {
  background-color: #274a68 !important;
}

#legend {
  position: absolute;
  top: 60px; /* Adjust position as needed */
  right: 50px; /* Adjust position as needed */
  background: rgba(255, 255, 255, 0.9);
  padding: 5px;
  border-radius: 3px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.legend-key {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  border: 1px solid #999;
}

.legend-label {
  vertical-align: middle;
}
.button {
  border: none;
  border-radius: 4px;
  color: white;
  padding: 8px 8px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 15px;
  margin: 2px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
}

#show-historical {
  background-color: white;
  color: black;
  border: 3px solid gold;
}

#show-historical:hover {
  background-color: gold;
  color: rgb(255, 255, 255);
}

#show-existing {
  background-color: white;
  color: black;
  border: 3px solid royalblue;
}

#show-existing:hover {
  background-color: royalblue;
  color: white;
}
#show-still {
  background-color: white;
  color: black;
  border: 3px solid #04aa6d;
}

#show-still:hover {
  background-color: #04aa6d;
  color: white;
}
#show-all {
  background-color: white;
  color: black;
  border: 3px solid #04aaa2;
}

#show-all:hover {
  background-color: #04aaa2;
  color: white;
}
#closePanel3:hover {
  background-color: gold;
  border-color: royalblue;
}
#closePanel3 {
  border-color: royalblue;
  color: rgb(155, 176, 239);
}
/* Make the splash modal take up the entire viewport */
#splashModal .modal-dialog {
  margin: 2%; /* Remove default Bootstrap margin */
  width: 100%;
  max-width: 100%;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Remove borders and background from the modal content for a clean look */
#splashModal .modal-content {
  background-color: transparent;
  border: none;
  box-shadow: none;
}

/* Center the image within the modal body */
#splashModal .modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0; /* Remove default padding */
  margin: 0; /* Remove default margin if needed */
}

/* Make the image scale to fit the viewport */
#splashModal .modal-body img {
  max-height: 95vh; /* Limit the height to the viewport height */
  max-width: 100%; /* Prevent horizontal overflow */
  object-fit: contain;
}
#MIT,
#MIT2 {
  position: sticky;
  top: 0;
  background-color: var(--background-color);
}
.image-wall-thumb {
  height: 50px;
  width: 100%;
  object-fit: cover; /* or use "contain" if you prefer to see the full image */
  margin-bottom: 10px;
  padding: 1% !important;
  cursor: pointer; /* indicate clickable */
}
.no-gutter {
  margin-left: 0;
  margin-right: 0;
}
.no-gutter > [class*="col-"] {
  padding-left: 5px; /* adjust to 0 if you want no space at all */
  padding-right: 5px;
}
@media (min-width: 2600px) {
  .image-wall-thumb {
    height: 100px;
    width: 100%;
    object-fit: cover;
    margin-bottom: 10px;
    padding: 1% !important;
    cursor: pointer;
  }
}
.custom-modal-bg {
  background-color: rgba(
    39,
    74,
    104,
    0.6
  ) !important; /* semi-transparent bluish */
  color: white;
  border: none;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px); /* optional: background blur */
}

.modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background-color: transparent; /* allows transparency if about.html allows it too */
}
.dropdown-item {
  cursor: pointer;
}
#aboutModal,
#bibliographyModal {
  z-index: 6000;
}
/* #rufini-row,
#rufini-link-row {
  margin-top: 10px;
} */
/* Stick the header row and give it its own background */
#testicky {
  position: sticky;
  padding-top: 15px;
  padding-bottom: 5px;
  top: -15px;
  z-index: 1000;
  background: var(--background-color, #fff); /* <- remove the quotes */
  /* (Optional niceties) */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  backdrop-filter: none; /* ensure no transparency effects */
}

/* If you ever see tiny gaps from Bootstrap gutters, this forces full cover */
#testicky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--background-color, #fff);
  z-index: -1;
}
.navbar-nav .fa-instagram {
  vertical-align: middle;
  position: relative;
  top: -1px; /* adjust this value to taste, e.g. 2–4px */
}
