/* ==========================================================================
   Plani Finanzas — Estilos de la portada (index.html)
   Requiere css/base.css cargado antes.
   ========================================================================== */

body {
  min-height: 100vh;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  #blog div[style*="1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 860px) {
  #caracteristicas div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  #caracteristicas div[style*="repeat(4,1fr)"] { grid-template-columns: 1fr 1fr !important; }
  #precios div[style*="1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  #como-funciona div[style*="1fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; row-gap: 2rem !important; }
  #como-funciona div[style*="1fr 1fr 1fr;margin-top"] { grid-template-columns: 1fr !important; }
  section[style*="scale(1.04)"] { transform: none !important; }
  #como-funciona div[style*="linear-gradient(90deg"] { display: none !important; }
}

@media (max-width: 480px) {
  #caracteristicas div[style*="repeat(4,1fr)"] { grid-template-columns: 1fr !important; }
  #como-funciona div[style*="1fr 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  #blog div[style*="1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* TESTIMONIALS CAROUSEL */
.testimonials-track {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
}

.testi-card {
  border-radius: 16px;
  padding: 1.5rem;
}

.testi-arrow { display: none; }
.testi-dots { display: none; }

@media (max-width: 860px) {
  .testimonials-wrap { padding: 0 2.75rem; }
  .testimonials-track {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    gap: 0;
  }
  .testi-card {
    flex: 0 0 100%;
    scroll-snap-align: start;
    border-radius: 16px;
  }
  .testi-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--green-dark);
    font-size: 20px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }
  .testi-prev { left: 0; }
  .testi-next { right: 0; }
  .testi-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.25rem;
  }
  .testi-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gray-200);
    cursor: pointer;
    transition: background 0.2s;
  }
  .testi-dot.active { background: var(--green-dark); }
}

/* HERO */
.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.25rem;
    text-align: left;
    min-height: auto;
  }
  .hero-right { margin-top: 3.5rem; order: 2; }
  .hero-left { max-width: 100%; order: 1; }
  .hero-stats { flex-wrap: wrap; gap: 1.25rem; }
}

.hero-left { max-width: 560px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-light);
  color: var(--green-dark);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid #BBE0CC;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--green-accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

h1 .highlight {
  color: var(--green-dark);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 0.875rem 1.75rem;
  background: var(--green-dark);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-hero:hover {
  background: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,122,74,0.25);
}

.btn-hero-outline {
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--green-dark);
  border: 2px solid var(--green-dark);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.btn-hero-outline:hover {
  background: var(--green-light);
}

.hero-stats {
  display: flex;
  gap: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green-dark);
}

.stat-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  background: var(--gray-200);
}

/* PHONE MOCKUP */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.phone-wrap {
  position: relative;
  z-index: 2;
}

.phone {
  width: 280px;
  height: 560px;
  background: #111;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.1);
  position: relative;
}

@media (max-width: 420px) {
  .phone-wrap { transform: scale(0.82); }
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: #F8FFFE;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-statusbar {
  background: var(--green-dark);
  padding: 10px 16px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-size: 10px;
  font-weight: 600;
}

.phone-header {
  background: var(--green-dark);
  padding: 10px 16px 18px;
  color: white;
}

.phone-greeting {
  font-size: 11px;
  opacity: 0.8;
  margin-bottom: 2px;
}

.phone-name {
  font-size: 15px;
  font-weight: 700;
}

.phone-balance-card {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 10px;
  backdrop-filter: blur(4px);
}

.balance-label { font-size: 9px; opacity: 0.8; margin-bottom: 2px; }
.balance-amount { font-size: 20px; font-weight: 800; }
.balance-sub { font-size: 9px; opacity: 0.7; margin-top: 2px; }

.phone-body {
  flex: 1;
  padding: 12px;
  overflow: hidden;
  background: #F8FFFE;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mini cards in phone */
.mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-card {
  background: white;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--gray-200);
}

.mini-card-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-bottom: 6px;
}

.mini-card-label { font-size: 9px; color: var(--gray-500); font-weight: 500; }
.mini-card-value { font-size: 13px; font-weight: 700; color: var(--gray-900); margin-top: 1px; }

/* Progress bar */
.progress-item {
  background: white;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid var(--gray-200);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-name { font-size: 10px; font-weight: 600; color: var(--gray-900); }
.progress-pct { font-size: 10px; font-weight: 700; color: var(--green-dark); }
.progress-track { height: 5px; background: var(--gray-200); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--green-dark); }

/* Movements */
.movements { display: flex; flex-direction: column; gap: 6px; }

.movement-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border-radius: 8px;
  padding: 7px 10px;
  border: 1px solid var(--gray-200);
}

.mov-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

.mov-info { flex: 1; }
.mov-name { font-size: 10px; font-weight: 600; color: var(--gray-900); }
.mov-cat { font-size: 9px; color: var(--gray-500); }
.mov-amount { font-size: 11px; font-weight: 700; }
.mov-neg { color: var(--red); }
.mov-pos { color: var(--green-dark); }

/* Phone nav bar */
.phone-navbar {
  background: white;
  border-top: 1px solid var(--gray-200);
  padding: 8px 4px;
  display: flex;
  justify-content: space-around;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 8px;
  color: var(--gray-500);
  font-weight: 500;
}

.nav-tab.active { color: var(--green-dark); }

.nav-tab-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.nav-tab.active .nav-tab-icon {
  background: var(--green-light);
}

/* Floating cards */
.float-card {
  position: absolute;
  background: white;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid var(--gray-200);
  z-index: 3;
  animation: floatUp 3s ease-in-out infinite;
}

.float-card:nth-child(2) { animation-delay: 1.5s; }

@keyframes floatUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.float-1 {
  right: -40px;
  top: 80px;
  width: 150px;
}

.float-2 {
  left: -50px;
  bottom: 120px;
  width: 140px;
}

.float-title { font-size: 10px; color: var(--gray-500); font-weight: 500; margin-bottom: 4px; }
.float-value { font-size: 16px; font-weight: 800; color: var(--green-dark); }
.float-sub { font-size: 9px; color: var(--gray-500); margin-top: 2px; }

.float-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #DCFCE7;
  color: #166534;
  border-radius: 100px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  margin-top: 4px;
}

/* BG decoration */
.hero-bg {
  position: fixed;
  top: 0; right: 0;
  width: 55%;
  height: 100vh;
  background: var(--green-pale);
  z-index: 0;
  clip-path: ellipse(80% 100% at 100% 50%);
  pointer-events: none;
}

/* En modo oscuro, el verde pálido sólido se ve como un parche claro
   encima del fondo oscuro; se cambia por un lavado translúcido. */
:root[data-theme="dark"] .hero-bg { background: rgba(34,160,90,0.10); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-bg { background: rgba(34,160,90,0.10); }
}

/* FEATURES STRIP */
.features-strip {
  background: var(--green-dark);
  color: white;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.95;
}

.feature-check {
  width: 18px;
  height: 18px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* SOCIAL PROOF */
.social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2rem;
}

.avatars {
  display: flex;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.avatars .avatar:first-child { margin-left: 0; }

.proof-text {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.4;
}

.proof-text strong { color: var(--gray-900); }

.stars { color: #F59E0B; font-size: 0.75rem; }

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
