/* ============================================================
   ERP LANDING — ESTILOS ESPECÍFICOS
   Archivo: erp/css/erp.css
   ============================================================ */

/* ────────────────────────────────────────────────────────────
   [1] ERP BENTO PROBLEM GRID & SCROLL STORY TIMELINE
   ──────────────────────────────────────────────────────────── */
/* --- ERP BENTO PROBLEM GRID --- */
.erp-problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 2.5rem auto 0;
}

.erp-pain-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  color: #0f172a;
}

.erp-pain-span-2 {
  grid-column: span 2;
}

.erp-pain-span-3 {
  grid-column: span 3;
}

.erp-pain-card:hover {
  transform: translateY(-5px);
  border-color: rgba(239, 68, 68, 0.2);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.08);
}

.erp-pain-header-flex {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pain-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pain-icon.icon-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.pain-icon.icon-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.erp-pain-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a !important;
  margin-bottom: 0;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.5px;
}

.erp-pain-card .p-card-body {
  color: #475569 !important;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
  margin-top: 0.5rem;
}

.pain-visual {
  margin-top: 1.75rem;
  flex-grow: 1;
  position: relative;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(0,0,0,0.05);
  overflow: hidden;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* --- ANIMATION: STOCK COUNTER --- */
.stock-counter-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.stock-counter-title {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.stock-counter-number {
  font-size: 3rem;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  color: #10b981;
  position: relative;
  line-height: 1;
}

.stock-counter-number::after {
  content: "5";
  animation: stock-countdown 6s infinite ease-in-out;
}

@keyframes stock-countdown {
  0%, 15% { content: "5"; color: #10b981; }
  20%, 35% { content: "2"; color: #f59e0b; }
  40%, 55% { content: "0"; color: #ef4444; }
  60%, 85% { content: "-1"; color: #ef4444; text-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
  90%, 100% { content: "5"; color: #10b981; }
}

/* Glow ring behind stock counter */
.stock-counter-visual::before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
  animation: stock-glow 6s infinite ease-in-out;
  pointer-events: none;
}

@keyframes stock-glow {
  0%, 55% { transform: scale(0.8); opacity: 0; }
  60%, 85% { transform: scale(1.2); opacity: 1; }
  90%, 100% { transform: scale(0.8); opacity: 0; }
}

/* --- ANIMATION: UNPAID INVOICES --- */
.unpaid-invoices-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 120px;
  position: relative;
}

.invoice-paper-stack {
  position: relative;
  width: 120px;
  height: 90px;
}

.inv-paper {
  position: absolute;
  width: 100px;
  height: 70px;
  background: white;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 6px;
  padding: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 0.65rem;
  font-weight: 700;
  color: #334155;
  transition: transform 0.3s ease;
}

.inv-due {
  font-size: 0.55rem;
  padding: 1px 4px;
  border-radius: 3px;
  align-self: flex-start;
}

.inv-due.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.inv-due.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.inv-paper.p1 { transform: rotate(-5deg) translate(-10px, -5px); z-index: 1; }
.inv-paper.p2 { transform: rotate(3deg) translate(5px, 0); z-index: 2; }
.inv-paper.p3 { transform: rotate(-1deg) translate(-2px, 8px); z-index: 3; }

/* Pulse animation on stack when hovered */
.erp-pain-card:hover .inv-paper.p1 { transform: rotate(-12deg) translate(-20px, -10px); }
.erp-pain-card:hover .inv-paper.p2 { transform: rotate(8deg) translate(15px, -5px); }
.erp-pain-card:hover .inv-paper.p3 { transform: rotate(-2deg) translate(-2px, 15px); }

.unpaid-total-badge {
  position: absolute;
  right: 15%;
  bottom: 10%;
  background: #f59e0b;
  color: white;
  font-weight: 800;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
  z-index: 4;
  animation: badge-pulse 2s infinite ease-in-out;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4); }
  50% { transform: scale(1.1); box-shadow: 0 4px 18px rgba(245, 158, 11, 0.6); }
}


/* --- ANIMATION: SANCTION DOCUMENT --- */
.sanction-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  padding: 0 1.5rem;
  position: relative;
}

.sanction-document {
  width: 140px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  position: relative;
}

.sanction-doc-header {
  font-size: 0.55rem;
  font-weight: 700;
  color: #1e293b;
  padding: 8px 10px 4px;
  letter-spacing: 0.5px;
  text-align: center;
  border-bottom: 2px solid #1e293b;
}

.sanction-doc-body {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sanction-line {
  height: 5px;
  background: #e2e8f0;
  border-radius: 3px;
  width: 100%;
}

.sanction-line.short {
  width: 60%;
}

.sanction-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg) scale(0);
  transform-origin: center center;
  font-size: 1rem;
  font-weight: 900;
  color: #ef4444;
  border: 3px solid #ef4444;
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: rgba(255,255,255,0.85);
  animation: stamp-slam 4s infinite ease-in-out;
  z-index: 2;
}

@keyframes stamp-slam {
  0%, 30% { transform: translate(-50%, -50%) rotate(-12deg) scale(0); opacity: 0; }
  35% { transform: translate(-50%, -50%) rotate(-12deg) scale(1.3); opacity: 1; }
  40%, 85% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 1; }
  90%, 100% { transform: translate(-50%, -50%) rotate(-12deg) scale(1); opacity: 0; }
}

