/* =============================================================================
   UniControl IDAS - Producto insignia de UniControl Lab
   1) Bloque destacado dentro de la sección «UniControl Lab» de index.html
   2) Página de producto idas.html

   Se carga DESPUÉS de site.css y reutiliza sus tokens (:root), nav, footer,
   botones (.btn) y badges (.badge-clean).
   ============================================================================= */

:root {
  --idas-glow: 0 0 0 1px rgba(0, 198, 215, 0.35), 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* -----------------------------------------------------------------------------
   Piezas comunes
   ----------------------------------------------------------------------------- */
.idas-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.idas-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--scada-border);
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

.idas-chip-light { color: var(--text-title); background: var(--bg-subtle); border-color: var(--border-light); }

/* Ventana de aplicación que enmarca las capturas */
.idas-window {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--idas-glow);
}

.idas-window-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.8rem;
  background: #1e293b;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-light);
}

.idas-window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #475569; display: inline-block; }
.idas-window-bar i:first-child { background: #ef4444; }
.idas-window-bar i:nth-child(2) { background: #f59e0b; }
.idas-window-bar i:nth-child(3) { background: var(--led-run); }
.idas-window-bar span { margin-left: 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idas-window img { display: block; width: 100%; height: auto; }

/* Reservar demo: desplegable sin JavaScript */
.idas-booking { position: relative; }
.idas-booking > summary { list-style: none; cursor: pointer; }
.idas-booking > summary::-webkit-details-marker { display: none; }

.idas-booking-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.6rem);
  left: 0;
  width: min(340px, 86vw);
  background: #fff;
  color: var(--text-body);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1.1rem;
}

.idas-booking-panel p { font-size: 0.88rem; line-height: 1.55; margin: 0 0 0.9rem; color: var(--text-body); }
.idas-booking-panel strong { color: var(--text-title); }
.idas-booking-panel .btn { width: 100%; justify-content: flex-start; font-size: 0.9rem; padding: 0.75rem 1rem; }
.idas-booking-panel .btn + .btn { margin-top: 0.5rem; }

.btn-whatsapp { background: #16a34a; color: #fff; border: 1px solid #16a34a; }
.btn-whatsapp:hover { background: #15803d; border-color: #15803d; color: #fff; }

.btn-ghost-dark {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-ghost-dark:hover { border-color: var(--brand-cyan); color: var(--brand-cyan); }

.idas-cred {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-light);
}
.idas-cred b { color: #fff; font-weight: 600; }

.idas-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem; }

/* -----------------------------------------------------------------------------
   1) Bloque destacado en UniControl Lab (index.html)
   ----------------------------------------------------------------------------- */
.idas-showcase {
  position: relative;
  z-index: 3;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(0, 82, 204, 0.35) 0%, transparent 60%),
    linear-gradient(160deg, #0f1d3a 0%, var(--scada-surface) 55%);
  border: 1px solid rgba(0, 198, 215, 0.45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.75rem;
  align-items: center;
}

.idas-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #090e17;
  background: var(--brand-cyan);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.1rem;
}

.idas-showcase h3 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.1;
}
.idas-showcase h3 span { color: var(--brand-cyan); }

.idas-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-light);
  letter-spacing: 0.04em;
  margin-bottom: 1.1rem;
}

.idas-showcase-lead { font-size: 1.05rem; line-height: 1.7; color: #cbd5e1; margin-bottom: 1.5rem; }

.idas-points { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.85rem; }
.idas-points li { display: flex; gap: 0.8rem; align-items: flex-start; font-size: 0.93rem; line-height: 1.55; color: var(--text-light); }
.idas-points li b { color: #fff; font-weight: 600; }
.idas-points .ico {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--brand-cyan);
  background: rgba(0, 198, 215, 0.12);
}

.idas-showcase .idas-chips { margin-bottom: 1.75rem; }
.idas-showcase .idas-cred { margin-top: 0.9rem; }

.idas-visual { position: relative; }
.idas-visual .idas-window { transform: perspective(1400px) rotateY(-5deg) rotateX(2deg); transition: transform 0.5s ease; }
.idas-visual:hover .idas-window { transform: none; }

.idas-float {
  position: absolute;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(0, 198, 215, 0.45);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: 0.8rem;
  color: var(--text-light);
  backdrop-filter: blur(6px);
  max-width: 230px;
}
.idas-float b { display: block; color: #fff; font-size: 0.9rem; margin-bottom: 0.15rem; }
.idas-float-a { left: -1.5rem; bottom: -1.4rem; }
.idas-float-b { right: -1rem; top: -1.2rem; display: flex; align-items: center; gap: 0.6rem; }

.idas-showcase > *, .idas-hero-grid > *, .idas-row > *, .idas-cta-grid > * { min-width: 0; }
.idas-cred { overflow-wrap: anywhere; }

/* Pulso de Undertone: un latido que respira */
.idas-pulse { position: relative; display: inline-grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; }
.idas-pulse i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-cyan); box-shadow: 0 0 12px var(--brand-cyan); }
.idas-pulse::before, .idas-pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--brand-cyan); opacity: 0;
  animation: idas-pulse 3.2s ease-out infinite;
}
.idas-pulse::after { animation-delay: 1.6s; }
.idas-pulse-lg { width: 64px; height: 64px; }
.idas-pulse-lg i { width: 14px; height: 14px; }
@keyframes idas-pulse { 0% { transform: scale(0.35); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .idas-pulse::before, .idas-pulse::after { animation: none; opacity: 0.35; transform: scale(1); }
  .idas-visual .idas-window { transform: none; transition: none; }
}

/* Sub-encabezado «Herramientas del Lab» debajo del bloque */
.lab-more-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0.5rem 0 1.25rem;
}

