/* styles.css */

/* Reset */
@font-face {
  font-family: "OdibeeSans";
  src: url('../fonts/Odibee-Sans-Regular.woff') format('woff');
}

@font-face {
  font-family: "PTMono";
  src: url('../fonts/PT-Mono-Regular.woff') format('woff');
}

* {
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.site-header a {
  font-family: "OdibeeSans";
  text-decoration: none;
  color: inherit;
}

body {
  font-family: "PTMono";
  background-color: #F7F7F7;
  color: #1e1e1e;
}

h1,
h2,
h3 {
  font-family: "OdibeeSans";
}

input, button, textarea, select {
  font-family: inherit;
  -webkit-appearance: none;
}

a:visited {
  color: inherit;
  /* or your preferred color, e.g. #1e1e1e */
  text-decoration: none;
  /* removes underline */
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



/* Header */
.site-header {
  height: 80px;
  padding-top: 30px;

}


.header-content {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 3px solid #1E1E1E;
  flex-wrap: wrap
}

.site-title {
  font-size: 50px;
  text-decoration: none;
  color: #1e1e1e;
}

.site-title:hover {
  color: #FFB800;
}


.nav-links a {
  margin-left: 1.5rem;
  text-decoration: none;
  font-size: 25px;
  color: #1e1e1e;
  background-color: transparent;
  border: 3px solid #1E1E1E;
  border-radius: 25px;
  width: 162px;
  height: 49px;
  padding: 5px 30px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-links a:hover {
  background-color: #FFB800;
  color: #1e1e1e;
  box-shadow: 0 0 0 2px #F7F7F7 inset;
  /* 2px "border" inside */
}

.nav-links .active {
  color: #F7F7F7;
  background-color: #1E1E1E;
  box-shadow: 0 0 0 2px #F7F7F7 inset;
}

/* Main */
.site-main {
  flex-grow: 1;
  /* This is crucial to make the main content fill the vertical space */
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  position: relative;
}

.main-text {
  width: 90%;
  max-width: 1200px;
  margin: 30px auto 20px;
  /* Center the text and add a bottom margin */
}

.main-text p {
  font-size: 18px;
  line-height: 1.6;
  color: #1E1E1E;
  font-family: "PTMono", monospace;
}

.main-content {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.map-container {
  flex: 1;
  overflow: visible;
  min-height: auto;
  min-height: 100vh;
}

.mapboxgl-popup {
  max-width: 300px;
}

.mapboxgl-popup-content {
  background-color: #f7f7f7;
  font-family: "PTMono";
  padding: 5px 10px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border: 2px solid #9C321F;
  border-radius: 25px !important;
}

.mapboxgl-popup-tip {
  border-top-color: #9C321F !important;
}

#map-menu {
  position: absolute;
  bottom: 500px;
  right: 20px;
  z-index: 100;
  transition: transform 0.3s ease-in-out;
  background-color: #3E6A41;
  border-radius: 25px;
  padding: 20px;
  max-width: 250px;
  border: 2px solid #1E1E1E;
  min-height: auto;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#map-menu.hidden-menu {
  transform: translateX(200%);
}

#map-menu button {
  font-family: "OdibeeSans" !important;
}

#menu-toggle-button {
  width: 100%;
  font-size: 20px;
  padding: 8px 12px;
  border: 2px solid #1e1e1e;
  background-color: #f7f7f7;
  box-shadow: 2px #3E6A41 inset;
  color: #1e1e1e;
  cursor: pointer;
  border-radius: 5px;
  text-align: left;
  font-family: "OdibeeSans" !important;
  text-transform: uppercase;
}

#menu-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
  font-size: 14px;
}

#menu-content.expanded {
  max-height: 500px;
  /* Adjust as needed for the height of your list */
}

.island-list {
  list-style-type: none;
  margin: 10px 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #f7f7f7;
  border: 2px solid #1E1E1E;
  border-radius: 5px;
}

.location-list li {
  list-style-type: none;
  color: #1e1e1e;
  background-color: #ccc;
  border-radius: 5px;
  margin: 5px 0;
  padding: 20px;
  font-size: 14px;
}

.location-item:hover {
  color: #1A5A8C !important;
}

