/* ─── Morphing Card Stack (Mobile ≤ 992px) ─────────────── */

.morphing-widget {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  width: 100%; 
  overflow-x: hidden;
}

@media (max-width: 992px) {
  .features-grid-new {
    display: none;
  }
  .morphing-widget {
    display: flex;
  }
}

/* Cards Container */
.morphing-widget .cards-container {
  position: relative;
  width: 280px;
  min-height: 100px;
}

/* Individual Card — uses existing .feature-card-new visuals */
.morphing-widget .morphing-card {
  position: absolute;
  width: 280px;
  height: auto;
  cursor: pointer;
  user-select: none;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.morphing-widget .morphing-card.top-card {
  cursor: grab;
}

.morphing-widget .morphing-card.top-card:active {
  cursor: grabbing;
}

/* Disable hover lift animation but KEEP the calculated stack rotation */
.morphing-widget .morphing-card:not(.expanded):hover {
  transform: var(--stack-transform) !important;
}

.morphing-widget .morphing-card.expanded {
  transform: translate(0, 0) scale(1.05) !important;
  z-index: 50 !important;
}

/* Swipe Hint */
.morphing-widget .swipe-hint {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.3s;
}

.morphing-widget .morphing-card.top-card .swipe-hint {
  opacity: 0.5;
}

/* Stack Indicators */
.morphing-widget .indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  height: 6px;
}

.morphing-widget .indicator-dot {
  height: 6px;
  width: 6px;
  border-radius: 6px;
  background: var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.morphing-widget .indicator-dot.active {
  width: 24px;
  background: var(--primary-purple);
}

/* Dark Mode */
[data-theme="dark"] .morphing-widget .indicator-dot {
  background: #475569;
}

[data-theme="dark"] .morphing-widget .indicator-dot.active {
  background: var(--primary-purple);
}

/* =========================================
   FIXES: Tap Highlights, Sticky Hovers & Borders
   ========================================= */

/* 1. Remove the default browser tap highlight on mobile */
.morphing-widget .morphing-card {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* 2. Suppress sticky hovers on the card body & icon circle, BUT leave the 'i' alone so it keeps breathing */
.morphing-widget .morphing-card:not(.expanded):hover::before { opacity: 0 !important; }
.morphing-widget .morphing-card:not(.expanded):hover .f-icon-circle { 
  transform: none !important; 
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important; 
}
.morphing-widget .morphing-card:not(.expanded):hover .f-icon-circle::after { opacity: 0 !important; }

/* Suppress outer hover shadows from getting stuck */
.morphing-widget .feature-card-white:not(.expanded):hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important; border-color: #f1f5f9 !important; }
.morphing-widget .feature-card-teal:not(.expanded):hover { box-shadow: 0 10px 30px rgba(13, 148, 136, 0.15) !important; }
[data-theme="dark"] .morphing-widget .feature-card-white:not(.expanded):hover { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important; border-color: #334155 !important; }

/* 3. Bind the glowing inner animations strictly to the .expanded class */
.morphing-widget .morphing-card.expanded::before { opacity: 1 !important; }
.morphing-widget .morphing-card.expanded .f-icon-circle {
  transform: scale(1.15) translateY(-5px) !important;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15) !important;
}
.morphing-widget .morphing-card.expanded .f-icon-circle::after { opacity: 1 !important; }

/* 4. Disable all touch/hover interactions on background cards */
.morphing-widget .morphing-card:not(.top-card) {
  pointer-events: none !important;
}