/* =====================================================
   momento.css — Estilos para páginas interiores de Momentos
   Finbase Design System — Claridad Brutal
   ===================================================== */

/* ── Timeline: wrapper con línea continua ─────────── */
.pasos-wrapper {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* La línea vertical continua */
.pasos-wrapper::before {
  content: '';
  position: absolute;
  /* 2rem padding del wrapper + 20px (mitad del círculo de 40px) - 1px (mitad del trazo) = 2rem + 19px */
  left: calc(2rem + 19px);
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(var(--momento-accent-rgb, 99, 102, 241), 0.15);
  pointer-events: none;
}

/* Cada sección: grid con columna para el círculo */
.momento-section {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 0 2.5rem;
  padding: 80px 0;
  border-top: 1px solid rgba(8, 48, 76, 0.07);
  align-items: start;
}

.momento-section:first-child {
  border-top: none;
}

/* Círculo numerado — sticky mientras scrolleas la sección */
.paso-circulo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--momento-accent, #6366F1);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: sticky;
  top: 108px;  /* debajo del navbar */
  z-index: 2;
  /* sombra sutil del color del momento */
  box-shadow: 0 4px 16px rgba(var(--momento-accent-rgb, 99, 102, 241), 0.25);
}

.paso-content {
  min-width: 0;
}

/* Títulos dentro del paso */
.momento-titulo {
  margin-top: 0.25rem; /* alinea visualmente con el círculo */
  margin-bottom: 0.5rem;
}

.momento-subtitulo-seccion {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 3rem;
  max-width: 560px;
}

/* Secciones sin timeline (otros-momentos, etc.) */
.momento-section-plana {
  padding: 80px 0;
  border-top: 1px solid rgba(8, 48, 76, 0.07);
}


/* ── Momento Hero ─────────────────────────────────── */
.momento-hero {
  padding: 160px 0 80px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.momento-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.momento-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 780px;
}

.momento-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0;
  background: color-mix(in srgb, var(--chip-color) 12%, transparent);
  color: var(--chip-color);
  border: 1px solid color-mix(in srgb, var(--chip-color) 20%, transparent);
}

.momento-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--chip-color);
}

.momento-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  max-width: 700px;
}

.momento-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0;
}

/* ── Secciones interiores (dentro de .momento-main) ── */
.momento-section {
  padding: 96px 0;
  border-top: 1px solid rgba(8, 48, 76, 0.08);
}

.momento-section:first-child {
  border-top: none;
}

.seccion-label {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── La Situación ─────────────────────────────────── */
.situacion-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.situacion-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.situacion-number {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--momento-accent, #6366F1);
  line-height: 1;
}

.situacion-item p {
  font-size: 1rem;
  max-width: 320px;
  padding-top: 0.5rem;
  border-top: 2px solid rgba(8, 48, 76, 0.06);
  margin-top: 0.25rem;
}

/* ── Conceptos ────────────────────────────────────── */
.conceptos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.concepto-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.concepto-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--concepto-accent);
}

.concepto-numero {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--concepto-accent);
  margin-bottom: 1.25rem;
}

.concepto-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.concepto-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 100%;
}

/* ── Simulador de nómina ──────────────────────────── */
.tool-intro {
  max-width: 580px;
  margin: 1rem 0 3rem;
}

.nomina-simulator {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 32px;
  padding: 2.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.04);
}

.nomina-input-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.input-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.input-group input,
.input-group select {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: white;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
  border-color: #6366F1;
}

/* Result panel */
.nomina-result-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.result-highlight {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(16, 185, 129, 0.04) 100%);
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.result-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 500;
}

.result-big {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--momento-accent, #6366F1);
  line-height: 1.05;
}