.island-list li {
  padding: 2px 5px;
   list-style-type: none;
  font-size: 16px;
  cursor: pointer;
}

.island-list li:hover {
  color: #1A5A8C;
}

#sidebar {
  position: absolute;
  top: 0;
  left: 2rem;
  bottom: 2rem;
  width: 360px;
  background-color: #1E1E1E;
  padding: 24px 28px;
  box-sizing: border-box;
  transition: transform 0.3s ease;
  border-radius: 25px;
  z-index: 10;
}

#sidebar.hidden {
  transform: translateX(-150%);
}



/* Title */
#sidebar-title {
  font-size: 36px;
color: #FFB800;
}

/* Subtitle (island name or secondary info) */
#sidebar-subtitle {
  font-size: 24px;
  color: #F7F7F7;
  margin-bottom: 20px;
  text-transform: uppercase;
}

#sidebar h3 {
  font-size: 24px;
  color: #F7F7F7;
  margin-bottom: 20px;
}

/* Description Text */
#sidebar-description {
  font-size: 15px;
  color: #F7F7F7;
  font-family: "PTMono", monospace;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Archive Buttons */
#archive-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

#archive-buttons button {
  border-radius: 25px;
  font-family: "PTMono", monospace;
  background-color: #f1f1f1;
  color: #1E1E1E;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border: 3px solid #1E1E1E;
  padding: 10px 20px;
  justify-content: center;
  align-items: center;
}

#archive-buttons button:hover {
  background-color: #9C321F;
  color: #F7F7F7;
  border: 3px solid #1E1E1E;
  box-shadow: 0 0 0 2px #F7F7F7 inset;
}

#archive-buttons button.active {
  background-color: #FFB800;
  color: #F7F7F7;
  border-color: #FFB800;
}

#back-button {
  background: none;
  color: #F7F7F7;
  border: none;
  margin-bottom: 20px;
  font-size: 16px;
  font-family: "PTMono", monospace;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* Overlay container */
#archive-overlay {
  position: absolute;
  height: 100%;
  width: auto;
  min-width: 100%;
  background: linear-gradient(to bottom, #f7f7f7 1%, rgba(26, 90, 140, 0.70), #1e1e1e 95%);
  z-index: 4;
  /* Change display to flex so it's ready to be shown */
  display: flex;
  flex-direction: column;
  overflow: scroll;
  padding: 2rem;
  overflow-y: scroll;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease-in-out;
}


/* Hidden by default */
#archive-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out, visibility 0s 0.4s;
}

/* Content inside overlay */
.overlay-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 2fr));
  gap: 1.5rem;
}

/* The container that holds all preview cards */
#overlay-items-container,
#archive-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-left: 300px;
  /* Adjusted to account for sidebar width */
  padding: 20px;
  flex-grow: 1;
  overflow-y: scroll;
  border-radius: 25px;
  margin-bottom: 50px;
}

#overlay-items-container {
  max-height: calc(100vh - 200px);
  /* Adjust height as needed */
}

/* Individual archive card styling */
.archive-card {
  width: 260px;
  background-color: #f9f9f9;
  border: 2px solid #1e1e1e;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  color: #1e1e1e;
  text-decoration: none;
}

.archive-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

}

.archive-card a {
  display: flex;
  justify-content: center;
  /* Centers child horizontally */
  align-items: center;
  /* Centers child vertically */
  height: 180px;
  /* Matches the max-height of your regular images */
}

/* Make images smaller */
.archive-card img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  max-height: 180px;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.archive-card .icon-thumbnail {
  max-width: 150px;
  max-height: 150px;
  display: block;
  margin: auto;
  object-fit: contain;
  background-color: #f7f7f7;
  padding: 20px;
}

