/**
 * landing/assets/css/sistemas-a-medida.css
 * Estilos específicos para la landing: Sistemas a Medida y Modernización Legacy
 * Troop Software Factory
 */

:root {
  --sam-primary: var(--troop-primary, #00bf80);
  --sam-primary-hover: #00a86b;
  --sam-dark-bg: var(--troop-dark-bg, #0b1120);
  --sam-dark-card: rgba(15, 23, 42, 0.75);
  --sam-dark-card-border: rgba(255, 255, 255, 0.08);
  --sam-dark-card-hover: rgba(0, 191, 128, 0.25);
  --sam-light-bg: #f8fafc;
  --sam-light-card: #ffffff;
  --sam-light-border: #e2e8f0;
  --sam-text-muted-dark: #94a3b8;
  --sam-text-body-dark: #cbd5e1;
  --sam-text-dark: #0f172a;
}

/* ==========================================================================
   TIPOGRAFÍA Y CONTRASTE BASE
   ========================================================================== */

body.landing-sistemas-a-medida {
  font-family: var(--troop-font-body, system-ui, -apple-system, sans-serif) !important;
  background-color: var(--sam-dark-bg) !important;
  color: var(--sam-text-body-dark);
}

.landing-sistemas-a-medida h1,
.landing-sistemas-a-medida h2,
.landing-sistemas-a-medida h3,
.landing-sistemas-a-medida h4,
.landing-sistemas-a-medida h5 {
  font-family: var(--troop-font-heading, inherit) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Secciones Oscuras */
.sam-section-dark {
  background-color: var(--sam-dark-bg);
  color: var(--sam-text-body-dark);
  position: relative;
}

.sam-section-dark h1,
.sam-section-dark h2,
.sam-section-dark h3 {
  color: #ffffff !important;
}

.sam-section-dark .section-lead {
  color: #94a3b8;
}

/* Secciones Claras */
.sam-section-light {
  background-color: var(--sam-light-bg);
  color: #334155;
  position: relative;
}

.sam-section-light h2,
.sam-section-light h3,
.sam-section-light h4 {
  color: var(--sam-text-dark) !important;
}

.sam-section-light .section-lead {
  color: #64748b;
}

/* Badges */
.sam-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 191, 128, 0.12);
  border: 1px solid rgba(0, 191, 128, 0.35);
  color: var(--sam-primary);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sam-badge-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 191, 128, 0.1);
  border: 1px solid rgba(0, 191, 128, 0.3);
  color: #00875a;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-sam {
  padding: 160px 0 70px;
  position: relative;
  overflow: hidden;
}

.hero-sam::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 191, 128, 0.08) 0%, rgba(11, 17, 32, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* Fondo animado vectorial tecnológico */
.hero-sam-circuits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  mask-image: radial-gradient(ellipse 80% 75% at 50% 40%, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.8) 55%, #000 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 40%, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.8) 55%, #000 100%);
}

.hero-sam-circuits svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sam-circuits-desktop {
  display: block;
}

.sam-circuits-mobile {
  display: none;
}

@media (max-width: 768px) {
  .sam-circuits-desktop {
    display: none;
  }
  .sam-circuits-mobile {
    display: block;
  }
}

