/* Services carousel — Cleo coverflow (meetcleo.com), adapted for map.
   Cards use the user-provided "liquid-glass" recipe (subtle variant): a faint
   white tint + luminosity blend, real backdrop-filter blur, and a masked
   ::before ring for the bright bevel edge. NOTHING else — no per-card blurred
   copy, no pointer gleam, no edge-lens, no ornate shadow stack.
   The 3D coverflow (perspective(1500px) rotateY ±60 @ 30/slot, side cards
   scale UP) is kept exactly as before.
   Static <link> in layout.tsx so backdrop-filter / mask survive Lightning CSS. */

.services-carousel {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #fff;
  /* gutter matches the video banner above (clamp 16→36px sides) */
  padding: clamp(8px, 1.5vw, 24px) clamp(16px, 3vw, 36px) clamp(24px, 4vw, 48px);
}

/* Rounded inset stage holding the villa photo bg + the coverflow viewport */
.services-carousel__stage {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  border-radius: clamp(28px, 3vw, 40px);
  isolation: isolate;
}

/* Villa photo = full-bleed stage background, clipped to the rounded corners.
   A separate layer (not on the stage) so the viewport above can keep
   overflow:visible for the 3D card peel without un-clipping the bg. */
.services-carousel__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(8, 12, 24, 0.18) 0%,
      rgba(8, 12, 24, 0) 24%,
      rgba(8, 12, 24, 0) 70%,
      rgba(8, 12, 24, 0.22) 100%
    ),
    url("/images/services/villa-bg.png") center center / cover no-repeat;
  pointer-events: none;
}

.services-carousel__viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  overflow: visible;
}

.services-carousel__viewport.is-dragging {
  cursor: grabbing;
}

.services-carousel__track {
  position: relative;
  width: 0;
  height: 100%;
  transform-style: preserve-3d;
}

.services-card {
  position: absolute;
  top: 50%;
  left: 0;
  width: 440px;
  height: 460px;
  margin-top: -230px;
  margin-left: -220px;
  border-radius: 36px;
  overflow: hidden;
  will-change: transform;
  transform-origin: center center;
  backface-visibility: hidden;
}

/* ── Liquid glass (subtle) — user-provided recipe ───────────────────────── */
.services-card.glass {
  background: rgba(255, 255, 255, 0.01);
  background-blend-mode: luminosity;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Bright bevel ring — a 1.4px gradient stroke painted only on the border box
   via mask-composite (the inner fill is masked out). */
.services-card.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 80%,
    rgba(255, 255, 255, 0.45) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Content — Apple title-TOP card layout */
.services-card__content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 24px;
  color: #fff;
}

/* Apple SF Pro Display Title-2 — semibold, white, soft legibility shadow */
.services-card__title {
  margin: 0;
  font-family: var(--font-sf, -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif);
  font-size: clamp(1.297rem, 0.8rem + 1.325vw, 2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
  text-rendering: optimizeLegibility;
}

.services-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Apple SF Pro Text Subhead/Body — regular, 90% white, light shadow */
.services-card__list li {
  position: relative;
  padding-left: 18px;
  font-family: var(--font-sf, -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif);
  font-weight: 400;
  font-size: clamp(1.266rem, 1.07rem + 0.83vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: normal;
  color: rgba(255, 255, 255, 0.9);
}

.services-card__list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
}

.services-card__list .note {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

@media (max-width: 1023px) {
  .services-carousel__viewport {
    height: 520px;
  }
  .services-card {
    width: 380px;
    height: 400px;
    margin-top: -200px;
    margin-left: -190px;
    border-radius: 32px;
  }
}

@media (max-width: 639px) {
  .services-carousel__viewport {
    height: 540px;
  }
  .services-card {
    width: min(84vw, 340px);
    height: min(132vw, 500px);
    margin-top: min(-66vw, -250px);
    margin-left: min(-42vw, -170px);
    border-radius: 28px;
  }
  .services-card__content {
    padding: 18px;
    gap: 10px;
  }
  .services-card__title {
    font-size: 1.0625rem;
  }
  .services-card__list {
    gap: 6px;
  }
  .services-card__list li {
    font-size: 0.9375rem;
    line-height: 1.35;
    padding-left: 14px;
  }
  .services-card__list li::before {
    width: 3px;
    height: 3px;
    left: 2px;
    top: 0.55em;
  }
}
