/* =============================================
   GRAND AMENITIES  (Figma 175:3613 "Frame 2147224953", 1920×1080)
   Full-bleed pool photo, cream slider card at 81,221.
   All measurements are Figma design px via --dpx.
   ============================================= */

.sec-amenities .sec-canvas {
  height: calc(1080 * var(--dpx));
  background: var(--cream);
}

.sec-amenities:focus { outline: none; }

/* ---- Photo — 175:3614 "World-34 1": 2168×1084, left 0, centred vertically (top -2) ---- */
.sec-amenities .amen-photo {
  position: absolute;
  left: 0;
  top: 50%;
  width: calc(2168 * var(--dpx));
  height: calc(1084 * var(--dpx));
  transform: translateY(-50%);
  background: var(--cream-dark);
  z-index: 1;
}

/* Two stacked layers; .is-front is the visible slide, the other one is the crossfade buffer */
.sec-amenities .amen-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
  opacity: 0;
  z-index: 1;
}
.sec-amenities .amen-photo-img.is-front {
  opacity: 1;
  z-index: 2;
}

/* ---- Card — 175:3615 "Frame 2147224616": 569×639 @ 81,221 ---- */
.sec-amenities .amen-card {
  position: absolute;
  left: calc(81 * var(--dpx));
  top: calc(221 * var(--dpx));
  width: calc(569 * var(--dpx));
  height: calc(639 * var(--dpx));
  background: var(--cream);
  overflow: hidden;
  z-index: 2;
}

/* Counter — 175:3616: Neue Haas 55 Roman 18/33, tracking 2.7, #4e4e50, centred on x 79.5 @ top 42 */
.sec-amenities .amen-counter {
  position: absolute;
  left: calc(79.5 * var(--dpx));
  top: calc(42 * var(--dpx));
  transform: translateX(-50%);
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: max(calc(18 * var(--dpx)), 13px);
  line-height: 1.833;
  letter-spacing: calc(2.7 * var(--dpx));
  color: var(--text-mid);
  text-align: center;
  white-space: nowrap;
}

/* Title — 175:3617: Loren Blake 64/66 @ 51,105, width 375 ("grand" dark, "Amenities" gold) */
.sec-amenities .amen-title {
  position: absolute;
  left: calc(51 * var(--dpx));
  top: calc(105 * var(--dpx));
  width: calc(375 * var(--dpx));
  line-height: calc(66 * var(--dpx));
}

/* Prev / next — 175:3619: two 49.3px rounds, gap 15 @ 51,265 */
.sec-amenities .amen-nav {
  position: absolute;
  left: calc(51 * var(--dpx));
  top: calc(265 * var(--dpx));
  display: flex;
  align-items: center;
  gap: calc(15 * var(--dpx));
}

.sec-amenities .amen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: calc(49.3 * var(--dpx));
  height: calc(49.3 * var(--dpx));
  padding: 0;
  border-radius: 50%;
  background: var(--cream-mid);
  color: var(--dark);
  transition: background-color 0.3s var(--ease-out);
}
.sec-amenities .amen-btn:hover { background: #e6e2cf; }
.sec-amenities .amen-btn:active { background: #dcd7c2; }

/* 175:3621 / 175:3624 "guidance:up-arrow": 21.25px icon (SVG box 21.25×21.71) */
.sec-amenities .amen-btn-icon {
  display: block;
  width: calc(21.25 * var(--dpx));
  height: calc(21.71 * var(--dpx));
  max-width: none;
  transition: transform 0.3s var(--ease-out);
}
.sec-amenities .amen-btn--prev .amen-btn-icon { transform: rotate(-90deg); }
.sec-amenities .amen-btn--next .amen-btn-icon { transform: rotate(90deg); }
/* hover: the arrow nudges in its own direction (local "up" = travel direction after rotation) */
.sec-amenities .amen-btn--prev:hover .amen-btn-icon { transform: rotate(-90deg) translateY(calc(-3 * var(--dpx))); }
.sec-amenities .amen-btn--next:hover .amen-btn-icon { transform: rotate(90deg) translateY(calc(-3 * var(--dpx))); }

/* Description — 175:3618: Neue Haas 45 Light 16/24, tracking 0.8, #3c3c3a @ 202,455, width 326.
   Slide title + two spaces + body in one paragraph; pre-wrap preserves the double space. */
.sec-amenities .amen-desc {
  position: absolute;
  left: calc(202 * var(--dpx));
  top: calc(455 * var(--dpx));
  width: calc(328.5 * var(--dpx)); /* Figma 326 — +2.5 makes Chrome reproduce the Figma line breaks */
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--fw-light);
  font-size: max(calc(16 * var(--dpx)), 12px);
  line-height: 1.5;
  letter-spacing: calc(0.8 * var(--dpx));
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.sec-amenities .amen-slide-title,
.sec-amenities .amen-slide-body {
  font: inherit;
  color: inherit;
}

/* Visually hidden live region for the current-slide announcement */
.sec-amenities .amen-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   RESPONSIVE — below 992px the photo becomes a 4/3 block on top,
   the card flows below it at full width.
   ============================================= */

@media (max-width: 991px) {
  .sec-amenities .sec-canvas {
    height: auto;
    padding: 0;
  }

  .sec-amenities .amen-photo {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    transform: none;
  }

  .sec-amenities .amen-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    padding: 56px 20px 64px;
    overflow: visible;
  }

  .sec-amenities .amen-counter {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.5;
    letter-spacing: 0.15em;
    margin-bottom: 20px;
  }

  .sec-amenities .amen-title {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    font-size: 2.25rem;
    line-height: 1.05;
    margin-bottom: 28px;
  }

  .sec-amenities .amen-nav {
    position: relative;
    left: auto;
    top: auto;
    gap: 12px;
    margin-bottom: 32px;
  }

  .sec-amenities .amen-btn {
    width: 44px;
    height: 44px;
  }

  .sec-amenities .amen-btn-icon {
    width: 19px;
    height: 19.4px;
  }
  .sec-amenities .amen-btn--prev:hover .amen-btn-icon { transform: rotate(-90deg) translateY(-2px); }
  .sec-amenities .amen-btn--next:hover .amen-btn-icon { transform: rotate(90deg) translateY(-2px); }

  .sec-amenities .amen-desc {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 767px) {
  .sec-amenities .amen-card { padding: 48px 20px 56px; }
  .sec-amenities .amen-title { font-size: 2rem; margin-bottom: 24px; }
}
