a {
  color: #6a5acd;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover,
a:focus {
  color: #483d8b;
  text-decoration: underline;
}

/* Basic Reset & Body Styling */
body,
html {
  margin: 0;
  padding: 0;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  line-height: 1.1;
  color: #333;
  background-color: #f4f1eb;
}

.color-code-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
  opacity: 0.5;
}

.road-color-ramp {
  height: 14px;
  border-radius: 3px;
  border: 1px solid #ccc;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Merriweather', serif;
  color: #4a3f35;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 2.5em;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.15em 0;
}

h2 {
  font-size: 1.8em;
  border-bottom: 2px solid #d3c8b4;
  padding-bottom: 0.2em;
  margin-bottom: 1em;
}

.header-link {
  margin-left: 1em;
  margin-right: 16px;
  font-family: 'Merriweather', serif;
  color: #f4f1eb !important;
  font-size: 1em;
  font-weight: 700;
  background: none;
  text-decoration: none;
  transition: text-decoration 0.2s;
}

.header-link:hover {
  text-decoration: underline;
}

.info-button {
  justify-content: right;
}

.legend-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 10px;
  white-space: nowrap;
}

.road-legend-labels {
  position: relative;
  height: 12px;
  margin-top: 4px;
}

.legend-title {
  font-weight: bold;
  margin-bottom: 5px;
  text-align: center;
}

.logo-image {
  max-height: 80px;
  margin-top: 5px;
  margin-right: 10px;
}

.main-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
}

#map {
  height: 90%;
  flex-grow: 1;
}

.map-legend {
  position: absolute;
  bottom: 12px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 14px;
  border-radius: 6px;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.25);
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #333;
  width: 23%;
}

.map-overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 20px;
  z-index: 10;
  border: 1px solid #e0d9cd;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  max-width: 50%;
}

.map-section {
  position: relative;
  width: 99%;
  height:56em ;
  padding: 0;
  border: none;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  margin-bottom: 30px;
  border: 1px solid #e0d9cd;
  border-radius: 3px;
}

.map-section h2 {
  padding: 15px 30px 5px 30px;
  margin: 0;
  border-bottom: none;
  background-color: #ffffff;
}

#more-content {
  display: none;
}

#opener-content {
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin-top 0.3s ease, margin-bottom 0.3s ease;
}

.noUi-connect {
  background-color: rgb(1, 134, 1);
}

.opener-section {
  position: absolute;
  top: 20px;
  left: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 15px;
  z-index: 10;
  border: 1px solid #e0d9cd;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  max-width: 300px;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.opener-section.collapsed {
  max-height: 40px;
  padding: 10px;
}

.opener-section.collapsed #opener-content {
  opacity: 0;
  max-height: 0;
  padding: 0;
  margin-top: -10px;
}

.opener-text.collapsed {
  padding: 10px;
}

.opener-text.collapsed #opener-content {
  opacity: 0;
  max-height: 0;
  padding: 0;
  overflow: hidden;
}

.opener-toggle {
  background-color: rgba(255, 255, 255, 0.7);
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9em;
  z-index: 11;
}

.opener-toggle:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

p {
  margin-bottom: 1em;
}

.site-footer {
  text-align: center;
  margin-top: 30px;
  padding: 15px;
  font-size: 0.9em;
  color: #15530d;
  border-top: 1px solid #d3c8b4;
}

#home-logo{
    width: 3em;
}
.site-header {
  background-color: #15530d;
  color: #f4f1eb;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  flex-wrap: nowrap;
}

.site-header h1 {
  color: #f4f1eb;
  margin-left: 10px;
  font-size: 2.5em;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1;
}

.slider-with-background-container {
  position: relative;
  width: calc(100% - 47px);
  margin: 20px 22px 0 25px;
  min-height: 50px;
  display: flex;
  align-items: center;
  background-color: rgb(216, 204, 187);
  box-sizing: border-box;
}

.support-section {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  background-color: #ffffff;
  padding: 20px 30px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e0d9cd;
  border-radius: 3px;
}

#support-text {
  margin-right: auto;
}

#year-slider {
    margin-top: 10px;
  margin-left: 25px;
  margin-right: 22px;
  background-color: rgb(216, 204, 187);
}

/* Responsive Adjustments */
@media (max-width: 1080px) {
  .color-code {
    position: absolute;
    top: 0;
    margin: 5px;
    left: 0;
    width: 100%;
    height: 100px;
    object-fit: cover;
    z-index: -1;
    opacity: 0.5;
  }

  .content-wrapper {
    padding: 0 10px;
    margin: 10px auto;
  }

  .info-button {
    width: 100%;
    margin-bottom: 0.5em;
    justify-content: center;
  }

  .map-section {
    height: 675px;
    width: 100%;
    touch-action: none;
    overflow: hidden;
  }

  .site-header h1 {
    margin-left: 5px;
    font-size: 1.2em;
    overflow: hidden;
  }

  .slider-with-background-container {
    width: calc(100% - 47px);
    margin-left: 25px;
    margin-right: 22px;
  }

  .support-section {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  #support-text {
    margin-right: 0;
    margin-bottom: 1em;
  }

  h1 {
    font-size: 0.8em;
  }

  h2 {
    font-size: 1.1em;
  }
}