/* ==========================================================
   The Flowscape — Luxury 3D Coverflow Showcase
   Elevated Editorial Aesthetic:
   - Cinematic 440px x 560px Cards with 28px Rounded Corners
   - Ambient Radial Stage Glow & Floor Shadow Depth
   - Frosted Glassmorphic Status Badges
   - Refined Editorial Typography (Playfair Display & DM Sans)
   - Precision 3D Perspective (1600px, 12deg tilt, 8deg roll)
   ========================================================== */

.experience {
  background: #fbf9f4;
  overflow: hidden;
  position: relative;
  --fg-card-w: 440px;
  --fg-card-h: 560px;
}

/* Ambient Radial Glow on Stage */
.experience::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 600px;
  transform: translate(-50%, -45%);
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(180, 45, 50, 0.07) 0%, rgba(207, 161, 93, 0.05) 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

/* --- Stage Container -------------------------------------- */
.fg-stage {
  position: relative;
  width: 100%;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  padding: 50px 0;
  z-index: 1;
}

.fg-stage:focus-visible {
  outline: 1px solid #b42d32;
  outline-offset: 8px;
}

/* --- 3D Track --------------------------------------------- */
.fg-track {
  position: relative;
  width: var(--fg-card-w);
  height: var(--fg-card-h);
  transform-style: preserve-3d;
}

/* --- Individual 3D Card ----------------------------------- */
.fg-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--fg-card-w);
  height: var(--fg-card-h);
  margin: 0;
  padding: 0;
  border-radius: 28px;
  overflow: hidden;
  transform-style: preserve-3d;
  transform-origin: center center;
  background-color: #161c18;
  box-shadow: 0 30px 60px -15px rgba(22, 28, 24, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  will-change: transform, opacity;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.fg-card.is-active {
  cursor: default;
  box-shadow: 0 40px 85px -15px rgba(22, 28, 24, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.18), 0 10px 30px rgba(180, 45, 50, 0.12);
}

.fg-card.is-hidden {
  pointer-events: none;
}

/* Background Image with subtle zoom on active */
.fg-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  pointer-events: none;
  transition: transform 0.8s ease;
}

.fg-card.is-active img {
  transform: scale(1.03);
}

/* Multi-layer Editorial Gradient Overlay */
.fg-card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 22, 18, 0.35) 0%,
    rgba(15, 22, 18, 0) 30%,
    rgba(15, 22, 18, 0.25) 55%,
    rgba(15, 22, 18, 0.92) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Top Badges Header */
.fg-card-top {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 4;
  pointer-events: none;
}

.fg-card-location {
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: #fbf9f4;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
}

.fg-card-pill {
  font-family: "DM Sans", sans-serif;
  font-size: 8.5px;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.fg-card-pill.is-gold {
  background: rgba(207, 161, 93, 0.25);
  border-color: rgba(207, 161, 93, 0.45);
  color: #fcebd2;
}

/* Card Content / Typography (Bottom) */
.fg-card-content {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 4;
  pointer-events: none;
  text-align: left;
}

.fg-card-subtitle {
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 600;
  color: #f5b0a3;
  text-transform: uppercase;
  margin: 0 0 6px;
  display: block;
}

.fg-card-title {
  color: #ffffff;
  font-family: "Playfair Display", serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

.fg-card-title em {
  font-style: italic;
  color: #fce9e6;
  font-weight: 400;
}

.fg-card-desc {
  font-family: "DM Sans", sans-serif;
  font-size: 12.5px;
  line-height: 1.6;
  color: #e5ded5;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.fg-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 3px;
  transition: all 0.2s ease;
}

.fg-card.is-active:hover .fg-card-action {
  color: #f5b0a3;
  border-color: #f5b0a3;
}

/* Inactive Card Dim Overlay */
.fg-card-dim {
  position: absolute;
  inset: 0;
  background: #090e0b;
  opacity: 0.48;
  z-index: 3;
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.fg-card.is-active .fg-card-dim {
  opacity: 0;
}

/* --- Floating Glass Control Bar (Below Carousel) ----------- */
.fg-detail {
  max-width: 680px;
  margin: 24px auto 0;
  text-align: center;
  position: relative;
  z-index: 2;
}

.fg-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #b42d32;
  font-weight: 700;
  margin-bottom: 14px;
}

.fg-detail-copy {
  min-height: 3.2em;
  margin: 0 auto 30px;
  color: #556055;
  font-size: 15px;
  line-height: 1.75;
  max-width: 580px;
}

.fg-detail-copy,
.fg-status-pill {
  transition: opacity 0.25s ease;
}

.fg-detail.is-swapping .fg-detail-copy,
.fg-detail.is-swapping .fg-status-pill {
  opacity: 0;
}

/* Controls Bar */
.fg-controls-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-bottom: 32px;
}

.fg-counter {
  font-family: "Playfair Display", serif;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: #1f2622;
  font-weight: 500;
  min-width: 50px;
}

.fg-counter b {
  color: #b42d32;
  font-size: 18px;
}

.fg-arrow {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #1f2622;
  border: 1px solid #ded6c5;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(31, 38, 34, 0.06);
}

.fg-arrow:hover {
  background: #1f2622;
  color: #fff;
  border-color: #1f2622;
  transform: scale(1.06);
}

.fg-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.fg-dot {
  width: 14px;
  height: 3px;
  padding: 0;
  border: 0;
  background: #ded6c5;
  cursor: pointer;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
  border-radius: 2px;
}

.fg-dot.is-active {
  width: 44px;
  background: #b42d32;
}

.fg-cta-btn {
  padding: 16px 34px;
  box-shadow: 0 10px 25px rgba(180, 45, 50, 0.2);
}

/* Responsive adjustments */
@media (max-width: 980px) {
  .experience {
    --fg-card-w: 360px;
    --fg-card-h: 480px;
  }
  .fg-stage {
    min-height: 540px;
    padding: 30px 0;
  }
  .fg-card-title {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  .experience {
    --fg-card-w: 290px;
    --fg-card-h: 420px;
  }
  .fg-stage {
    min-height: 480px;
  }
  .fg-card-title {
    font-size: 24px;
  }
  .fg-card-content {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
  .fg-card-top {
    top: 18px;
    left: 18px;
    right: 18px;
  }
  .fg-controls-wrap {
    gap: 16px;
  }
  .fg-arrow {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fg-card,
  .fg-card-dim,
  .fg-detail-copy,
  .fg-status-pill,
  .fg-card img {
    transition-duration: 0.01s !important;
  }
}