/* -----------------------------------------------------------------------------
   2) Página de producto (idas.html)
   ----------------------------------------------------------------------------- */
.idas-hero {
  background:
    radial-gradient(70% 90% at 85% 0%, rgba(0, 82, 204, 0.4) 0%, transparent 60%),
    radial-gradient(50% 60% at 0% 100%, rgba(0, 198, 215, 0.12) 0%, transparent 70%),
    #090e17;
  color: var(--text-white);
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}

.idas-hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: center; }
.idas-hero .badge-clean { background: rgba(0, 198, 215, 0.1); border-color: rgba(0, 198, 215, 0.3); color: var(--brand-cyan); }

.idas-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #fff;
  margin: 1.1rem 0 0.5rem;
}
.idas-hero h1 span { color: var(--brand-cyan); }
.idas-hero .idas-sub { font-size: 0.85rem; margin-bottom: 1.4rem; }
.idas-hero-lead { font-size: 1.18rem; line-height: 1.65; color: #cbd5e1; margin-bottom: 2rem; }
.idas-hero .idas-cred { margin-top: 1rem; }

.idas-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--scada-border);
}
.idas-stats b { display: block; font-family: var(--font-mono); font-size: 1.6rem; color: #fff; }
.idas-stats span { font-size: 0.85rem; color: var(--text-light); }

.idas-section { padding: 5rem 0; }
.idas-section.alt { background: var(--bg-subtle); }

.idas-section-head { max-width: 720px; margin-bottom: 3rem; }
.idas-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.6rem;
  display: block;
}
.idas-section-head h2, .idas-row h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-title);
  margin-bottom: 0.8rem;
  line-height: 1.2;
}
.idas-section-head p { font-size: 1.08rem; line-height: 1.7; color: var(--text-body); }

/* Filas destacadas: texto + captura, alternadas */
.idas-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3.5rem; align-items: center; }
.idas-row + .idas-row { margin-top: 5rem; }
.idas-row.flip > :first-child { order: 2; }
.idas-row p { font-size: 1.04rem; line-height: 1.75; color: var(--text-body); margin-bottom: 1rem; }
.idas-row ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.idas-row li { position: relative; padding-left: 1.4rem; font-size: 0.95rem; line-height: 1.55; color: var(--text-body); }
.idas-row li::before { content: ''; position: absolute; left: 0; top: 0.5rem; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-cyan); }
.idas-row .idas-window { box-shadow: var(--shadow-lg); border: 1px solid var(--border-light); }
.idas-stack { display: grid; gap: 1.25rem; }

/* Undertone: tarjeta oscura con la escena de la sala de control */
.idas-undertone {
  margin: 0;
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(0, 198, 215, 0.16), transparent 65%),
    #090e17;
  color: var(--text-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1.6rem;
  box-shadow: var(--shadow-scada);
}
.idas-undertone blockquote {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 300;
  line-height: 1.5;
  color: #e2e8f0;
  letter-spacing: -0.01em;
}
.idas-undertone blockquote span { color: var(--brand-cyan); font-weight: 600; font-style: italic; }
.idas-undertone figcaption { font-size: 0.95rem; line-height: 1.65; max-width: 420px; color: var(--text-light); }
.idas-undertone .idas-chips { justify-content: center; }

/* Grilla de funciones */
.idas-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.idas-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.idas-card:hover { border-color: var(--brand-cyan); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.idas-card .ico {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--brand-blue-soft);
  color: var(--brand-blue);
  margin-bottom: 1rem;
}
.idas-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-title); margin-bottom: 0.4rem; }
.idas-card p { font-size: 0.92rem; line-height: 1.6; color: var(--text-body); margin: 0; }