/* Text inside the card */
.archive-card h3 {
  font-size: 20px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.archive-card p {
  font-size: 14px;
  font-family: "PTMono";
}

.archive-card:visited {
  color: #1e1e1e;
  text-decoration: none;
}


/* Footer */
.site-footer {
  background-color: #1E1E1E;
  padding: 2rem;
  color: #F7F7F7;
  margin-top: auto;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.footer-left {
  flex: 1;
  gap: 1rem;
  display: flex;
  flex-direction: column;
}

.footer-left h2 {
  font-size: 30px;
  color: #FFB800;
}

.footer-left p {
  font-size: 15px;
  color: #F7F7F7;
}

.footer-center {
  flex: 1;
  max-width: 300px;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;

}

.newsletter-inputs {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.newsletter-form label {
  margin-bottom: 1rem;
}

.newsletter-form input[type="email"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 25px;
  width: 600px;
}

.newsletter-form button {
  background-color: #F7F7F7;
  font-family: "PTMono";
  color: #1A5A8C;
  padding: 10px 20px;
  border: 2px #1A5A8C solid;
  cursor: pointer;
  border-radius: 25px;
  box-shadow: 0 0 0 2px #F7F7F7 inset;

}

.newsletter-form button:hover {
  background-color: #1A5A8C;
  color: #F7F7F7;
  border: 2px #F7F7F7 solid;
}

.footer-links {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: "OdibeeSans", sans-serif;
  font-size: 20px;
  margin-bottom: 0.5rem;
  color: #F7F7F7;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #FFB800;
}

/* ---------------------------------- */
/* Mobile and Tablet Styles (max-width: 768px) */
/* ---------------------------------- */
@media (max-width: 768px) {

  /* Header */
  .header-content {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .site-title {
    text-align: center;
    margin-bottom: 1rem;
  }

  .nav-links {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    /* Allows links to wrap to a new line */
    gap: 0.5rem;
  }

  .nav-links a {
    width: auto;
    font-size: 16px;
    /* Reduced font size for better fit */
    padding: 5px 10px;
    /* Reduced padding for better fit */
    margin: 5px;
    flex-shrink: 0;
  }

  /* Main */
  /* Main */
  .site-main {
    align-items: center;
    margin-top: 3rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* Sets a minimum height for the entire page, ensuring it's not too small */
    min-height: 100vh;
  }

  .main-text h1 {
    font-size: 28px;
    text-align: center;
    margin-bottom: 1rem;
  }

  #disclaimer {
    font-size: 16px;
    text-align: center;
    margin: 0 10px 20px 10px;
  }

  .main-content {
    width: 100%;
    height: auto;
    /* This ensures the content area can grow, but also has a minimum height */
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    flex-grow: 1;
  }

  .map-container {
    width: 100%;
    height: auto;
    /* This sets the map to 60% of the viewport height */
    min-height: 0;
    flex-grow: 1;
  }

  #map-menu {
    position: absolute;
    top: auto;
    bottom: 2rem;
    left: auto;
    max-width: 90%;
    width: auto;
  }

  #map-menu.hidden-menu {
    transform: translate(100vh, 0);
    transition: transform 0.3s ease-in-out;
  }

  #menu-toggle-button {
    font-family: "Odibee Sans" !important;
  }

  #menu-content {
    overflow-y: scroll;
  }

  /* Sidebar */
  #sidebar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 90%;
    height: auto;
    bottom: auto;
    padding: 1.5rem;
    z-index: 100;
  }

  #sidebar.hidden {
    transform: translate(-50%, -150%);
  }

  #archive-buttons {
    flex-direction: row;
    overflow-x: scroll;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
    justify-content: flex-start;
  }

  #archive-buttons button {
    flex-shrink: 0;
    width: auto;
  }

  /* Overlay */
  #archive-overlay {
    position: relative;
  }


  #archive-overlay.hidden {
    position: absolute;
    opacity: 0;
    height: 0;
  }

  #archive-previews {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    padding-top: 20rem;
    margin-bottom: 10px;
  }

  #no-entries {
    margin: auto;
    margin-bottom: 120px;
    padding: 20px;
    color: #f7f7f7;
  }

  .archive-card {
    width: 90%;
  }

  .card-text p {
    font-family: "PTMono";
  }

  /* Footer */
  .site-footer {
    padding: 20px 10px;;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-left {
    align-items: center;
  }

  .footer-left h2 {
    font-size: 32px;
  }

  .newsletter-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
  }

  .newsletter-form label {
    margin-bottom: 0;
    margin-right: 10px;
    white-space: nowrap;
  }

  .newsletter-inputs {
    flex-direction: row;
    justify-content: space;
    align-items: center;
    gap: 1rem;
  }

  .newsletter-form input[type="email"] {
    width: 100%;
  }

  .footer-links {
    justify-content: center;
  }
}