.sanction-amount {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  color: #ef4444;
  animation: amount-pulse 4s infinite ease-in-out;
  text-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

@keyframes amount-pulse {
  0%, 30% { opacity: 0; transform: translateY(10px); }
  40%, 85% { opacity: 1; transform: translateY(0); }
  90%, 100% { opacity: 0; transform: translateY(-5px); }
}

/* --- VISUAL: CHAT "EL GRUPO QUE ESPERA TU OK" (Card 4) --- */
.chat-equipo-espera__visual *{ box-sizing:border-box; }
.chat-equipo-espera__visual{ width:100%; }
.chat-equipo-espera__stage{ width:100%; min-height:250px; display:grid; grid-template-columns:1.4fr 1fr; gap:1rem; padding:1rem; align-items:stretch; }

.chat-equipo-espera__panel{ background:#fff; border-radius:14px; border:1px solid rgba(15,23,42,.08); box-shadow:0 4px 16px rgba(15,23,42,.06); overflow:hidden; display:flex; flex-direction:column; }
.chat-equipo-espera__header{ display:flex; align-items:center; gap:.5rem; padding:.6rem .9rem; border-bottom:1px solid rgba(15,23,42,.06); }
.chat-equipo-espera__avatar{ width:24px; height:24px; border-radius:50%; background:linear-gradient(135deg,#334155,#0f172a); color:#fff; font:700 11px/24px 'Montserrat',sans-serif; text-align:center; flex-shrink:0; }
.chat-equipo-espera__header-text{ display:flex; flex-direction:column; line-height:1.25; flex:1; min-width:0; }
.chat-equipo-espera__header-title{ font:700 12px/1.25 'Montserrat',sans-serif; color:#0f172a; }
.chat-equipo-espera__header-sub{ font-size:10px; color:#94a3b8; }
.chat-equipo-espera__unread{ flex-shrink:0; background:#ef4444; color:#fff; font:700 9.5px/1 'Inter',sans-serif; padding:4px 8px; border-radius:99px; animation:n3iCeeUnreadPulse 1.8s ease-in-out infinite; animation-play-state:paused; }

.chat-equipo-espera__body{ padding:.7rem .9rem; display:flex; flex-direction:column; gap:.5rem; flex:1; }
.chat-equipo-espera__bubble{ max-width:92%; background:#f1f5f9; border-radius:12px 12px 12px 4px; padding:.45rem .65rem; opacity:0; transform:translateY(8px); transition:opacity .45s ease, transform .45s ease; }
.chat-equipo-espera__body--in .chat-equipo-espera__bubble{ opacity:1; transform:translateY(0); }
.chat-equipo-espera__bubble:nth-child(1){ transition-delay:0s; }
.chat-equipo-espera__bubble:nth-child(2){ transition-delay:.8s; }
.chat-equipo-espera__bubble:nth-child(3){ transition-delay:1.6s; }
.chat-equipo-espera__bubble-meta{ display:flex; justify-content:space-between; gap:.4rem; margin-bottom:.2rem; flex-wrap:wrap; }
.chat-equipo-espera__sender{ font-size:10px; font-weight:700; color:#b45309; }
.chat-equipo-espera__time{ font-size:10px; color:#94a3b8; }
.chat-equipo-espera__text{ font-size:12px; color:#334155; line-height:1.35; margin:0; }
.chat-equipo-espera__mention{ color:#b45309; font-weight:700; }
.chat-equipo-espera__bubble-footer{ display:flex; justify-content:space-between; gap:.4rem; margin-top:.3rem; flex-wrap:wrap; }
.chat-equipo-espera__check{ font-size:9px; color:#94a3b8; }
.chat-equipo-espera__chip{ font-size:9px; color:#b91c1c; background:rgba(239,68,68,.08); padding:1px 6px; border-radius:99px; }

.chat-equipo-espera__typing-row{ display:flex; align-items:center; gap:.4rem; padding:.4rem .9rem; border-top:1px dashed rgba(15,23,42,.1); animation:n3iCeeTypingFade 4s ease-in-out infinite; animation-play-state:paused; }
.chat-equipo-espera__typing-text{ font-size:10.5px; font-style:italic; color:#64748b; }
.chat-equipo-espera__dots{ display:inline-flex; gap:3px; }
.chat-equipo-espera__dot{ width:5px; height:5px; border-radius:50%; background:#64748b; animation:n3iCeeDotBounce 1.1s ease-in-out infinite; animation-play-state:paused; }
.chat-equipo-espera__dot:nth-child(1){ animation-delay:0s; }
.chat-equipo-espera__dot:nth-child(2){ animation-delay:.15s; }
.chat-equipo-espera__dot:nth-child(3){ animation-delay:.3s; }

.chat-equipo-espera__visual.is-active .chat-equipo-espera__unread,
.chat-equipo-espera__visual.is-active .chat-equipo-espera__typing-row,
.chat-equipo-espera__visual.is-active .chat-equipo-espera__dot{ animation-play-state:running; }

.chat-equipo-espera__insight{ display:flex; flex-direction:column; justify-content:center; gap:.9rem; padding:.5rem; }
.chat-equipo-espera__stat{ display:flex; flex-direction:column; gap:1px; }
.chat-equipo-espera__stat-title{ display:flex; align-items:center; gap:.4rem; font:800 15px/1.25 'Montserrat',sans-serif; color:#0f172a; }
.chat-equipo-espera__pause-ico{ color:#b45309; flex-shrink:0; }
.chat-equipo-espera__stat-sub{ font-size:10.5px; color:#94a3b8; }
.chat-equipo-espera__counter{ font:800 26px/1.1 'Montserrat',sans-serif; color:#ef4444; font-variant-numeric:tabular-nums; }
.chat-equipo-espera__queue{ font-size:13px; font-weight:700; color:#b45309; display:flex; align-items:center; gap:.35rem; }
.chat-equipo-espera__queue::before{ content:''; width:6px; height:6px; border-radius:50%; background:#f59e0b; flex-shrink:0; }
.chat-equipo-espera__note{ font-size:10.5px; font-style:italic; color:#94a3b8; border-left:2px solid #e2e8f0; padding-left:.5rem; margin:0; }

@keyframes n3iCeeUnreadPulse{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.08); } }
@keyframes n3iCeeDotBounce{ 0%,100%{ transform:translateY(0); opacity:.4; } 50%{ transform:translateY(-3px); opacity:1; } }
@keyframes n3iCeeTypingFade{ 0%,100%{ opacity:1; } 50%{ opacity:.18; } }

@media (max-width: 900px){
  .chat-equipo-espera__stage{ grid-template-columns:1fr; min-height:auto; gap:.6rem; padding:.75rem; }
  .chat-equipo-espera__header{ padding:.45rem .7rem; }
  .chat-equipo-espera__body{ padding:.55rem .7rem; gap:.4rem; }
  .chat-equipo-espera__bubble{ padding:.35rem .55rem; max-width:100%; }
  .chat-equipo-espera__typing-row{ padding:.35rem .7rem; }
  .chat-equipo-espera__insight{ flex-direction:row; flex-wrap:wrap; justify-content:space-between; gap:.5rem .7rem; padding:.4rem .1rem 0; }
  .chat-equipo-espera__insight .chat-equipo-espera__stat{ flex:1 1 28%; min-width:84px; gap:0; }
  .chat-equipo-espera__counter{ font-size:18px; }
  .chat-equipo-espera__stat-title{ font-size:12px; }
  .chat-equipo-espera__stat-sub{ font-size:9px; }
  .chat-equipo-espera__note{ flex-basis:100%; margin-top:.2rem; }
}
@media (max-width: 480px){
  .chat-equipo-espera__insight .chat-equipo-espera__note{ display:none; }
}
@media (prefers-reduced-motion: reduce){
  .chat-equipo-espera__visual *{ animation:none !important; transition:none !important; }
  .chat-equipo-espera__bubble{ opacity:1 !important; transform:none !important; }
}

.phone-home-indicator {
  width: 16px;
  height: 2.5px;
  background: #475569;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* --- ANIMATION: 78 DÍAS ROBADOS (Card 5) --- */
.dias-robados__root{width:100%;box-sizing:border-box;display:grid;grid-template-columns:1.5fr 1fr;align-items:center;gap:0 2rem;padding:1.5rem 1.75rem;font-family:Inter,sans-serif;}

.dias-robados__year{display:grid;grid-template-columns:repeat(12,1fr);gap:.45rem;}
.dias-robados__month{display:flex;flex-direction:column;align-items:center;gap:.3rem;}
.dias-robados__month-label{font:600 .58rem/1 Inter,sans-serif;color:#94a3b8;text-transform:uppercase;letter-spacing:.5px;}
.dias-robados__label-short{display:none;}
.dias-robados__grid{display:grid;grid-template-columns:repeat(3,9px);grid-auto-rows:9px;gap:2px;}
.dias-robados__cell{width:9px;height:9px;border-radius:2px;background:#e2e8f0;transition:background-color .2s ease;}

@keyframes driasPop{
  0%{background:#e2e8f0;transform:scale(1);}
  55%{background:#ef4444;transform:scale(1.3);}
  100%{background:#ef4444;transform:scale(1);}
}
.dias-robados__root.is-inview .dias-robados__cell.is-robada{
  animation:driasPop .45s ease forwards;
  animation-delay:var(--d,0ms);
}

.dias-robados__legend{margin-top:.75rem;font:500 .65rem/1 Inter,sans-serif;color:#94a3b8;}
.dias-robados__legend b{color:#ef4444;font-weight:700;margin-right:.3em;}

.dias-robados__stat{display:flex;flex-direction:column;align-items:flex-start;}
.dias-robados__stat-number{font-family:Montserrat,sans-serif;font-weight:800;font-size:clamp(3rem,5vw,4.2rem);line-height:1;color:#ef4444;}
.dias-robados__stat-text{margin-top:.5rem;}
.dias-robados__stat-label{margin:0 0 .3rem;font:600 .95rem/1.3 Inter,sans-serif;color:#0f172a;}
.dias-robados__stat-sub{margin:0 0 .35rem;font:500 .8rem/1.3 Inter,sans-serif;color:#475569;}
.dias-robados__stat-micro{margin:0;font:500 .68rem/1.3 Inter,sans-serif;color:#94a3b8;}

@media (max-width:900px){
  .dias-robados__root{grid-template-columns:1fr;gap:1rem;padding:1rem 1.1rem;}
  .dias-robados__year{order:2;gap:2px;}
  .dias-robados__stat{order:1;flex-direction:row;align-items:center;gap:.8rem;}
  .dias-robados__stat-text{margin-top:0;}
  .dias-robados__stat-number{font-size:2.4rem;}
  .dias-robados__month{gap:.15rem;}
  .dias-robados__month-label{font-size:.5rem;}
  .dias-robados__label-full{display:none;}
  .dias-robados__label-short{display:inline;}
  .dias-robados__grid{grid-template-columns:repeat(3,5px);grid-auto-rows:5px;gap:1px;}
  .dias-robados__cell{width:5px;height:5px;}
  .dias-robados__legend{display:none;}
}

@media (prefers-reduced-motion: reduce){
  .dias-robados__cell{transition:none !important;}
  .dias-robados__cell.is-robada{animation:none !important;background:#ef4444 !important;}
}

@media (max-width: 900px) {
  .erp-problem-grid {
    grid-template-columns: 1fr;
    gap: 3rem; /* Espacio extra para asegurar recorrido de scroll entre tarjetas */
    padding-bottom: 2rem;
  }
  .erp-pain-span-2,
  .erp-pain-span-3 {
    grid-column: span 1;
  }
  
  /* --- PREMIUM STICKY STACKING EFFECT --- */
  .erp-pain-card {
    position: sticky;
    top: 90px; /* Margen para salvar el navbar */
    /* Sombra extra fuerte arriba para separar las tarjetas cuando se solapan */
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.15), 0 10px 30px rgba(0,0,0,0.03); 
    border-top: 1px solid rgba(255,255,255,0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* Offset progresivo para crear efecto "Baraja de Cartas" */
  .erp-pain-card:nth-child(1) { top: 90px; z-index: 10; }
  .erp-pain-card:nth-child(2) { top: 110px; z-index: 20; }
  .erp-pain-card:nth-child(3) { top: 130px; z-index: 30; }
  .erp-pain-card:nth-child(4) { top: 150px; z-index: 40; }
  .sanction-visual {
    padding: 0 0.5rem;
    gap: 1rem;
  }
  .sanction-amount {
    font-size: 1.4rem;
  }
}

/* --- PLAN C: CINEMATIC SCROLL STORY (NUEVO TIMELINE "LA JORNADA") --- */
.story-section {
  padding: 100px 0;
  position: relative;
}

.story-eyebrow {
  text-align: center;
  margin-bottom: 1rem;
}

.story-eyebrow span {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: #06b6d4;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Timeline Layout */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 4rem auto 0;
}

/* Línea conectora central - Progreso activo */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 6rem;
  bottom: 6rem;
  width: 2px;
  background: var(--line-color, #06b6d4);
  transform: translateX(-50%);
  z-index: 2;
  clip-path: inset(0px 0px 100% 0px);
  transition: background 0.6s ease;
}

/* Momentos de la jornada y animaciones de revelación */
.tl-moment .tl-content,
.tl-moment .tl-visual,
.tl-moment .budget-card-container {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.tl-moment--left .tl-content {
  transform: translateX(-35px);
}
.tl-moment--left .tl-visual {
  transform: translateX(35px);
}
.tl-moment--right .tl-content {
  transform: translateX(35px);
}
.tl-moment--right .tl-visual,
.tl-moment--right .budget-card-container {
  transform: translateX(-35px);
}

.tl-moment.active .tl-content,
.tl-moment.active .tl-visual,
.tl-moment.active .budget-card-container {
  opacity: 1;
  transform: translate(0, 0);
  transition-delay: 0.15s;
}

.tl-moment--right .budget-card-container {
  grid-column: 1;
  order: -1;
  justify-self: center;
}

/* Animaciones del nodo y dot */
.tl-node {
  opacity: 0;
  transform: translateX(-50%) scale(0.6);
  transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tl-moment.active .tl-node {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Momentos de la jornada */
.tl-moment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  position: relative;
  padding: 4rem 0;
  align-items: center;
  z-index: 2;
}

.tl-content {
  position: relative;
}

.tl-content h3 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.tl-content p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.7;
}

.tl-visual {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.02), 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.tl-visual:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Alternancia izquierda/derecha */
.tl-moment--left .tl-content {
  text-align: center;
  padding-right: 1.5rem;
  grid-column: 1;
}

.tl-moment--left .tl-visual {
  grid-column: 2;
}

.tl-moment--right .tl-content {
  text-align: left;
  padding-left: 1.5rem;
  grid-column: 2;
}

.tl-moment--right .tl-visual {
  grid-column: 1;
  order: -1;
}

/* Nodos del timeline */
.tl-node {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.tl-time {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: monospace;
  margin-bottom: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #0f172a;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  transition: transform 0.3s ease;
}

.tl-moment:hover .tl-dot {
  transform: scale(1.3);
}

/* Estilos de nodo de color según momento */
.tl-moment:nth-child(2) .tl-time { color: #06b6d4; border-color: rgba(6, 182, 212, 0.3); }
.tl-moment:nth-child(2) .tl-dot { background: #06b6d4; box-shadow: 0 0 8px #06b6d4; }

.tl-moment:nth-child(3) .tl-time { color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.tl-moment:nth-child(3) .tl-dot { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }

.tl-moment:nth-child(4) .tl-time { color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }
.tl-moment:nth-child(4) .tl-dot { background: #a855f7; box-shadow: 0 0 8px #a855f7; }

.tl-moment:nth-child(5) .tl-time { color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.tl-moment:nth-child(5) .tl-dot { background: #10b981; box-shadow: 0 0 8px #10b981; }

.tl-moment:nth-child(6) .tl-time { color: #06b6d4; border-color: rgba(6, 182, 212, 0.3); }
.tl-moment:nth-child(6) .tl-dot { background: #06b6d4; box-shadow: 0 0 8px #06b6d4; }


/* --- VISUAL INTERNO 1: MINI DASHBOARD --- */
.mini-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 290px;
}

.db-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.db-card-icon {
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 8px;
  color: #06b6d4;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.db-card-icon svg {
  width: 16px;
  height: 16px;
}

.db-card:hover .db-card-icon {
  transform: scale(1.05);
}

.db-card .db-card-icon svg {
  animation: bolt-glow 2s infinite ease-in-out;
}

.db-card.warning .db-card-icon svg {
  animation: warning-flash 2.5s infinite ease-in-out;
}

.db-card.alert .db-card-icon svg {
  animation: box-bounce 3s infinite ease-in-out;
}

@keyframes bolt-glow {
  0%, 100% { filter: drop-shadow(0 0 1px rgba(6, 182, 212, 0)); opacity: 0.85; }
  50% { filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.6)); opacity: 1; }
}

@keyframes warning-flash {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes box-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.db-card-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.db-card-info strong {
  font-size: 0.8rem;
  color: #f8fafc;
  font-weight: 600;
}

.db-card-info span {
  font-size: 0.7rem;
  color: #64748b;
}

.db-card.warning .db-card-icon {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.db-card.alert .db-card-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}



/* --- VISUAL INTERNO 2: PRESUPUESTO DIGITAL (NUEVO) --- */
.budget-card-container {
  width: 100%;
  max-width: 360px; /* Hace la tarjeta más grande */
}

.budget-card {
  background: rgba(15, 23, 42, 0.85); /* Fondo más opaco e integrado */
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  position: relative;
}

.budget-card::before {
  content: '';
  position: absolute;
  top: 0; left: -50%; width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: rotate(30deg);
  animation: shine-sweep 4s infinite linear;
}

.budget-card:hover {
  transform: translateY(-4px); /* Movimiento plano hacia arriba */
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 15px rgba(6, 182, 212, 0.15);
}

.bc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.6rem;
}

.bc-title-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.bc-doc-type {
  font-size: 0.6rem;
  font-weight: 700;
  color: #06b6d4;
  letter-spacing: 1px;
}

.bc-doc-id {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.bc-status-badge {
  font-size: 0.6rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-green 2s infinite ease-in-out;
}

.bc-client {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.bc-client-meta {
  font-size: 0.65rem;
  color: #94a3b8;
  line-height: 1.3;
}

.bc-client-meta strong {
  color: #f8fafc;
  font-weight: 500;
}

.bc-table {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bc-table-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  padding-bottom: 0.25rem;
}

.bc-table-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #cbd5e1;
}

.bc-table-row strong {
  color: #f8fafc;
  font-weight: 600;
}

.bc-summary {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.6rem;
}

.bc-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: #64748b;
}

.bc-tax-row {
  align-items: center;
}

.tax-calculated-badge {
  font-size: 0.55rem;
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 600;
  border: 1px solid rgba(6, 182, 212, 0.15);
  animation: calculating-blink 1.5s infinite ease-in-out;
}

.bc-total-row {
  font-size: 0.75rem;
  color: #f8fafc;
  font-weight: 600;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.bc-total-row strong {
  color: #06b6d4;
  font-size: 0.85rem;
  font-weight: 700;
}


/* --- VISUAL INTERNO 3: CADENA DOCUMENTAL --- */
.act-doc-flow {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  max-width: 660px;
  gap: 0.35rem;
}

.act-doc {
  /* flex-basis 0 → los 4 documentos ocupan exactamente el mismo ancho, sin
     importar la longitud de la etiqueta; align-items:stretch del contenedor
     iguala también la altura. */
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 0.3rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1.5px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.act-doc svg {
  color: var(--doc-color, #64748b);
  transition: transform 0.3s ease;
}

.act-doc span {
  font-size: 0.55rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: color 0.3s ease;
}

/* Iluminación por turnos (la clase .is-lit la va rotando erp.js, uno a uno:
   presupuesto → pedido → albarán → factura). Sustituye al antiguo :hover. */
.act-doc.is-lit {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--doc-color);
  box-shadow: 0 0 16px rgba(var(--doc-color-rgb, 6, 182, 212), 0.25);
}

.act-doc.is-lit svg {
  transform: scale(1.12);
}

.act-doc.is-lit span {
  color: var(--doc-color);
}

.act-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.15);
  transition: color 0.3s ease;
}

.act-arrow svg {
  display: block;
}

/* La flecha se enciende cuando la cadena ya ha pasado por ella. */
.act-arrow.is-lit {
  color: rgba(255, 255, 255, 0.55);
}

/* La cadena documental (Momento 3 = .tl-moment:nth-child(4), el .timeline-line
   es el hijo 1) necesita más ancho que el resto de visuals para sus 4 cajas.
   Solo en escritorio le estrechamos el gap del grid y el padding de la tarjeta,
   ganando ancho útil SIN descentrar la línea ni afectar a los demás momentos. */
@media (min-width: 769px) {
  .tl-moment:nth-child(4) {
    gap: 3rem;
  }
  .tl-moment:nth-child(4) .tl-visual {
    padding: 1.5rem 1.25rem;
  }
}


/* --- VISUAL INTERNO 4: NOTIFICACIONES MÓVIL --- */
.phone-noti-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  max-width: 320px;
}

.mini-phone-v2 {
  width: 48px;
  height: 84px;
  background: #0f172a;
  border: 3px solid #475569;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.phone-screen-v2 {
  width: 100%;
  height: 100%;
  background: #1e293b;
  border-radius: 6px;
  position: relative;
}

.phone-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 4.5px;
  border-radius: 99px;
  border: 1.5px solid #0f172a;
}

.mini-phone-v2 .phone-badge {
  background: #10b981;
}

.floating-notis-v2 {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-grow: 1;
}

.floating-noti-v2 {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: float-slide 2.5s infinite ease-in-out alternate;
}

.floating-noti-v2:nth-child(2) {
  animation-delay: 1.2s;
}

@keyframes float-slide {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.fn-icon-v2 {
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fn-content-v2 {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.fn-content-v2 strong {
  font-size: 0.75rem;
  color: #f8fafc;
}

.fn-content-v2 span {
  font-size: 0.65rem;
  color: #10b981;
}


/* --- VISUAL INTERNO 5: KPI DASHBOARD --- */
.kpi-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 290px;
  text-align: left;
}

.kpi-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.kpi-row > span {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-flex-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.kpi-bar-wrapper {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 99px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
}

.kpi-bar {
  height: 6px;
  border-radius: 99px;
}

.kpi-value {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f8fafc;
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}


/* --- CTA --- */
.sol-cta {
  text-align: center;
  margin-top: 4rem;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #0052d4, #4364f7, #6fb1fc);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(67, 100, 247, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(67, 100, 247, 0.5), 0 0 15px rgba(6, 182, 212, 0.3);
}

.btn-primary-glow svg {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.btn-primary-glow:hover svg {
  transform: translate(3px, -3px);
}

/* --- RESPONSIVE TIMELINE --- */
@media (max-width: 768px) {
  .timeline-line {
    left: 20px;
    transform: none;
    top: 40px;
    bottom: 40px;
  }
  
  .tl-moment--left .tl-content,
  .tl-moment--right .tl-content,
  .tl-moment--left .tl-visual,
  .tl-moment--right .tl-visual,
  .tl-moment--right .budget-card-container {
    transform: translateY(25px) !important;
  }

  .tl-moment.active .tl-content,
  .tl-moment.active .tl-visual,
  .tl-moment.active .budget-card-container {
    transform: translateY(0) !important;
  }
  
  .tl-moment {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0;
  }
  
  .tl-moment--left .tl-content,
  .tl-moment--right .tl-content {
    text-align: left;
    padding-left: 3.5rem;
    padding-right: 0;
    grid-column: 1;
  }
  
  .tl-moment--left .tl-visual,
  .tl-moment--right .tl-visual,
  .tl-moment--right .budget-card-container {
    grid-column: 1;
    order: 3;
    margin-left: 3.5rem;
    max-width: calc(100% - 3.5rem);
  }
  
  .tl-node {
    left: 20px;
    transform: translateX(-50%) scale(0.6) !important;
  }

  .tl-moment.active .tl-node {
    transform: translateX(-50%) scale(1) !important;
  }
  
  .act-doc-flow {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  
  .act-doc {
    flex: none;
    width: calc(50% - 0.4rem);
  }
  
  .act-arrow {
    display: none;
  }
  
  .bc-table {
    display: block;
    overflow-x: auto;
    width: 100%;
  }
}



.pipeline-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  background: var(--stage-bg, rgba(15, 23, 42, 0.4));
  backdrop-filter: blur(12px);
  border: 1px solid var(--stage-border, rgba(255, 255, 255, 0.05));
  padding: 1.5rem 1rem;
  border-radius: 20px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);

  /* Dark theme defaults for variable overrides */
  --node-bg-idle: #111b2e;
  --node-border-idle: #1e293b;
  --node-color-idle: #64748b;
  --node-label-idle: #64748b;
  --node-label-active: #f8fafc;
  --connector-bg: rgba(255, 255, 255, 0.05);
}

/* Light Theme Modifier */
.pipeline-stage--light {
  --stage-bg: rgba(248, 250, 252, 0.6);
  --stage-border: rgba(148, 163, 184, 0.15);
  --connector-bg: #e2e8f0;
  --node-bg-idle: #ffffff;
  --node-border-idle: #e2e8f0;
  --node-color-idle: #94a3b8;
  --node-label-idle: #64748b;
  --node-label-active: #0f172a;
  
  --node-bg-active-1: rgba(6, 182, 212, 0.08);
  --node-bg-active-2: rgba(59, 130, 246, 0.08);
  --node-bg-active-3: rgba(168, 85, 247, 0.08);
  --node-bg-active-4: rgba(16, 185, 129, 0.08);
  
  --node-shadow-1: rgba(6, 182, 212, 0.15);
  --node-shadow-2: rgba(59, 130, 246, 0.15);
  --node-shadow-3: rgba(168, 85, 247, 0.15);
  --node-shadow-4: rgba(16, 185, 129, 0.15);
}

.bento-visual .pipeline-stage--light {
  background: transparent;
  border: none;
  box-shadow: none;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
  width: 75px;
}

.node-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--node-bg-idle);
  border: 2px solid var(--node-border-idle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--node-color-idle);
  transition: all 0.3s ease;
  position: relative;
}

.node-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--node-label-idle);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  text-align: center;
}

/* Animations for Node active states */
.pipeline-node:nth-child(1) .node-icon-circle { animation: node-active-1 8s infinite; }
.pipeline-node:nth-child(1) .node-label { animation: node-label-1 8s infinite; }

.pipeline-node:nth-child(3) .node-icon-circle { animation: node-active-2 8s infinite; }
.pipeline-node:nth-child(3) .node-label { animation: node-label-2 8s infinite; }

.pipeline-node:nth-child(5) .node-icon-circle { animation: node-active-3 8s infinite; }
.pipeline-node:nth-child(5) .node-label { animation: node-label-3 8s infinite; }

.pipeline-node:nth-child(7) .node-icon-circle { animation: node-active-4 8s infinite; }
.pipeline-node:nth-child(7) .node-label { animation: node-label-4 8s infinite; }

/* Keyframes for nodes */
@keyframes node-active-1 {
  0%, 20%, 95%, 100% { border-color: #06b6d4; color: #06b6d4; background: rgba(6, 182, 212, 0.1); box-shadow: 0 0 15px rgba(6, 182, 212, 0.3); }
  25%, 90% { border-color: var(--node-border-idle); color: var(--node-color-idle); background: var(--node-bg-idle); box-shadow: none; }
}
@keyframes node-label-1 {
  0%, 20%, 95%, 100% { color: var(--node-label-active); }
  25%, 90% { color: var(--node-label-idle); }
}

@keyframes node-active-2 {
  0%, 20% { border-color: var(--node-border-idle); color: var(--node-color-idle); background: var(--node-bg-idle); box-shadow: none; }
  25%, 45% { border-color: #3b82f6; color: #3b82f6; background: var(--node-bg-active-2, rgba(59, 130, 246, 0.1)); box-shadow: 0 0 15px var(--node-shadow-2, rgba(59, 130, 246, 0.3)); }
  50%, 100% { border-color: var(--node-border-idle); color: var(--node-color-idle); background: var(--node-bg-idle); box-shadow: none; }
}
@keyframes node-label-2 {
  0%, 20% { color: var(--node-label-idle); }
  25%, 45% { color: var(--node-label-active); }
  50%, 100% { color: var(--node-label-idle); }
}

@keyframes node-active-3 {
  0%, 45% { border-color: var(--node-border-idle); color: var(--node-color-idle); background: var(--node-bg-idle); box-shadow: none; }
  50%, 70% { border-color: #a855f7; color: #a855f7; background: var(--node-bg-active-3, rgba(168, 85, 247, 0.1)); box-shadow: 0 0 15px var(--node-shadow-3, rgba(168, 85, 247, 0.3)); }
  75%, 100% { border-color: var(--node-border-idle); color: var(--node-color-idle); background: var(--node-bg-idle); box-shadow: none; }
}
@keyframes node-label-3 {
  0%, 45% { color: var(--node-label-idle); }
  50%, 70% { color: var(--node-label-active); }
  75%, 100% { color: var(--node-label-idle); }
}

@keyframes node-active-4 {
  0%, 70% { border-color: var(--node-border-idle); color: var(--node-color-idle); background: var(--node-bg-idle); box-shadow: none; }
  75%, 90% { border-color: #10b981; color: #10b981; background: var(--node-bg-active-4, rgba(16, 185, 129, 0.1)); box-shadow: 0 0 15px var(--node-shadow-4, rgba(16, 185, 129, 0.3)); }
  95%, 100% { border-color: var(--node-border-idle); color: var(--node-color-idle); background: var(--node-bg-idle); box-shadow: none; }
}
@keyframes node-label-4 {
  0%, 70% { color: var(--node-label-idle); }
  75%, 90% { color: var(--node-label-active); }
  95%, 100% { color: var(--node-label-idle); }
}

/* Connectors */
.pipeline-connector {
  flex-grow: 1;
  height: 2px;
  background: var(--connector-bg);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.pipeline-pulse {
  position: absolute;
  top: 0;
  left: -50px;
  width: 50px;
  height: 100%;
  border-radius: 99px;
}

.pipeline-connector:nth-child(2) .pipeline-pulse {
  background: linear-gradient(90deg, transparent, #3b82f6);
  box-shadow: 0 0 8px #3b82f6;
  animation: pulse-flow-1 8s infinite linear;
}

.pipeline-connector:nth-child(4) .pipeline-pulse {
  background: linear-gradient(90deg, transparent, #a855f7);
  box-shadow: 0 0 8px #a855f7;
  animation: pulse-flow-2 8s infinite linear;
}

.pipeline-connector:nth-child(6) .pipeline-pulse {
  background: linear-gradient(90deg, transparent, #10b981);
  box-shadow: 0 0 8px #10b981;
  animation: pulse-flow-3 8s infinite linear;
}

@keyframes pulse-flow-1 {
  0%, 15% { left: -50px; }
  20%, 30% { left: 100%; }
  35%, 100% { left: 100%; }
}

@keyframes pulse-flow-2 {
  0%, 40% { left: -50px; }
  45%, 55% { left: 100%; }
  60%, 100% { left: 100%; }
}

@keyframes pulse-flow-3 {
  0%, 65% { left: -50px; }
  70%, 80% { left: 100%; }
  85%, 100% { left: 100%; }
}

@media (max-width: 480px) {
  .pipeline-stage {
    padding: 1rem 0.5rem;
  }
  .pipeline-node {
    width: 60px;
  }
  .node-icon-circle {
    width: 36px;
    height: 36px;
  }
  .node-label {
    font-size: 0.6rem;
  }
  
  .sanction-stamp {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-width: 2px;
  }
  
}

.kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
  font-family: Montserrat, sans-serif;
}

/* ────────────────────────────────────────────────────────────
   [2] LEGAL COMPLIANCE, FAQ & COMPARISON SECTIONS
   ──────────────────────────────────────────────────────────── */
/* ═══════════════════════════════════════════════════════
   LEGAL COMPLIANCE SECTION — MOVIDO a home/index.html
   La sección "[S6] Cumplimiento Legal" se trasladó a la
   landing HOME; sus estilos (.legal-* .vf-* .sii-* .ledger-*
   .audit-* .b2b-* .node-icon …) viven ahora INLINE en
   home/index.html, justo encima de la sección.
   ═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════
   ANTES VS DESPUÉS SECTION
   ═══════════════════════════════════════════════════════ */
/* --- MOBILE TOGGLE --- */
.ba-mobile-toggle {
  display: none;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 6px;
  max-width: 320px;
  margin: 0 auto 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ba-toggle-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.8rem 1rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ba-toggle-btn.active[data-target="before"] {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.ba-toggle-btn.active[data-target="after"] {
  background: rgba(0, 102, 255, 0.2);
  color: #60a5fa;
  box-shadow: 0 0 20px rgba(0, 102, 255, 0.15);
}

.ba-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.ba-column {
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.ba-column--before {
  border-color: rgba(239, 68, 68, 0.15);
}

.ba-column--before:hover {
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.05), 0 0 25px rgba(239, 68, 68, 0.02);
}

.ba-column--after {
  border-color: rgba(0, 102, 255, 0.2);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.4) 0%, rgba(0, 102, 255, 0.04) 100%);
}

.ba-column--after:hover {
  border-color: rgba(0, 102, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0, 102, 255, 0.1), 0 0 30px rgba(0, 102, 255, 0.05);
}

.ba-column-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.5rem;
}

.ba-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.ba-badge--before {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.ba-badge--after {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.ba-column h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #f8fafc !important;
  margin-bottom: 0;
  font-family: 'Montserrat', sans-serif;
  letter-spacing: -0.5px;
}

.ba-rows {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.ba-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.ba-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}

.ba-row-icon--before {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.ba-row-icon--after {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.ba-row h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 0.25rem;
}

.ba-row p {
  color: var(--clr-text-muted) !important;
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════
   FAQ SECTION
   ═══════════════════════════════════════════════════════ */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-accordion-limited .faq-item:nth-child(n+5) {
  display: none !important;
}

.faq-item {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}

/* Scroll reveal initial state */
.faq-item.faq-reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  filter: blur(8px);
  transition: 
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

/* Scroll reveal final state */
.faq-item.faq-reveal.faq-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* Sutil glow de activación */
@keyframes faq-glow-pulse {
  0% { box-shadow: 0 4px 12px rgba(0,0,0,0.01); }
  50% { box-shadow: 0 8px 30px rgba(0, 102, 255, 0.12); border-color: rgba(0, 102, 255, 0.25); }
  100% { box-shadow: 0 4px 12px rgba(0,0,0,0.01); }
}

.faq-item.faq-reveal.faq-visible:not([open]) {
  animation: faq-glow-pulse 0.8s ease-out 0.75s;
}

.faq-item[open] {
  box-shadow: 0 10px 25px rgba(0, 102, 255, 0.05);
  border-color: rgba(0, 102, 255, 0.15);
}

.faq-question {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-chevron::before,
.faq-chevron::after {
  content: '';
  position: absolute;
  background-color: #64748b;
  transition: background-color 0.3s ease;
}

.faq-chevron::before {
  width: 12px;
  height: 2px;
  top: 9px;
  left: 4px;
}

.faq-chevron::after {
  width: 2px;
  height: 12px;
  top: 4px;
  left: 9px;
}

.faq-item[open] .faq-chevron {
  transform: rotate(45deg);
}

.faq-item[open] .faq-chevron::before,
.faq-item[open] .faq-chevron::after {
  background-color: var(--clr-primary);
}

.faq-answer {
  padding: 0 2rem 1.5rem;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.65;
  animation: faq-fade-in 0.3s ease-out;
}

.faq-answer p {
  margin-bottom: 0;
  color: #475569 !important;
}

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

@media (max-width: 480px) {
  .ba-column {
    padding: 1.5rem 1rem;
  }
  .ba-badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
  }
  .ba-row-icon {
    flex-shrink: 0;
  }
  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }
  .faq-answer {
    padding: 0 1.25rem 1rem;
    font-size: 0.88rem;
  }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE DESIGN (Antes vs Después & FAQ)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .ba-mobile-toggle {
    display: flex;
  }
  
  .ba-comparison {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  /* State hiding logic */
  .ba-comparison.show-before .ba-column--after {
    display: none;
  }
  .ba-comparison.show-after .ba-column--before {
    display: none;
  }
  
  /* Add slide animation to columns when toggled */
  .ba-column {
    animation: fade-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  
  @keyframes fade-slide-in {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
  }
  
  .ba-column {
    padding: 2rem 1.5rem;
  }
  
  .faq-question {
    padding: 1.25rem 1.5rem;
    font-size: 0.98rem;
  }
  
  .faq-answer {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.92rem;
  }
}

/* ────────────────────────────────────────────────────────────
   [3] ECOSISTEMA BENTO — MOBILE FIBER OPTIC PIPELINE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .ecosystem-pipeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 1rem 0 2rem;
    gap: 2.5rem;
  }
  
  /* Cable de fibra óptica base */
  .ecosystem-pipeline::before {
    content: '';
    position: absolute;
    top: 3rem;       /* Empieza dentro del primer botón */
    bottom: 3.5rem;  /* Termina justo dentro del último botón */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
  }
  
  /* Pulso de luz animado */
  .ecosystem-pipeline::after {
    content: '';
    position: absolute;
    top: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 80px;
    background: linear-gradient(180deg, transparent, #ff3355, #3b82f6, #0bf597, #8b5cf6, #06b6d4, transparent);
    border-radius: 4px;
    z-index: 1;
    animation: flowPulse 3s infinite linear;
    filter: drop-shadow(0 0 8px rgba(255, 51, 85, 0.8));
  }

  @keyframes flowPulse {
    0% { top: 3rem; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: calc(100% - 3.5rem - 80px); opacity: 0; } /* El pulso muere dentro del último botón */
  }

  .module-pill {
    position: relative;
    z-index: 2;
    width: 80%;
    max-width: 280px;
    justify-content: flex-start !important;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    padding: 1.2rem 1.5rem !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
    font-weight: 600;
    overflow: hidden;
  }
  
  .module-pill svg {
    color: var(--pill-color) !important;
    margin-right: 14px !important;
    width: 22px;
    height: 22px;
  }

  /* Borde brillante a la izquierda usando la variable inline */
  .module-pill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: var(--pill-color);
    box-shadow: 0 0 15px var(--pill-color);
  }

  .eco-connector {
    display: none !important;
  }
}

/* --- FAQ Expand Button Glow Style --- */
.btn-faq-glow {
  background: linear-gradient(135deg, #334155, #1e293b);
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 100px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(100, 116, 139, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  animation: faqBtnPulse 3s ease-in-out infinite;
}

.btn-faq-glow:before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.25) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.btn-faq-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(100, 116, 139, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.btn-faq-glow:hover:before {
  opacity: 1;
}

.btn-faq-glow svg {
  transition: transform 0.3s ease;
}

.btn-faq-glow.is-expanded svg {
  transform: rotate(180deg);
}

@keyframes faqBtnPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.35);
  }
  50% {
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.35), 0 0 0 10px rgba(100, 116, 139, 0);
  }
}


/* [PERF 2026-07-07] Movil/tablet: fuera el backdrop-filter de .tl-visual y .pipeline-stage.
   Quedaban fuera del kill-list <=1024px de styles-shared.css; en movil el fondo neural es
   ESTATICO, asi que re-desenfocarlo por frame no aporta nada. Escritorio intacto. */
@media (max-width: 1024px) {
  .tl-visual,
  .pipeline-stage {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
}
