/* ══════════════════════════════════════════════════════════
   WHY EMBRITURE V2 SLIDER CSS (FLIP CARDS)
   ══════════════════════════════════════════════════════════ */

.why-v2-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4vw;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.why-v2-left {
  flex: 1.2;
  min-width: 320px;
  max-width: 600px;
  padding-right: 40px;
}

.why-v2-left .s-title {
  font-size: clamp(2.5rem, 4vw, 4rem) !important;
  line-height: 1.1;
}

.why-v2-left .s-sub {
  font-size: 1.2rem;
  line-height: 1.6;
}

.why-v2-left .btn-g {
  background: var(--blue);
  color: var(--dk);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.why-v2-left .btn-g:hover {
  background: var(--sky);
}

.why-v2-right {
  flex: 2;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.why-slider-wrapper {
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
  /* Use overflow hidden to prevent cards from sliding over the left text */
}

.why-slider-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* ─────────────────────────────────────────────────────────
   FLIP CARD STYLING
   ───────────────────────────────────────────────────────── */
.why-card-v2 {
  flex: 0 0 380px; /* Wider width to show ~1.5 cards */
  height: 520px;   /* Taller height to match reference */
  perspective: 1200px; /* Enable 3D space */
  cursor: pointer;
}

.why-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d; /* Allows children to sit in 3D space */
}

/* When the card has the 'flipped' class, rotate the inner container */
.why-card-v2.flipped .why-card-inner {
  transform: rotateY(180deg);
}

.why-card-front,
.why-card-back {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: hidden; /* Hide the back when facing away */
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Front Face */
.why-card-front {
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.why-card-front img {
  width: 100%;
  height: 60%;
  object-fit: cover;
}

.why-front-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.why-front-content h3 {
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: #1c3462;
  margin: 0;
  line-height: 1.2;
}

.flip-hint {
  font-size: 0.8rem;
  color: #8fb1ff;
  font-weight: 600;
  margin-top: auto;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Back Face */
.why-card-back {
  background: #1c3462; /* Match the dark theme or primary blue */
  color: #ffffff;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transform: rotateY(180deg); /* Rotate back face so it's upright when flipped */
  border: 1px solid rgba(190,212,255,0.2);
}

.why-card-back h3 {
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  margin-top: 20px;
}

.why-card-back p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.why-card-back .flip-hint {
  color: #f4c95d; /* gold hint on dark background */
}

.why-num-v2 {
  font-family: var(--font-sans, "Outfit", sans-serif);
  font-size: 4.5rem;
  font-weight: 800;
  color: rgba(255,255,255,0.08);
  position: absolute;
  top: -10px;
  right: 10px;
  line-height: 1;
  pointer-events: none;
}

/* Hover effects */
.why-card-v2:hover .why-card-front,
.why-card-v2:hover .why-card-back {
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
}

/* Controls */
.why-slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-right: 42%; /* moved left a bit from the extreme right edge */
}

.why-btn {
  background: #1c3462;
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.why-btn:hover {
  background: #2c5282;
}

.why-btn:active {
  transform: scale(0.95);
}

.why-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #4e5f7d;
}

@media (max-width: 900px) {
  .why-v2-container {
    flex-direction: column;
    gap: 32px;
  }
  .why-v2-left {
    max-width: 100%;
    padding-right: 0;
    text-align: center;
  }
  .why-slider-controls {
    justify-content: center;
    padding-right: 0;
  }
}
