.map-section {
  height: auto;
}

.map-wrapper {
  height: 100%;
}

.map-layout {
  display: flex;
  flex-direction: column-reverse;
  gap: 20px;
}

@media (min-width: 768px) {
  .map-layout {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.map-frame {
  width: 100%;
  height: 335px;
}

@media (min-width: 768px) {
  .map-frame {
    width: 50%;
    height: auto;
  }
}

.map-frame iframe {
  width: 100%;
  height: 335px;
}

.map-content {
  width: 70%;
}

@media (max-width: 768px) {
  .map-content {
    margin: auto;
  }
}

.map-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.addresses {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (min-width: 768px) {
  .addresses {
    flex-direction: row;
    justify-content: space-between;
  }
}

.address_title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.address_title span {
  font-size: 18px;
  color: var(--address-color);
}

body.dark .address_title span {
  color: var(--address-color-dark);
}

.address p {
  margin-right: 8px;
  font-size: 18px;
  color: var(--address-text-color);
}

body.dark .address p {
  color: var(--address-text-color-dark);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .features {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.feature img {
  width: 36px;
  height: 36px;
}

.feature h3 {
  font-size: 24px;
  font-weight: bold;
  color: var(--feature-number-color);
}

body.dark .feature h3 {
  color: var(--feature-number-color-dark);
}

.feature p {
  font-size: 14px;
  margin-top: 0px;
  color: var(--feature-name-color);
}

body.dark .feature p {
  color: var(--feature-name-color-dark);
}

.features-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

.features-grid-2x2 .feature {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
}

/* Mobile: features in one scrollable row */
@media (max-width: 767.98px) {
  .map-section .features,
  .map-section .features-grid-2x2 {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .map-section .features::-webkit-scrollbar,
  .map-section .features-grid-2x2::-webkit-scrollbar { display: none; }
  .map-section .features .feature {
    flex: 0 0 40%;
    scroll-snap-align: start;
    padding: 12px 8px;
  }
}

/* No map or image: center the content across the full width */
.map-layout--no-media {
  justify-content: center;
}

.map-layout--no-media .map-content {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.map-layout--no-media .addresses {
  justify-content: center;
  gap: 40px;
  text-align: center;
}

.map-layout--no-media .address_title {
  justify-content: center;
}

.map-layout--no-media .address p {
  margin-left: 0;
  margin-right: 0;
}

@media (min-width: 768px) {
  .map-layout--no-media .features {
    width: 100%;
  }
}

/* ===== Saudi map with branch pins ===== */
.map-frame.ksa-map {
  height: auto;
  --ksa-stroke: rgba(75, 90, 65, .55);
  --ksa-glow: rgba(75, 90, 65, .18);
  --ksa-pin: var(--primary-color, #4b5a41);
}

body.dark .map-frame.ksa-map {
  --ksa-stroke: rgba(214, 226, 204, .6);
  --ksa-glow: rgba(140, 190, 130, .22);
}

.ksa-map__canvas {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
}

.ksa-map__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.ksa-map__glow {
  fill: none;
  stroke: var(--ksa-glow);
  stroke-width: 7;
  stroke-linejoin: round;
}

.ksa-map__regions path {
  fill: none;
  stroke: var(--ksa-stroke);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.ksa-map__dots circle {
  fill: none;
  stroke: var(--ksa-stroke);
  stroke-width: 1.4;
}

.ksa-map__pin {
  position: absolute;
  z-index: 1;
  width: 0;
  height: 0;
  color: inherit;
  text-decoration: none;
}

.ksa-map__pin:hover {
  z-index: 2;
}

.ksa-map__marker {
  position: absolute;
  bottom: 0;
  left: -12px;
  width: 24px;
  height: 32px;
  fill: var(--ksa-pin);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
  transition: transform .2s ease;
  transform-origin: 50% 100%;
}

a.ksa-map__pin:hover .ksa-map__marker {
  transform: scale(1.12);
}

.ksa-map__card {
  position: absolute;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: max-content;
  padding: 8px 12px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  text-align: start;
  line-height: 1.3;
  white-space: nowrap;
}

.ksa-map__pin--right .ksa-map__card { left: 16px; }
.ksa-map__pin--left .ksa-map__card { right: 16px; }
.ksa-map__pin--top .ksa-map__card { bottom: 38px; left: 0; transform: translateX(-50%); }
.ksa-map__pin--bottom .ksa-map__card { bottom: auto; top: 6px; left: 0; transform: translateX(-50%); }

.ksa-map__branch {
  font-size: 12px;
  color: #6b6f68;
}

.ksa-map__card strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--address-color, #262b22);
}

body.dark .ksa-map__card strong {
  color: var(--address-color-dark, #262b22);
}

.ksa-map__list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font-size: 15px;
}

.ksa-map__list:not(:has(li)) {
  display: none;
}

.ksa-map__list span {
  opacity: .7;
}

@media (max-width: 767.98px) {
  .map-frame.ksa-map {
    height: auto;
  }

  .ksa-map__marker {
    left: -9px;
    width: 18px;
    height: 24px;
  }

  .ksa-map__card {
    bottom: 16px;
    padding: 5px 8px;
  }

  .ksa-map__pin--right .ksa-map__card { left: 11px; }
  .ksa-map__pin--left .ksa-map__card { right: 11px; }
  .ksa-map__pin--top .ksa-map__card { bottom: 29px; left: 0; }
  .ksa-map__pin--bottom .ksa-map__card { bottom: auto; top: 5px; left: 0; }

  .ksa-map__branch { font-size: 10px; }
  .ksa-map__card strong { font-size: 12px; }
}
