/* Outdoor facilities details — interactive map + overview */
.outdoor-facilities-overview-section {
  padding-bottom: 40px;
}
@media screen and (max-width: 1200px) {
  .outdoor-facilities-overview-section {
    padding-bottom: 30px;
  }
}

.outdoor-facilities-stats {
  width: 100%;
  background-color: #fff;
  padding: 30px 40px;
  border-radius: 12px;
  margin-top: 40px;
}
@media screen and (max-width: 1200px) {
  .outdoor-facilities-stats {
    margin-top: 24px;
    padding: 20px;
  }
}

.outdoor-facilities-stats-items {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
@media screen and (max-width: 1200px) {
  .outdoor-facilities-stats-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 20px 24px;
  }
}

.outdoor-facilities-stats-item {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  position: relative;
  min-width: 0;
}
.outdoor-facilities-stats-item:not(:last-child) {
  padding-inline-end: 3%;
}
.outdoor-facilities-stats-item:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-end: 4%;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 57px;
  background-color: #e0e0e0;
}
@media screen and (max-width: 1200px) {
  .outdoor-facilities-stats-item {
    flex: unset;
    padding-inline-end: 0 !important;
  }
  /* Only draw a divider between the two columns, never on the outer edge */
  .outdoor-facilities-stats-item:not(:last-child)::after {
    display: none;
  }
  .outdoor-facilities-stats-item:nth-child(odd)::after {
    display: block;
    inset-inline-end: -12px;
  }
}
.outdoor-facilities-stats-item .stat-icon {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}
.outdoor-facilities-stats-item .stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.outdoor-facilities-stats-item .stat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.outdoor-facilities-stats-item .stat-label {
  font-size: 9px;
  color: #55575a;
}
.outdoor-facilities-stats-item .stat-value {
  font-size: 24px;
  color: #000;
}
@media screen and (max-width: 1200px) {
  .outdoor-facilities-stats-item .stat-icon {
    width: 56px;
    height: 56px;
  }
  .outdoor-facilities-stats-item .stat-value {
    font-size: 18px;
  }
}

/* —— Interactive map —— */
.interactive-map-section {
  --map-pin-scale: 1;
  --map-card-width: min(380px, calc(100% - 48px));
  position: relative;
  width: 100%;
  border-radius: 24px;
}

.interactive-map-section .map-scroller {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #e8ebe9;
  -webkit-overflow-scrolling: touch;
}

.interactive-map-section .map-wrapper {
  /* Sized by the image so % pin coords stay locked to map features */
  position: relative;
  width: 100%;
  line-height: 0;
}

