/* ============================================================
   SCG Hero Slider
   Replicates Framer Motion animations from Hero.tsx
   ============================================================ */

/* Slider container */
.scg-hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(9, 56, 104, 0.2);
}

/* Track holds all slides stacked */
.scg-hero-slider__track {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Individual slide — all stacked absolutely, image via background-cover */
.scg-hero-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Replicates motion.img transition: { duration: 1 } */
  transition: opacity 1s ease;
}

.scg-hero-slider__slide--active {
  opacity: 1;
}

/* ── Floating approval card ──────────────────────────────── */
.scg-hero-slider__card {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(9, 56, 104, 0.15);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 320px;
  z-index: 10;
}

.scg-hero-slider__card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scg-hero-slider__card-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.scg-hero-slider__card-label {
  font-size: 10px;
  font-weight: 700;
  color: #e09f54;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scg-hero-slider__card-amount {
  font-size: 22px;
  font-weight: 700;
  color: #093868;
  line-height: 1.2;
}

.scg-hero-slider__card-sub {
  font-size: 11px;
  color: #5a6b7f;
  margin-top: 1px;
}

/* ── Card animations ─────────────────────────────────────── */

/*
 * Entry: replicates motion initial { opacity:0, y:40, scale:0.9 }
 *        animate  { opacity:1, y:0,  scale:1   }
 *        spring   { stiffness:200, damping:20  } — slight bounce
 *        delay:   0.5s (after first render: 1.4s handled via JS class)
 *
 * cubic-bezier(0.34, 1.56, 0.64, 1) approximates the spring overshoot
 */
@keyframes scg-card-enter {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/*
 * Exit: replicates exit { opacity:0, y:-20, transition:{ duration:0.3 } }
 */
@keyframes scg-card-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Initial load — delayed entry (replicates isInitialRender delay:1.4s) */
.scg-hero-slider__card--initial {
  animation: scg-card-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.4s both;
}

/* Transition entry */
.scg-hero-slider__card--entering {
  animation: scg-card-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both;
}

/* Transition exit */
.scg-hero-slider__card--exiting {
  animation: scg-card-exit 0.3s ease forwards;
}

/* ── Mobile: center card horizontally, bottom-8 = 32px ──────── */
@media (max-width: 767px) {
  .scg-hero-slider__card {
    left: 0 !important;
    right: 0 !important;
    bottom: 32px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
