/* Reset and Base Styles */
* {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: "Kantumruy Pro", sans-serif;
    background-color: #f4f4f4;
    font-size: 16px;
    padding-top: 8vh;
  }
  
  /* Only apply full-height and flex to the homepage */
  body.homepage {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  
  #map {
    flex: 1;
    position: relative;
    width: 100%;
    z-index: 1;
  }
  
  /* Header and Title */
  header {
    font-family: "Oswald", sans-serif;
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    padding: 1vh 1vw; 
    position: fixed;
    top: 0;
    width: 100%;
    height: 8vh; 
    min-height: 65px; 
    z-index: 10000;
  }

  .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    height: 100%;
  }
  
  .page-title {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 1.8rem;
    color: #333;
    padding: 0 0.5rem; /* prevent touching edges */
  }
  
.spacer {
    width: 40px; /* Gives balance for the page title */
    flex-shrink: 0;
  }

  /* Kebab Dropdown */
  .dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 1001; 
  }

  .dropdown-toggle {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #333;
    padding: 0;
  }

  .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    margin-top: 0.5rem;
    min-width: 150px;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 9999; 
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  
  /* When dropdown is open */
  .dropdown.open .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
  }

  .dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
  }
  .dropdown-menu a:hover {
    background-color: #f0f0f0;
  }
  
  /* Info Box */
  #info-box {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 475px;
    max-height: 75vh;
    overflow-y: auto;
    background-color: #fff;
    padding: 1em;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    z-index: 900;
    display: none;
  }

  #info-box h2 {
    background-color: #dfe8dd; /* light sage accent */
    padding: 0.4em 0.2em;
    margin: 0; /* remove any default margin */
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  .image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 78.55%;
    overflow: hidden;
  }

  #info-box img {
    position: absolute;
    top: 0;
    left: 0;
    object-fit: contain; 
    width: 100%;
    border-radius: 8px;
    margin: 0.5em 0;
    transition: opacity 0.3s ease-in-out;
  }

  #endangered-species li {
    margin-bottom: 0.3em;
  }
  
  /* Marker Styles */
  .marker {
    display: block;
    border-radius: 50%;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    border: 2px solid #9CAF88;
  }

  .marker:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
  }

  .dropdown-menu a:hover {
    background-color: #e5f0e1;
    color: #6c8354;
  }
  
  /* Footer */
  footer {
    background-color: #fff;
    border-top: 1px solid #ccc;
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
    font-family: "Oswald", sans-serif;
    text-align: center;
    z-index: 1000;
  }

  footer details summary {
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
  }

  footer summary:hover {
    background-color: #dfe8dd; /* light sage accent */
    padding: 0.5em 1em;
    border-radius: 8px;
  }

  footer p {
    margin: 0.5rem 3rem;
  }

  #close-info-box {
    background: none;
    border: none;
    font-size: 1.5rem;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #555;
    display: none; /* Hidden by default (desktop) */
  }
  
  @media (max-width: 768px) {
    body {
        font-size: 0.9rem; /* Scale down base text size */
      }
    
      header {
        padding: 2rem 1rem;
        min-height: 90px; 
      }

      .spacer {
        width: 0px;
      }
    
      .page-title {
        font-size: 1.2rem; /* Shrink page title slightly */
      }
    
      .dropdown-toggle {
        font-size: 1.4rem; /* Shrink kebab menu icon a little */
      }
    
      #info-box {
        font-size: 0.9rem; /* Slightly smaller info box text */
      }
    
      #info-box h2 {
        font-size: 1.2rem;
      }
    
      #info-box h3, 
      #info-box h4 {
        font-size: 1rem;
      }
    
      #info-box p, 
      #info-box ul, 
      #info-box li {
        font-size: 0.85rem;
      }
    
      footer {
        font-size: 0.85rem; /* Make footer text a little smaller too */
      }

    #close-info-box {
      display: block; /* Show button only on smaller screens */
    }
  }
  
  /* Responsive Info Box */
  @media (max-width: 768px) {
    #info-box {
      width: 90%;
      left: 5%;
      right: 5%;
      top: 100px;
      position: fixed;
    }
  }
  
  /* Works Cited Page Styling */
.works-cited-content {
    padding: 2rem;
    margin-top: 2vh;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.works-section {
    margin-bottom: 3rem;
}

.works-section h2 {
    border-bottom: 2px solid #9CAF88; /* Soft green underline */
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: #444;
}

.works-list {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.works-list li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
}

.works-list a {
    color: #3d6651;
    text-decoration: underline;
}

.works-list a:hover {
    color: #6c8354;
    text-decoration: none;
}
