.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%;
  }
}
