/* =========================
   Map Section - Base Styles
========================= */
.map-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 80px;
  min-height: max-content;
  background-size: 80%;
  background-repeat: no-repeat;
  background-position: center;
  flex-wrap: wrap;
  position: relative;
}

.map-left {
  position: relative; /* Add this */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.flex-row{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.map-title {
  font-weight: 300;
  color: #162447;
  margin-bottom: 40px;
  line-height: 1.2;
  word-wrap: break-word; /* Just in case */
}

.map-lists {
  display: flex;
  gap: 40px;
  margin-bottom: 30px;
}


.map-list .label {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  font-weight: 700 !important;
}

.map-list .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.dot-ncr {
  background: #ffb200;
}

.dot-provincial {
  background: #2176ff;
}

.map-list ul {
  list-style: none;
  padding: 0 18px;
  margin: 0;
  line-height: 1.7;
  letter-spacing: 1px;
  font-size: 1rem;
}

.map-right {
  display: flex;
  flex-direction: column;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  gap: 5rem;
  padding-right: 40px;
}

.map-middle {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 100%;
  justify-content: center;
  gap: 5rem;
}

.map-image {
  width: 680px;
  max-width: 100%;
  margin-bottom: 0;
}

.map-locations {
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  gap: 1rem;
}

.locations-count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 80px;
}

.locations-count-number {
  font-size: 55px;
  color: #ffb200;
  font-weight: 500;
}

.locations-label {
  font-size: 55px;
  color: #162447;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.locations-sub {
  font-size: 24px;
  color: #162447;
  position: relative;top: 12;
}
.locations-sub2{
  display: flex;
  justify-content: flex-start;
  font-size: 24px;
  color: #162447;
  position: relative;
  top: -8;
}


.locations-breakdown {
  font-size: 24px;
  color: #162447;
  margin: 20px 0 30px;
  width: 210px;
  text-align: left;
}

.map-legend {
  font-size: 16px;
  color: #162447;
  text-align: right;
}

.map-legend div {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 240px;
  margin-bottom: 5px;
}

.map-legend .legend-count {
  font-size: 32px;
  color: #ffb200;
  font-weight: 600;
  margin-right: 6px;
}

.segment-legend {
  font-size: 16px;
  color: #162447;
  font-weight: 300;
  text-align: left;
  line-height: 18px;
}

p.segment-legend:nth-of-type(1),
p.segment-legend:nth-of-type(2) {
  width: 120px;
  display: inline-block;
}

.map-legend p:nth-of-type(3) .segment-legend {
  width: 180px;
  display: inline-block;
}

/* =========================
   Tablet Landscape: ≤ 1024px
========================= */
@media screen and (max-width: 1240px) {
  .map-section {
    flex-direction: column;
    padding: 40px 40px;
    align-items: flex-start;
    height: max-content !important;
  }

  .map-title {
    position: static;
    font-size: 42px;
    margin-bottom: 20px;
    text-align: center;
  }

  .map-left {
    padding-left: 0;
    width: 100%;
  }

  .map-lists {
    padding: 0;
    gap: 20px;
    justify-content: center;
  }

  .map-right {
    width: 100%;
    padding-right: 0;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
  }

  .map-locations {
    align-items: flex-start;
    text-align: left;
  }

  .map-legend {
    text-align: left;
  }
}

/* =========================
   Tablet Portrait: ≤ 768px
========================= */
@media screen and (max-width: 768px) {
  .map-section {
    padding: 30px 20px;
  }

  .map-title {
    font-size: 36px;
    margin-top: 20px;
  }

  .flex-row{
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .map-left,
  .map-right,
  .map-middle {
    width: 100%;
    padding: 0;
    align-items: center;
    justify-content: center;
  }

  .map-lists {
    gap: 20px;
    padding: 0;
  }

  .map-image {
    width: 100%;
  }

  .locations-count-number,
  .locations-label {
    font-size: 40px;
  }

  .locations-sub,
  .locations-breakdown {
    font-size: 18px;
    width: 100%;
  }
  .map-legend .legend-count {
    font-size: 28px;
  }

  .segment-legend {
    font-size: 14px;
  }
}

/* =========================
   Mobile Portrait: ≤ 480px
========================= */
@media screen and (max-width: 480px) {
  .map-title {
    font-size: 28px;
  }

  .map-list ul {
    font-size: 16px;
  }

  .locations-count-number,
  .locations-label {
    font-size: 28px;
  }

  .locations-sub,
  .locations-breakdown {
    font-size: 16px;
  }

  .map-legend .legend-count {
    font-size: 24px;
  }

  .segment-legend {
    font-size: 13px;
  }
}
