/* ═══════════════════════════════════════════════════════════
   Feature Carousel v2.0 — Elementor-safe CSS
   Key design decisions:
   - isolation:isolate on .fc-wrap → z-index fully scoped
   - No aspect-ratio on .fc-shell → works in any column
   - overflow:hidden removed from shell → animations visible
   - min-height values ensure visible even before JS runs
   ═══════════════════════════════════════════════════════════ */

/* ── Reset (scoped) ────────────────────────────────────────── */
.fc-wrap, .fc-wrap * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Root wrapper ──────────────────────────────────────────── */
.fc-wrap {
  /* CSS custom properties — overridden by inline style from PHP */
  --fc-accent:   #62B2FE;
  --fc-bg:       #ffffff;
  --fc-border:   rgba(0,0,0,0.08);
  --fc-text-dim: rgba(255,255,255,0.6);
  --fc-item-h:   65px;
  --fc-dur:      0.55s;

  width: 100%;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ★ CRITICAL: isolate this stacking context so cards/chips
       never escape and overlap the site header                 */
  isolation: isolate;
  position: relative;
  z-index: 1;
}

/* ── Shell ─────────────────────────────────────────────────── */
.fc-shell {
  position: relative;
  /* NO overflow:hidden here — it clips card animations         */
  border-radius: 2rem;
  border: 1px solid var(--fc-border);
  display: flex;
  flex-direction: column;
  /* min-height keeps the container visible before JS populates */
  min-height: 480px;
  background: #f5f5f7;
}
@media (min-width: 1024px) {
  .fc-shell {
    flex-direction: row;
    min-height: 480px;
    border-radius: 3rem;
  }
}

/* ── Left panel (chip drum) ────────────────────────────────── */
.fc-left {
  position: relative;
  width: 100%;
  background: var(--fc-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  /* overflow:hidden is safe here — clips the drum fade effects */
  overflow: hidden;
  padding: 3rem 1.5rem;
  border-radius: 2rem 2rem 0 0;
  /* min-height so the blue box is visible before JS runs       */
  min-height: 280px;
}
@media (min-width: 1024px) {
  .fc-left {
    width: 40%;
    min-height: unset;
    padding: 2rem 3.5rem;
    border-radius: 3rem 0 0 3rem;
    justify-content: flex-start;
  }
}

/* Fade gradients top + bottom of drum */
.fc-left::before,
.fc-left::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 4.5rem;
  z-index: 10;
  pointer-events: none;
}
.fc-left::before { top: 0;    background: linear-gradient(to bottom, var(--fc-accent), transparent); }
.fc-left::after  { bottom: 0; background: linear-gradient(to top,   var(--fc-accent), transparent); }

/* ── Drum scroll ───────────────────────────────────────────── */
.fc-drum-viewport {
  position: relative;
  width: 100%;
  height: calc(var(--fc-item-h) * 5);   /* shows 5 chips, scrolls vertically */
  overflow: hidden;
  z-index: 5;
}
.fc-drum {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  /* transition: set to 'none' by JS on init, then re-enabled   */
  transition: transform var(--fc-dur) cubic-bezier(0.34, 1.56, 0.64, 1);
}
.fc-chip {
  height: var(--fc-item-h);
  display: flex;
  align-items: center;
}
.fc-chip-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: var(--fc-text-dim);
  cursor: pointer;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: all 0.35s ease;
  font-family: inherit;
  line-height: 1.2;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  /* reset WP/Elementor button styles */
  box-shadow: none !important;
  text-shadow: none;
}
.fc-chip-btn:hover {
  border-color: rgba(255,255,255,0.55);
  color: #fff;
  background: rgba(255,255,255,0.08);
}
.fc-chip-btn.is-active {
  background: #fff;
  color: var(--fc-accent);
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
}
.fc-chip-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 0.35s;
  display: flex;
  align-items: center;
}
.fc-chip-btn.is-active .fc-chip-icon { opacity: 1; }

/* ── Right panel (card stage) ──────────────────────────────── */
.fc-right {
  flex: 1;
  position: relative;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  /* overflow:clip clips visually without creating scroll trap  */
  overflow: clip;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--fc-border);
  border-radius: 0 0 2rem 2rem;
  min-height: 400px;
}
@media (min-width: 1024px) {
  .fc-right {
    border-top: none;
    border-left: 1px solid var(--fc-border);
    padding: 2.5rem;
    border-radius: 0 3rem 3rem 0;
    min-height: unset;
  }
}

/* ── Card stage ────────────────────────────────────────────── */
.fc-stage {
  position: relative;
  width: 100%;
  max-width: 360px;
  /* Use padding-top for aspect-ratio fallback (4:5 = 125%)     */
  padding-top: min(450px, 125%);
  height: 0;
}
@media (min-width: 640px) {
  .fc-stage { max-width: 400px; }
}

/* ── Cards ─────────────────────────────────────────────────── */
.fc-card {
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  overflow: hidden;
  border: 5px solid var(--fc-bg);
  background: var(--fc-bg);
  transition:
    transform var(--fc-dur) cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity   var(--fc-dur) ease,
    filter    var(--fc-dur) ease;
  will-change: transform, opacity;
}
.fc-card.is-active {
  transform: translateX(0) scale(1) rotate(0deg);
  opacity: 1;
  z-index: 20;
  filter: none;
}
.fc-card.is-prev {
  transform: translateX(-90px) scale(0.86) rotate(-3deg);
  opacity: 0.35;
  z-index: 10;
  filter: grayscale(1) blur(2px) brightness(0.7);
}
.fc-card.is-next {
  transform: translateX(90px) scale(0.86) rotate(3deg);
  opacity: 0.35;
  z-index: 10;
  filter: grayscale(1) blur(2px) brightness(0.7);
}
.fc-card.is-hidden {
  transform: translateX(0) scale(0.7) rotate(0deg);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.fc-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Card overlay (label + description) */
.fc-card-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2rem 1.5rem 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.3) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 2;
}
.fc-card.is-active .fc-card-overlay {
  opacity: 1;
  transform: translateY(0);
}
.fc-card-tag {
  display: inline-block;
  background: var(--fc-bg);
  color: #111;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  border: 1px solid rgba(0,0,0,0.08);
  width: fit-content;
}
.fc-card-desc {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 400;
}

/* Live badge */
.fc-live-badge {
  position: absolute;
  top: 1.2rem; left: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 3;
}
.fc-card.is-active .fc-live-badge { opacity: 1; }
.fc-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px #fff;
  animation: fc-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes fc-pulse {
  0%,100% { box-shadow: 0 0 5px rgba(255,255,255,0.8); }
  50%      { box-shadow: 0 0 12px #fff; }
}
.fc-live-text {
  color: rgba(255,255,255,0.8);
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: monospace;
}