.result-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Desglose rows */
.nomina-desglose {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.desglose-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.desglose-row:last-child {
  border-bottom: none;
  padding-top: 1rem;
}

.desglose-concepto {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.desglose-tag {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.desglose-pct {
  font-size: 0.8rem;
  color: #aaa;
}

.desglose-valor {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
}

.desglose-minus {
  color: #EF4444;
}

.desglose-green {
  color: #059669;
  font-size: 1.2rem;
}

.desglose-neto .desglose-concepto {
  color: var(--text-main);
  font-weight: 500;
}

/* Variante + (paga extra) */
.desglose-tag--plus {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

/* Fila de paga extra */
.desglose-extra {
  border-top: 1px dashed rgba(8, 48, 76, 0.10);
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* Barra visual */
.nomina-barra-visual {
  display: flex;
  height: 10px;
  border-radius: 100px;
  overflow: hidden;
  gap: 2px;
}

.barra-segmento {
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.barra-neto { background: #10B981; }
.barra-irpf { background: #6366F1; }
.barra-ss   { background: #F59E0B; }

.barra-leyenda {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.barra-leyenda span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-neto { background: #10B981; }
.dot-irpf { background: #6366F1; }
.dot-ss   { background: #F59E0B; }

/* ── Lectura ──────────────────────────────────────── */
.lectura-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.lectura-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 3rem;
}

.lectura-num {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.lectura-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.lectura-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 100%;
}

/* Ejemplo visual de nómina (card 01) */
.nomina-ejemplo {
  margin-top: 1.5rem;
  border: 1px solid rgba(8, 48, 76, 0.08);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.88rem;
}

.nomina-ej-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(8, 48, 76, 0.05);
}

.nomina-ej-row:last-child {
  border-bottom: none;
}

.nomina-ej-header {
  background: rgba(8, 48, 76, 0.04);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
}

.nomina-ej-subtotal {
  background: rgba(8, 48, 76, 0.025);
  font-weight: 500;
  color: var(--text-main);
}

.nomina-ej-descuento span:last-child {
  color: #DC2626;
  font-weight: 500;
}

.nomina-ej-neto {
  background: rgba(16, 185, 129, 0.06);
  font-weight: 600;
}

.nomina-ej-neto span:last-child {
  color: #059669;
}

/* Tabla bruto/neto (card 03) */
.bruto-neto-tabla {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 1.25rem;
  border: 1px solid rgba(8, 48, 76, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.bn-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(8, 48, 76, 0.05);
  gap: 0.1rem 1rem;
}

.bn-row:last-child {
  border-bottom: none;
}

.bn-bruto {
  font-size: 0.9rem;
  color: var(--text-muted);
  grid-column: 1;
  grid-row: 1;
}

.bn-neto {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  text-align: right;
  color: #059669;
}

.bn-detalle {
  font-size: 0.78rem;
  color: var(--text-muted);
  grid-column: 1;
  grid-row: 2;
}


/* ── Otros momentos ───────────────────────────────── */
.otros-momentos {
  background: transparent;
}

.otros-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.otro-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.otro-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
  text-decoration: none;
}

.otro-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.otro-card h3 {
  font-size: 1.1rem;
}

.otro-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 100%;
  margin: 0;
}

.otro-arrow {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.otro-card:hover .otro-arrow {
  transform: translateX(4px);
}

/* ── CTA final ────────────────────────────────────── */
.momento-cta {
  padding: 8rem 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.momento-cta h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.momento-cta p {
  max-width: 440px;
}

/* Botón CTA de momento: degradado logo (indigo → cyan) */
.momento-cta .btn-primary::before {
  background: linear-gradient(135deg, #6366F1, #06B6D4);
}



/* ════════════════════════════════════════════════════
   RESPONSIVE — 3 breakpoints
   ════════════════════════════════════════════════════ */

/* ── Tablet: 768px – 1024px ────────────────────────── */
@media (max-width: 1024px) {
  .pasos-wrapper {
    padding: 0 1.5rem;
  }

  .pasos-wrapper::before {
    /* 1.5rem padding + 18px (mitad de círculo 36px) */
    left: calc(1.5rem + 17px);
  }

  .momento-section {
    grid-template-columns: 48px 1fr;
    gap: 0 2rem;
    padding: 64px 0;
  }

  .paso-circulo {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    top: 104px;
  }

  .situacion-grid,
  .conceptos-grid,
  .otros-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nomina-simulator {
    grid-template-columns: 1fr;
  }
}

/* ── Mobile: < 768px ───────────────────────────────── */
@media (max-width: 768px) {
  /* Timeline: sin línea, círculo sobre el título */
  .pasos-wrapper {
    padding: 0 20px;
  }

  .pasos-wrapper::before {
    display: none; /* eliminar línea vertical */
  }

  .momento-section {
    display: block;   /* vuelve a flujo normal, una sola columna */
    padding: 56px 0;
  }

  .paso-circulo {
    position: static;  /* ya no es sticky */
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }

  .momento-section-plana {
    padding: 56px 0;
  }

  /* Hero */
  .momento-hero {
    padding: 120px 0 56px;
  }

  /* Grids en 1 columna */
  .situacion-grid,
  .conceptos-grid,
  .lectura-grid,
  .otros-grid {
    grid-template-columns: 1fr;
  }

  /* Simulador */
  .nomina-simulator {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  /* Sections planas */
  .container {
    padding: 0 20px;
  }

  /* CTA */
  .momento-cta {
    padding: 4rem 0;
  }

  .momento-cta h2 {
    font-size: 2.25rem;
  }
}
