/* =========================================================================
   Property Carousel - Standalone Stylesheet
   Same CSS is reused by the Elementor plugin (prefix .pc- to avoid clashes).
   ========================================================================= */

:root {
  --pc-bg: #2f7a78;
  --pc-card-radius: 16px;
  --pc-card-bg: #1a2e3a;
  --pc-text: #ffffff;
  --pc-text-muted: rgba(255, 255, 255, 0.78);
  --pc-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45),
               0 14px 28px -14px rgba(0, 0, 0, 0.35);
  --pc-badge-bg: #ec3a3a;
  --pc-badge-text: #ffffff;
  --pc-button-bg: rgba(255, 255, 255, 0.14);
  --pc-button-border: rgba(255, 255, 255, 0.30);
  --pc-button-text: #ffffff;

  /* Tunable animation knobs — these get overridden inline by the Elementor widget */
  --pc-transition-speed: 650ms;
  --pc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pc-side-scale: 0.78;
  --pc-far-scale: 0.62;
  --pc-side-opacity: 0.85;
  --pc-far-opacity: 0.55;
  --pc-side-blur: 6px;
  --pc-far-blur: 10px;
  --pc-card-gap: 28px;
  --pc-card-aspect: 3 / 4;
  --pc-card-base-width: 360px;
}

/* Reset/scope only what we own */
.pc-root *,
.pc-root *::before,
.pc-root *::after {
  box-sizing: border-box;
}

.pc-root {
  --pc-active-width: var(--pc-card-base-width);
  position: relative;
  width: 100%;
  padding: 80px 0;
  background: var(--pc-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none; /* engine auto-focuses for keyboard nav; suppress UA ring */
}

/* ---------- Stage / viewport ---------- */
.pc-stage {
  position: relative;
  width: 100%;
  /* We want enough vertical room for the largest card */
  min-height: calc(var(--pc-active-width) * 4 / 3 + 40px);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y; /* allow vertical page scroll, JS handles horizontal */
}

.pc-stage.is-dragging {
  cursor: grabbing;
}

.pc-stage.is-dragging .pc-card {
  /* Lift transitions during drag so the cards stick to the finger */
  transition: none;
}

/* ---------- Track ---------- */
.pc-track {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: var(--pc-card-gap);
  /* translateX(-50%) is baked into the JS-driven transform */
  will-change: transform;
}

.pc-track.is-animating {
  transition: transform var(--pc-transition-speed) var(--pc-ease);
}

/* ---------- Slide / card ---------- */
.pc-slide {
  flex: 0 0 var(--pc-active-width);
  width: var(--pc-active-width);
  aspect-ratio: var(--pc-card-aspect);
  position: relative;
}

.pc-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--pc-card-radius);
  overflow: hidden;
  background: var(--pc-card-bg);
  box-shadow: var(--pc-shadow);
  cursor: pointer;
  transform-origin: center center;
  transform: scale(var(--pc-far-scale));
  opacity: var(--pc-far-opacity);
  filter: blur(var(--pc-far-blur));
  transition: transform var(--pc-transition-speed) var(--pc-ease),
              opacity var(--pc-transition-speed) var(--pc-ease),
              filter var(--pc-transition-speed) var(--pc-ease);
  will-change: transform, opacity, filter;
}

.pc-slide.is-adjacent .pc-card {
  transform: scale(var(--pc-side-scale));
  opacity: var(--pc-side-opacity);
  filter: blur(var(--pc-side-blur));
}

.pc-slide.is-active .pc-card {
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
}

/* ---------- Card media ---------- */
.pc-card__media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pc-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.55) 100%
  );
  pointer-events: none;
}

/* ---------- Card badge ---------- */
.pc-card__badge {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pc-badge-text);
  background: var(--pc-badge-bg);
  line-height: 1;
}

/* ---------- Card content ---------- */
.pc-card__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 22px 24px 22px;
  color: var(--pc-text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Hide content on non-active cards — they'd be too blurry to read anyway,
     and this prevents text from looking like noise on the side previews */
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--pc-transition-speed) var(--pc-ease),
              transform var(--pc-transition-speed) var(--pc-ease);
}

.pc-slide.is-active .pc-card__content {
  opacity: 1;
  transform: translateY(0);
}

.pc-card__title {
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
}

.pc-card__subtitle {
  font-size: 12px;
  color: var(--pc-text-muted);
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}

/* ---------- "Read more" button ---------- */
.pc-card__button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  background: var(--pc-button-bg);
  border: 1px solid var(--pc-button-border);
  border-radius: 999px;
  color: var(--pc-button-text);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 200ms ease, transform 200ms ease;
}

.pc-card__button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.pc-card__button-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.pc-card__button-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* ---------- Optional navigation arrows ----------
   Hidden by default (opacity 0 + pointer-events: none) so they never block
   clicks on the side cards. Fade in on stage hover or keyboard focus. */
.pc-nav {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  transition: background 200ms ease, transform 200ms ease, opacity 200ms ease;
  outline: none;
}

.pc-stage:hover .pc-nav,
.pc-nav:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.pc-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.pc-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.pc-nav--prev { left: 24px; }
.pc-nav--next { right: 24px; }

.pc-nav svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Pagination dots ---------- */
.pc-dots {
  position: relative;
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.30);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 200ms ease, width 200ms ease;
}

.pc-dot.is-active {
  background: #fff;
  width: 22px;
  border-radius: 999px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  :root {
    --pc-card-base-width: 320px;
    --pc-card-gap: 20px;
  }
  .pc-card__title { font-size: 24px; }
}

@media (max-width: 720px) {
  :root {
    --pc-card-base-width: 260px;
    --pc-card-gap: 14px;
    --pc-side-scale: 0.72;
    --pc-far-scale: 0.55;
  }
  .pc-root { padding: 48px 0; }
  .pc-nav { display: none; }
  .pc-card__title { font-size: 20px; }
  .pc-card__content { padding: 16px 18px; }
}

@media (max-width: 480px) {
  :root {
    --pc-card-base-width: 220px;
    --pc-card-gap: 10px;
  }
  .pc-card__title { font-size: 18px; }
}

/* Suppress all transitions during the silent infinite-loop teleport.
   The engine adds .is-teleporting on .pc-root, forces a reflow, and removes
   it again — preventing the scale/blur/opacity transitions on .pc-card from
   firing when the .is-active class moves from a clone slide to the real one. */
.pc-root.is-teleporting .pc-track,
.pc-root.is-teleporting .pc-card,
.pc-root.is-teleporting .pc-card__content {
  transition: none !important;
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .pc-track.is-animating,
  .pc-card,
  .pc-card__content {
    transition-duration: 0.001ms !important;
  }
}
