/* ============================================================
   RentaBase — custom.css
   Solo lo que Tailwind no cubre nativamente:
   scroll-snap, acordeón max-height, CTA flotante animation
   ============================================================ */

/* ── Carrusel de testimonios (móvil) ─────────────────────── */
.testimonials-track {
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.testimonials-track::-webkit-scrollbar {
  display: none;
}
.testimonial-card {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ── Acordeón FAQ ─────────────────────────────────────────── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.is-open .faq-answer {
  max-height: 400px;
}
.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
}
.faq-icon {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

/* ── CTA Flotante Móvil ───────────────────────────────────── */
#cta-float {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  /* Solo visible en móvil — Tailwind md:hidden cubre el desktop */
}
#cta-float.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Body padding cuando el CTA flotante está activo en móvil */
body.cta-float-active {
  padding-bottom: 60px;
}

/* ── Hero screenshot placeholder ────────────────────────── */
.screenshot-placeholder {
  background: linear-gradient(135deg, #2D4A8A 0%, #1E3A5F 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
}

/* ── Hero Tabs ──────────────────────────────────────────────── */
.hero-tab {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.hero-tab:hover {
  background: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
}
.hero-tab-active {
  background: #ffffff !important;
  color: #2D4A8A !important;
  font-weight: 700;
}

/* ── Gradiente sutil en separadores de sección ───────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #8892A4 30%, #8892A4 70%, transparent);
  opacity: 0.3;
}

/* ── Animación suave de entrada para cards ───────────────── */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── CTA Heartbeat Pulse ─────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rb-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(245, 166, 35, 0); }
  }
  .rb-pulsing {
    animation: rb-pulse 2s ease-in-out infinite;
  }
}

/* ── Pain Point Hover Shake ──────────────────────────────── */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  @keyframes rb-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
  }
  #problema .bg-white\/5:hover {
    animation: rb-shake 0.4s ease;
  }
}

/* ── Scroll Progress Bar ─────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: #2ECC8A;
  z-index: 100;
  transition: width 0.1s linear;
}

/* ── Después Label Celebrate ─────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rb-celebrate {
    0% { opacity: 0; transform: scale(0.85); }
    60% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 1; transform: scale(1); }
  }
  .rb-celebrate-active {
    animation: rb-celebrate 0.5s ease forwards;
  }
}

/* ── Easter Egg: Konami Confetti ─────────────────────────── */
#rb-confetti-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}
#rb-easter-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1A1A2E;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  z-index: 10000;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
#rb-easter-toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ── Easter Egg: Modo Noche ──────────────────────────────── */
body.rb-night-mode {
  background-color: #1A1A2E !important;
  color: #F8F7F4 !important;
  transition: background-color 0.6s ease, color 0.6s ease;
}
body.rb-night-mode section,
body.rb-night-mode header {
  background-color: #1A1A2E !important;
  transition: background-color 0.6s ease;
}
body.rb-night-mode .bg-white {
  background-color: #1E3A5F !important;
}
body.rb-night-mode .bg-rb-bg {
  background-color: #1A1A2E !important;
}

/* ── Easter Egg: Hero H1 typewriter rewrite ──────────────────── */
#rb-hero-h1 {
  transition: opacity 0.15s ease;
}