.sam-circuit-base {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 1.25;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sam-circuit-node-base {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.sam-circuit-chip {
  fill: rgba(255, 255, 255, 0.02);
  stroke: rgba(0, 191, 128, 0.25);
  stroke-width: 1;
}

.sam-circuit-pulse {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 140 1000;
  stroke-dashoffset: 1140;
  opacity: 0;
  will-change: stroke-dashoffset, opacity;
}

.sam-pulse-green {
  stroke: #00bf80;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 4px rgba(0, 191, 128, 0.8));
}

.sam-pulse-blue {
  stroke: #00e5ff;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 4px rgba(0, 229, 255, 0.8));
}

.sam-pulse-anim-1 { animation: samPulseTravel 3.2s cubic-bezier(0.25, 1, 0.5, 1) -0.8s infinite; }
.sam-pulse-anim-2 { animation: samPulseTravel 3.6s cubic-bezier(0.25, 1, 0.5, 1) -2.0s infinite; }
.sam-pulse-anim-3 { animation: samPulseTravel 3.8s cubic-bezier(0.25, 1, 0.5, 1) -1.2s infinite; }
.sam-pulse-anim-4 { animation: samPulseTravel 3.4s cubic-bezier(0.25, 1, 0.5, 1) -2.5s infinite; }
.sam-pulse-anim-5 { animation: samPulseTravel 3.1s cubic-bezier(0.25, 1, 0.5, 1) -0.4s infinite; }
.sam-pulse-anim-6 { animation: samPulseTravel 3.7s cubic-bezier(0.25, 1, 0.5, 1) -1.7s infinite; }
.sam-pulse-anim-7 { animation: samPulseTravel 3.9s cubic-bezier(0.25, 1, 0.5, 1) -2.9s infinite; }
.sam-pulse-anim-8 { animation: samPulseTravel 3.3s cubic-bezier(0.25, 1, 0.5, 1) -1.0s infinite; }

.sam-node-pulse-1 {
  animation: samNodePulse 2.8s ease-in-out -0.5s infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.sam-node-pulse-2 {
  animation: samNodePulse 3.2s ease-in-out -1.2s infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.sam-node-pulse-3 {
  animation: samNodePulse 3.0s ease-in-out -2.0s infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes samNodePulse {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.4); }
}

@keyframes samPulseTravel {
  0% {
    stroke-dashoffset: 1140;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -140;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sam-circuit-pulse,
  .sam-node-pulse-1,
  .sam-node-pulse-2,
  .sam-node-pulse-3 {
    animation: none !important;
  }
}

.hero-sam .container {
  position: relative;
  z-index: 1;
}

.hero-sam h1 {
  font-size: 2.85rem;
  line-height: 1.15;
  color: #ffffff;
  margin-top: 1rem;
}

.hero-sam .hero-lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: 860px;
  margin: 1.25rem auto 2rem;
}

.hero-sam-bullets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.hero-sam-bullets li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #e2e8f0;
}

.hero-sam-bullets li svg {
  color: var(--sam-primary);
  font-size: 1.15rem;
}

/* Mini KPI banner */
.hero-stats-bar {
  margin-top: 3.5rem;
  padding: 1.5rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--sam-dark-card-border);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.hero-stat-item {
  text-align: center;
}

.hero-stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--sam-primary);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   DIAGNÓSTICO: DOLORES DEL ICP (Dark)
   ========================================================================== */

.card-pain {
  background: var(--sam-dark-card);
  border: 1px solid var(--sam-dark-card-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-pain:hover {
  transform: translateY(-4px);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.card-pain .icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 1.25rem;
}

.card-pain h3 {
  font-size: 1.25rem;
  color: #ffffff !important;
  margin-bottom: 0.75rem;
}

.card-pain p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ==========================================================================
   CATÁLOGO DE MÓDULOS Y SOLUCIONES (Light)
   ========================================================================== */

.card-module {
  background: var(--sam-light-card);
  border: 1px solid var(--sam-light-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.card-module:hover {
  transform: translateY(-4px);
  border-color: var(--sam-primary);
  box-shadow: 0 12px 24px rgba(0, 191, 128, 0.12);
}

.card-module .icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(0, 191, 128, 0.1);
  color: #00875a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 1.25rem;
}

.card-module h3 {
  font-size: 1.25rem;
  color: var(--sam-text-dark) !important;
  margin-bottom: 0.75rem;
}

.card-module p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ==========================================================================
   METODOLOGÍA: PATRÓN STRANGLER FIG & CAJA ABIERTA (Dark)
   ========================================================================== */

.timeline-step {
  position: relative;
  background: var(--sam-dark-card);
  border: 1px solid var(--sam-dark-card-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.timeline-step:hover {
  transform: translateY(-4px);
  border-color: var(--sam-dark-card-hover);
}

.timeline-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 191, 128, 0.15);
  border: 1px solid rgba(0, 191, 128, 0.4);
  color: var(--sam-primary);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.timeline-step h3 {
  font-size: 1.25rem;
  color: #ffffff !important;
  margin-bottom: 0.75rem;
}

.timeline-step p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Enfoque Caja Abierta box */
.caja-abierta-box {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.6) 100%);
  border: 1px solid rgba(0, 191, 128, 0.3);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  margin-top: 3.5rem;
}

.caja-abierta-box h3 {
  color: #ffffff !important;
  font-size: 1.65rem;
}

/* ==========================================================================
   MODALIDADES DE CONTRATACIÓN & SOBERANÍA (Dark)
   ========================================================================== */

.card-modality {
  background: var(--sam-dark-card);
  border: 1px solid var(--sam-dark-card-border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card-modality:hover {
  transform: translateY(-4px);
  border-color: var(--sam-primary);
}

.card-modality h3 {
  font-size: 1.25rem;
  color: #ffffff !important;
  margin-bottom: 0.75rem;
}

.card-modality p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
}

.card-modality-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--sam-primary);
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* Bloque Soberanía / Garantías */
.soberania-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--sam-dark-card-border);
  border-radius: 16px;
  padding: 2rem;
  height: 100%;
}

.soberania-card h3 {
  color: #ffffff !important;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.soberania-card p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* ==========================================================================
   FAQ ACCORDION (Light)
   ========================================================================== */

.faq-sam-item {
  background: var(--sam-light-card);
  border: 1px solid var(--sam-light-border);
  border-radius: 14px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-sam-item:hover {
  border-color: #cbd5e1;
}

.faq-sam-item.is-open {
  border-color: var(--sam-primary);
  box-shadow: 0 4px 14px rgba(0, 191, 128, 0.08);
}

.faq-sam-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.35rem 1.5rem;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sam-text-dark);
  text-align: left;
  cursor: pointer;
}

.faq-sam-btn:hover {
  color: #00875a;
}

.faq-sam-btn svg {
  transition: transform 0.3s ease;
  font-size: 1.25rem;
  color: #64748b;
  flex-shrink: 0;
}

.faq-sam-item.is-open .faq-sam-btn svg {
  transform: rotate(180deg);
  color: var(--sam-primary);
}

.faq-sam-content {
  display: none;
  padding: 0 1.5rem 1.5rem;
  color: #475569;
  font-size: 1rem;
  line-height: 1.7;
}

.faq-sam-item.is-open .faq-sam-content {
  display: block;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.sam-contact-section {
  padding: 80px 0;
  background-color: var(--sam-dark-bg);
}

.sam-contact-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--sam-dark-card-border);
  border-radius: 20px;
  padding: 2.5rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-sam {
    padding: 120px 0 50px;
  }
  .hero-sam h1 {
    font-size: 2.3rem;
  }
  .hero-sam .hero-lead {
    font-size: 1.05rem;
  }
  .hero-stat-number {
    font-size: 1.85rem;
  }
}

@media (max-width: 575.98px) {
  .hero-sam {
    padding: 120px 0 40px;
  }
  .hero-sam h1 {
    font-size: 1.85rem;
  }
  .hero-sam-bullets {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  .hero-stats-bar .row > div {
    margin-bottom: 1.25rem;
  }
  .hero-stats-bar .row > div:last-child {
    margin-bottom: 0;
  }
}