/* Instalación */
.idas-install { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.idas-install .idas-card { border-top: 3px solid var(--brand-blue); }

/* Nota para ingeniería (debajo de Undertone) */
.idas-eng-note {
  margin: 3rem 0 0;
  padding: 2rem 2.25rem;
  border-radius: var(--radius-lg);
  background: #0f172a;
  border: 1px solid rgba(0, 198, 215, 0.3);
  border-left: 4px solid var(--brand-cyan);
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}
.idas-eng-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.8rem; }
.idas-eng-head code { font-family: var(--font-mono); font-size: 0.82rem; color: var(--brand-cyan); letter-spacing: 0.02em; }
.idas-eng-note h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; color: #fff; letter-spacing: -0.015em; margin-bottom: 0.9rem; }
.idas-eng-note p { font-size: 1rem; line-height: 1.75; color: #cbd5e1; margin: 0 0 0.8rem; max-width: 900px; }
.idas-eng-note p:last-child { margin-bottom: 0; }

/* Matemática determinista */
.idas-math {
  padding: 5rem 0;
  background:
    radial-gradient(60% 80% at 0% 0%, rgba(0, 198, 215, 0.12), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgba(0, 82, 204, 0.3), transparent 60%),
    #090e17;
  color: var(--text-light);
}
.idas-math .idas-kicker { color: var(--brand-cyan); }
.idas-math .idas-section-head h2 { color: #fff; }
.idas-math .idas-section-head p { color: #cbd5e1; }
.idas-math-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.idas-math-card {
  background: var(--scada-surface);
  border: 1px solid var(--scada-border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: var(--transition);
}
.idas-math-card:hover { border-color: var(--scada-border-active); transform: translateY(-2px); }
.idas-math-card .ico {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--brand-cyan-soft); color: var(--brand-cyan);
  margin-bottom: 1rem;
}
.idas-math-card h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.idas-math-card p { font-size: 0.92rem; line-height: 1.6; color: var(--text-light); margin: 0; }
.idas-math-note {
  display: flex; gap: 0.8rem; align-items: flex-start;
  margin: 2rem 0 0; padding: 1.1rem 1.3rem;
  border: 1px dashed rgba(0, 198, 215, 0.35); border-radius: var(--radius-md);
  font-size: 0.98rem; line-height: 1.6; color: #cbd5e1;
}
.idas-math-note i, .idas-math-note svg { color: var(--brand-cyan); flex-shrink: 0; margin-top: 0.15rem; }

/* Módulos a medida */
.idas-custom {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-blue-soft), var(--brand-cyan-soft));
  border: 1px solid var(--border-light);
}
.idas-custom h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -0.02em; color: var(--text-title); margin-bottom: 0.8rem; line-height: 1.2; }
.idas-custom p { font-size: 1.04rem; line-height: 1.75; color: var(--text-body); margin-bottom: 1.5rem; }
.idas-custom-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.idas-custom-list li {
  display: flex; align-items: center; gap: 0.9rem;
  background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem; font-size: 0.95rem; color: var(--text-body); box-shadow: var(--shadow-sm);
}
.idas-custom-list li i, .idas-custom-list li svg { color: var(--brand-blue); flex-shrink: 0; }

/* Llamado final */
.idas-cta {
  background:
    radial-gradient(60% 100% at 100% 0%, rgba(0, 82, 204, 0.4), transparent 60%),
    #090e17;
  color: var(--text-light);
  padding: 4.5rem 0;
}
.idas-cta-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; align-items: center; }
.idas-cta h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: #fff; letter-spacing: -0.02em; margin-bottom: 0.8rem; }
.idas-cta p { font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.5rem; }
.idas-demo-box {
  background: var(--scada-surface);
  border: 1px solid rgba(0, 198, 215, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.idas-demo-box h3 { color: #fff; font-size: 1.1rem; margin-bottom: 0.4rem; }
.idas-demo-box p { font-size: 0.9rem; margin-bottom: 1rem; }
.idas-demo-box dl { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; font-family: var(--font-mono); font-size: 0.85rem; margin: 0 0 1.25rem; }
.idas-demo-box dt { color: var(--text-muted); }
.idas-demo-box dd { margin: 0; color: #fff; word-break: break-all; }

/* -----------------------------------------------------------------------------
   Responsivo
   ----------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .idas-showcase, .idas-hero-grid, .idas-row, .idas-cta-grid, .idas-custom { grid-template-columns: minmax(0, 1fr); }
  .idas-row.flip > :first-child { order: 0; }
  .idas-grid, .idas-install, .idas-math-grid { grid-template-columns: repeat(2, 1fr); }
  .idas-visual { margin-top: 1rem; }
}

@media (max-width: 768px) {
  .idas-showcase { padding: 1.5rem; gap: 2rem; }
  .idas-visual .idas-window { transform: none; }
  .idas-float-a { display: none; }
  .idas-float-b { right: 0.5rem; }
  .idas-actions > * { flex: 1 1 100%; }
  .idas-actions .btn, .idas-booking > summary.btn { width: 100%; }
  .idas-booking-panel { position: static; width: auto; margin-top: 0.6rem; }
  .idas-hero { padding: 3rem 0 3.5rem; }
  .idas-stats { grid-template-columns: repeat(2, 1fr); }
  .idas-section { padding: 3.5rem 0; }
  .idas-grid, .idas-install, .idas-math-grid { grid-template-columns: 1fr; }
  .idas-math { padding: 3.5rem 0; }
  .idas-eng-note { padding: 1.5rem 1.25rem; }
  .idas-undertone { padding: 2rem 1.25rem; }
  .idas-custom { padding: 1.5rem; gap: 1.75rem; }
}
