.construction-index-map {
  width: 100%;
  display: grid;
  grid-template-columns: min(40vw, 514px) 1fr 1fr;
  gap: 15px;
}

.construction-index-map .region-map {
  grid-column: 1;
  grid-row: span 2;
  width: 100%;
  height: auto;
  align-self: start;
}

.construction-index-page h1 {
  border-top: 4px solid #00000040;
  padding-top: 15px;
  text-transform: none;
  font-weight: 100;
  font-family: 'Open Sans Condensed';
  color: var(--sddot-branding-red);
}

.region-path {
  cursor: pointer;
  fill: transparent;
}

/* Only apply hover effects on devices that support true hover */
@media (hover: hover) {
  .construction-index-map .region-path:hover {
    stroke: var(--construction-index-map-region-color-selected);
    stroke-width: 40px;
    fill: var(--construction-index-map-region-color-hover);
  }
}

/* For touch devices, show hover state only during active touch */
@media (hover: none) {
  .construction-index-map .region-path:active,
  .construction-index-map .region-path:focus {
    stroke: var(--construction-index-map-region-color-selected);
    stroke-width: 40px;
    fill: var(--construction-index-map-region-color-hover);
  }
}

.construction-index-map fieldset {
  display: block;
  width: 100%;
  height: auto;
  border: none;
  padding: 0;
  margin: 0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.construction-index-map fieldset label {
  display: inline-block;
  margin-bottom: 0px;

  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 25px); /* Adjust based on your radio button width */
}

.construction-index-map .radio-label-group {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.construction-index-map fieldset input[type='radio'] {
  display: inline;
  width: auto;
  margin: 0 5px 0 0;
  flex-shrink: 0;
}

.construction-index-map .area-selection {
  grid-column: 2;
  grid-row: span 2;
}

.construction-index-map .project-stage-selection {
  grid-column: 3;
}

.construction-index-map .project-type-selection {
  grid-column: 3;
}

.construction-index-map .area-selection > div.desktop-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.construction-index-map .desktop-controls {
  padding: 15px;
}

.construction-index-map .desktop-controls input[type='radio'] {
  accent-color: var(--project-tabs-color);
}

.construction-index-page ul {
  padding: 0;
  margin: 0;
}

.construction-index-page ul .project-item ul {
  padding-left: 20px;
  margin: 0;
}
.construction-index-page ul .project-item ul li {
  font-size: normal;
  color: #666666;
}

.construction-index-page .project-item {
  list-style-type: none;
  margin-top: 30px;
}
.construction-index-page .project-item a {
  font-size: larger;
  text-decoration-line: none;
  text-decoration-style: none;
  text-decoration: none;
  border-bottom: 1px solid var(--sddot-branding-red);
}

.construction-index-map .desktop-controls .region-group h3 {
  padding: 0;
  color: var(--project-tabs-color);
  font-weight: bold;
  border: none;
  padding: 0;
  margin: 0;
  font-size: large;
  margin-bottom: 10px;
}

.construction-index-map .filter-selection > div {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.construction-index-map .filter-selection .region-group {
  flex: 1;
  min-width: 200px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
}

.construction-index-map .filter-selection .region-group h3 {
  margin: 0 0 10px 0;
  padding: 0;
  font-size: 1.1em;
  color: var(--project-tabs-color);
  font-weight: bold;
}

.construction-index-map .desktop-controls .radio-label-group label {
  font-size: 0.888889em;
}

/* Mobile layout */
@media screen and (max-width: 768px) {
  .construction-index-map {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .construction-index-map .region-map,
  .construction-index-map .area-selection,
  .construction-index-map .project-stage-selection,
  .construction-index-map .project-type-selection {
    grid-column: 1;
    grid-row: span 1;
  }

  .construction-index-map .region-map {
    width: 100%;
  }

  .construction-index-map .filter-selection .region-group {
    flex: 0 0 100%;
  }
}

/* Mobile controls */
.mobile-controls {
  display: none;
}

.mobile-controls select {
  width: 100%;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  background-color: white;
  font-size: 16px; /* Prevents iOS zoom */
  -webkit-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 30px;
}

/* Mobile layout */
@media screen and (max-width: 768px) {
  .construction-index-map {
    flex-direction: column;
  }

  .construction-index-map .region-map {
    max-width: 100%;
  }

  .construction-index-map .desktop-controls {
    display: none !important; /* Override any other display rules */
  }

  .construction-index-map .mobile-controls {
    display: block !important; /* Ensure mobile controls show */
  }

  .filter-selection .mobile-controls {
    display: flex;
    gap: 10px;
  }

  .filter-selection .mobile-controls select {
    flex: 1;
  }
}

.no-results {
  display: none;
}

.result-count {
  font-size: 1em;
  font-weight: normal;
  margin-bottom: 10px;
  color: var(--sddot-branding-black);
  margin-top: 8px;
}

.project-item p.project-byline {
  font-weight: normal;
  color: var(--sddot-branding-black);
  padding-bottom: 0px;
}

.project-item p.project-additional-detail {
  color: var(--sddot-branding-gray-light);
  padding-bottom: 12px;
  padding-top: 8px;
}

.project-item a.project-link {
  display: inline-block;
  padding: 6px 10px;
  background-color: var(--secondary-button-background-color);
  color: var(--secondary-button-color);
  text-decoration: none;
  border: 1px solid var(--secondary-button-border-color);
  border-radius: 4px;
  transition: var(--button-transition);
  font-weight: 300;
  text-align: center;
  font-size: smaller;
}

.project-item a.project-link:hover {
  background-color: var(--secondary-button-background-color-hover);
  border-color: var(--secondary-button-border-color-hover);
}

.project-item a.project-link:active {
  background-color: var(--secondary-button-background-color-active);
  border-color: var(--secondary-button-border-color-active);