.interactive-map-section .map-image {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.interactive-map-section .map-pin {
  position: absolute;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  /* Physical left — map image does not mirror in RTL */
  transform: translate(-50%, -50%);
  z-index: 5;
  direction: ltr;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.interactive-map-section .map-pin::after {
  content: "";
  position: absolute;
  inset: -14px;
}
.interactive-map-section .map-pin-visual {
  display: flex;
  align-items: center;
  flex-direction: row;
  transition: filter 0.25s ease;
}
.interactive-map-section .map-pin:hover .map-pin-visual,
.interactive-map-section .map-pin:focus-visible .map-pin-visual {
  outline: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.interactive-map-section .map-pin:focus-visible {
  outline: none;
}
.interactive-map-section .map-pin.active {
  z-index: 6;
}
.interactive-map-section .map-pin svg {
  display: block;
  flex-shrink: 0;
  width: calc(157px * var(--map-pin-scale));
  height: calc(37px * var(--map-pin-scale));
}
/* Flip label + stem leftward when the pin sits near the right edge */
.interactive-map-section .map-pin.map-pin--flip .map-pin-visual {
  flex-direction: row-reverse;
}
.interactive-map-section .map-pin.map-pin--flip svg {
  transform: scaleX(-1);
}
.interactive-map-section .pin-label {
  font-family: inherit;
  font-size: calc(11px * var(--map-pin-scale));
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: calc(3px * var(--map-pin-scale)) calc(8px * var(--map-pin-scale));
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
  line-height: 1.3;
  max-width: calc(140px * var(--map-pin-scale));
  overflow: hidden;
  text-overflow: ellipsis;
}
.interactive-map-section .map-pin.active circle {
  fill: #1e988a;
}

/* Desktop / tablet floating card */
.map-card-panel {
  position: absolute;
  top: 32px;
  inset-inline-end: 32px;
  width: var(--map-card-width, min(380px, calc(100% - 48px)));
  max-height: calc(100% - 48px);
  background: #ffffff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  z-index: 20;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.map-card-panel.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.map-card-panel .map-card-header {
  position: relative;
  padding-inline-end: 36px;
  margin-bottom: 4px;
}
.map-card-panel .card-close-btn {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  margin: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.map-card-panel .card-close-btn img {
  display: block;
  width: 24px;
  height: 24px;
}
.map-card-panel .card-close-btn:hover,
.map-card-panel .card-close-btn:focus-visible {
  background-color: rgba(0, 0, 0, 0.06);
  outline: none;
}
.map-card-panel .card-header-title {
  font-size: 20px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 16px;
  line-height: 1.3;
}
.map-card-panel .card-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f0f2f1;
}
.map-card-panel .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}
.map-card-panel .card-description {
  font-size: 14px;
  color: #555555;
  line-height: 1.6;
  margin: 0;
}
.map-card-panel .card-description p {
  margin: 0;
}
.map-card-panel .card-description p + p {
  margin-top: 0.75em;
}

/* Backdrop — desktop inactive, mobile sheet overlay */
.map-card-backdrop {
  display: none;
}

/* —— Tablet —— */
@media (max-width: 991px) {
  .interactive-map-section {
    --map-pin-scale: 0.78;
    --map-card-width: min(340px, calc(100% - 40px));
  }
  .map-card-panel {
    top: 20px;
    inset-inline-end: 20px;
    padding: 20px;
    max-height: calc(100% - 32px);
  }
  .map-card-panel .card-header-title {
    font-size: 18px;
    margin-bottom: 12px;
  }
  .map-card-panel .card-media {
    margin-bottom: 12px;
  }
}

/* —— Mobile: panable map + bottom sheet —— */
@media (max-width: 767px) {
  .interactive-map-section {
    --map-pin-scale: 0.62;
    border-radius: 16px;
  }

  .interactive-map-section .map-scroller {
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }

  .interactive-map-section .map-wrapper {
    width: max(100%, 640px);
  }

  .interactive-map-section .map-pin::after {
    inset: -16px;
  }

  /* Bottom sheet — also applies when portaled to body (avoids ancestor transform traps) */
  .map-card-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 41, 45, 0.45);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .map-card-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .map-card-panel {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    inset-inline: 0 !important;
    width: 100% !important;
    max-width: none !important;
    max-height: min(78vh, 560px);
    border-radius: 20px 20px 0 0;
    padding: 12px 20px 24px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
    z-index: 1050;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .map-card-panel::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #d0d4d3;
    margin: 0 auto 16px;
  }

  .map-card-panel.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  .map-card-panel .map-card-header {
    padding-inline-end: 40px;
  }

  .map-card-panel .card-header-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  /* Keep close control fully inside the sheet (no negative offsets) */
  .map-card-panel .card-close-btn {
    top: 0;
    inset-inline-end: 0;
    margin: 0;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .interactive-map-section {
    --map-pin-scale: 0.55;
  }

  .interactive-map-section .map-wrapper {
    width: max(100%, 560px);
  }

  .map-card-panel {
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .map-card-panel .card-description {
    font-size: 13px;
  }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .interactive-map-section .map-pin,
  .map-card-panel,
  .map-card-backdrop {
    transition: none;
  }
}

body.map-card-open {
  overflow: hidden;
}
