/* ==========================================================================
   Layout & Map Container
   ========================================================================== */
.content-area {
  width: 70%;
	padding-bottom: 40px;
	margin:0 auto;
}
@media screen and (max-width: 1100px){
	.content-area {
  		width: 100%;
	}
}

#projects-map {
  height: 800px;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
}
@media screen and (max-width: 1100px){
	#projects-map {
  		height: 600px;
	}
}

/* ==========================================================================
   Mapbox Marker Styles
   ========================================================================== */
.mapbox-marker {
  background-color: #253746; /* Primary */
  border: 3px solid #A5B4A0; /* Secondary */
  border-radius: 50%;
  width: 18px;
  height: 18px;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.mapbox-marker:hover {
  transform: scale(1.3);
}

/* ==========================================================================
   Mapbox Popup Styles
   ========================================================================== */
.mapboxgl-popup-content {
  position: relative;
  padding: 24px 20px 15px 20px;
  font-family: inherit;
  font-size: 14px;
  color: #253746;
  background: white;
  border: 2px solid #253746;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.mapboxgl-popup-content strong {
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

.mapboxgl-popup-content a {
  color: #2C2C2C;
    background-color: #A5B4A0;
    font-weight: bold;
    text-decoration: none;
    padding: 6px 10px;
    margin-top: 10px;
    display: inline-block;
	text-transform:uppercase;
}

.mapboxgl-popup-content a:hover {
  color: #fff;
    background-color: #253746;
    font-weight: bold;
    text-decoration: none;
    padding: 6px 10px;
    margin-top: 10px;
    display: inline-block;
	text-transform:uppercase;
}

.mapboxgl-popup-close-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  color: #253746;
  font-size: 20px;
  text-align: center;
  cursor: pointer;
}

.mapboxgl-popup-close-button:hover {
  color: #A5B4A0;
}

/* Popup arrow adjustments */
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
  border-bottom-color: #253746 !important;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
  border-top-color: #253746 !important;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
  border-right-color: #253746 !important;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
  border-left-color: #253746 !important;
}

/* ==========================================================================
   Active Filter Display
   ========================================================================== */
#active-filter-info {
  padding: 10px 0;
}

/* ==========================================================================
   Filter Panel Layout
   ========================================================================== */
.project-map-filters {
  display: flex;
  flex-wrap: wrap;
  font-family: inherit;
  font-size: 16px;
  position: relative;
  margin: 20px 0;
}

.filter-group {
  position: relative;
	display: inline-block;
  cursor: pointer;
  min-width: 360px;
  padding: 18px;
  background-color: #3e5a71;
    color: #fff;
  font-weight: 600;
  text-transform: uppercase;
}
.filter-group .filter-label{
	letter-spacing: 1px;
}
/* Service filter specific style */
.filter-group:nth-child(2) {
  background-color: #a4b29b;
    color: #222;
}

/* Indicator caret */
.filter-group::before {
  content: '›';
  display: inline-block;
  margin-right: 8px;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.filter-group:hover::before {
  transform: rotate(90deg);
}

/* ==========================================================================
   Dropdown Filter Lists
   ========================================================================== */
.filter-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; /* Aligns submenu with parent */
  z-index: 999;
  width: max-content; /* Grow to fit content */
  min-width: 360px;
  padding: 0;
	margin: 0;
  border-radius: 0 0 6px 6px;
  background-color: #3e5a71;
    color: #fff;
  list-style: none;
  overflow: visible; /* Prevent clipping */
}

/* Blue background for Service filter */
.filter-group:nth-child(2) .filter-list {
  background-color: #a4b29b;
    color: #222;
}

.filter-group:hover .filter-list {
  display: grid;
  grid-template-columns: repeat(2, auto); /* Use auto instead of fixed fraction */
  gap: 0.5rem 1.5rem;
}

.filter-list li {
  padding: 0.3rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  color: inherit;
	text-transform: capitalize;
    font-weight: 400;
}

/* Light hover for both Market and Service dropdowns */
.filter-list li:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.filter-list li.active {
  font-weight: bold;
  text-decoration: underline;
}


/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media screen and (max-width: 768px) {
  .project-map-filters {
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
  }

  .filter-list {
    grid-template-columns: 1fr;
  }
	.filter-group:hover .filter-list {
    grid-template-columns: 1fr; /* Switch to single column */
    width: 100vw;               /* Full screen width for better fit */
    left: 0;                    /* Align to viewport */
    right: 0;                   /* Extend full width */
    padding: 0;
		margin:0;
  }

  .filter-list {
    border-radius: 0;
  }

  .filter-list li {
    padding: 0.5rem ;
  }
}


/* Clustering bubbles */
.mapboxgl-canvas {
  outline: none;
}

.mapboxgl-popup-content a {
  word-break: break-word;
}

.mapboxgl-popup {
  z-index: 10000;
}
