/* ============================================================
   LIKIYA — Hero Carousel (Dispersión / Recaudo / Créditos)
   ============================================================ */

.hero-carousel {
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.carousel-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 650ms cubic-bezier(0.65, 0, 0.35, 1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  padding-block: 96px var(--sp-10);
}

.carousel-slide[aria-hidden="true"] .carousel-text,
.carousel-slide[aria-hidden="true"] .carousel-visual {
  opacity: 0.001;
}

.carousel-slide-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--sp-10);
}

.carousel-text .hero-eyebrow { margin-bottom: var(--sp-4); }
.carousel-text .hero-title { margin-bottom: var(--sp-4); }
.carousel-text .hero-description { margin-bottom: var(--sp-6); max-width: 440px; }

.carousel-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Arrows ── */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: var(--z-above);
  transition: all var(--ease-fast);
}
.carousel-arrow:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
  box-shadow: var(--shadow-glow);
}
.carousel-prev { left: var(--sp-4); }
.carousel-next { right: var(--sp-4); }

/* ── Dots ── */
.carousel-dots {
  position: absolute;
  bottom: var(--sp-10);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--sp-3);
  z-index: var(--z-above);
}
.carousel-dot {
  width: 30px;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.18);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--ease-base);
}
.carousel-dot.active {
  background: var(--gradient-primary);
  width: 42px;
}

/* ── Money-flow illustration card (shared by carousel + sections) ── */
.money-flow-card {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-2xl);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}

.flow-diagram-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  position: relative;
}

.flow-node-money {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex-shrink: 0;
  z-index: 2;
}
.flow-node-money svg { width: 22px; height: 22px; }
.flow-node-money span {
  font-size: 9px;
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
}

.flow-recipients {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.flow-recipients .flow-node-money {
  width: 48px;
  height: 48px;
}
.flow-recipients .flow-node-money svg { width: 18px; height: 18px; }

/* Animated path with traveling dots */
.flow-path {
  position: relative;
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.18) 0 6px, transparent 6px 12px);
  margin-inline: var(--sp-2);
  overflow: visible;
}
.flow-path-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: flow-move 2.6s linear infinite;
}
.flow-path-dot:nth-child(2) { animation-delay: 0.65s; }
.flow-path-dot:nth-child(3) { animation-delay: 1.3s; }
.flow-path-dot:nth-child(4) { animation-delay: 1.95s; }

.flow-path.flow-path-reverse .flow-path-dot {
  left: auto;
  right: 0;
  animation-name: flow-move-reverse;
}

@keyframes flow-move {
  0%   { left: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}
@keyframes flow-move-reverse {
  0%   { right: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { right: 100%; opacity: 0; }
}

.flow-caption {
  margin-top: var(--sp-8);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.flow-caption strong { color: var(--text-primary); }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .carousel-track { transition: none; }
  .flow-path-dot { animation: none; opacity: 1; left: 50% !important; right: auto !important; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .carousel-slide-inner { grid-template-columns: 1fr; gap: var(--sp-10); }
  .carousel-visual { order: -1; }
  .carousel-arrow { display: none; }
}
@media (max-width: 768px) {
  .carousel-slide { padding-block: calc(var(--header-height) + var(--sp-8)) var(--sp-20); }
  .carousel-text { text-align: center; }
  .carousel-text .hero-description { margin-inline: auto; }
  .carousel-text .hero-actions { justify-content: center; }
  .money-flow-card { padding: var(--sp-6); }
  .flow-node-money { width: 60px; height: 60px; }
  .flow-node-money svg { width: 20px; height: 20px; }
  .carousel-dots { bottom: var(--sp-6); }
}
