/* =========================================================
   ioMaq — réplica de la plataforma (iomaq.mjs)
   Menú lateral claro con íconos de color, acento amarillo, cifras en Inter con números tabulares.
   ========================================================= */
.iq {
  --iq-y: #fbbf24; --iq-y2: #f59e0b; --iq-ink: #111827; --iq-mute: #6b7280; --iq-line: #eef0f4;
  display: flex; width: 100%; min-height: 520px; overflow: hidden; border-radius: 20px; background: #f6f7fb;
  border: 1px solid rgba(17, 19, 22, .08); box-shadow: 0 40px 80px -48px rgba(17, 19, 22, .4);
  color: var(--iq-ink); font-size: 13px; text-align: left; container: iq / inline-size;
}
.iq svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iq-side { flex: none; width: 170px; padding: 16px 10px; background: #fff; border-right: 1px solid var(--iq-line); }
.iq-logo { padding: 2px 8px 14px; }
.iq-logo img { height: 22px; width: auto; }
.iq-side ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.iq-side li { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; color: #374151; }
.iq-side li svg { flex: none; width: 15px; height: 15px; color: var(--c); }
.iq-side li.is-on { background: var(--iq-y); color: #111827; font-weight: 600; box-shadow: 0 6px 14px -8px rgba(245, 158, 11, .8); }
.iq-side li.is-on svg { color: #111827; }
.iq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 18px; }
.iq-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.iq-crumb { font-size: 11.5px; color: var(--iq-mute); }
.iq-crumb i { font-style: normal; margin: 0 4px; }
.iq-crumb b { padding: 3px 8px; border-radius: 99px; background: #fff3d6; color: #b45309; font-weight: 600; }
.iq-user { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; }
.iq-user em { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--iq-y); font-style: normal; font-size: 10.5px; }

.iq-hello { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-radius: 16px; background: #fff;
  background-image: radial-gradient(120% 140% at 85% 0%, #fff1d6 0%, transparent 55%); border: 1px solid var(--iq-line); border-bottom: 3px solid var(--iq-y); }
.iq-hello p { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #d97706; }
.iq-hello .iq-h4 { display: block; font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; }
.iq-hello > div > small { color: var(--iq-mute); font-size: 11.5px; }
.iq-hello ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.iq-hello li { min-width: 74px; padding: 8px 10px; border-radius: 12px; background: #f3f4f6; text-align: center; }
.iq-hello li b { display: block; font: 700 17px/1.1 "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.iq-hello li small { font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--iq-mute); }
.iq-hello li.is-bad { background: #fde8e8; color: #dc2626; border: 1px solid #fca5a5; }

.iq-head { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--iq-line); border-left: 4px solid var(--c); }
.iq-head__ic, .iq-kpi__ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.iq-head__ic svg, .iq-kpi__ic svg { width: 18px; height: 18px; }
.iq-head .iq-h4 { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.iq-head small { font-size: 11.5px; color: var(--iq-mute); }
.iq-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.iq-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 600; white-space: nowrap; background: #f3f4f6; color: #374151; }
.iq-chip--ok { background: #dcfce7; color: #15803d; }
.iq-chip--warn { background: #fef3c7; color: #b45309; }
.iq-chip--bad { background: #fee2e2; color: #dc2626; }

.iq-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.iq-kpi { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--iq-line); }
.iq-kpi > div { min-width: 0; }
.iq-kpi small { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--iq-mute); }
.iq-kpi b { display: block; margin-top: 2px; font: 700 17px/1.15 "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.iq-kpi p { margin-top: 3px; font-size: 10.5px; color: var(--iq-mute); }
.iq-badge { display: inline-block; margin-top: 5px; padding: 2px 7px; border-radius: 99px; background: #fee2e2; color: #dc2626; font-size: 10px; font-weight: 600; }

.iq-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.iq-split--obras { grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); align-items: start; }
.iq-split--obras .iq-grid4--tight { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 10px; }
.iq-card { padding: 13px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--iq-line); min-width: 0; }
.iq-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.iq-card__head b { font-size: 12.5px; font-weight: 700; }
.iq-card__head small { font-size: 10.5px; color: var(--iq-mute); }

.iq-stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: #f3f4f6; }
.iq-stack i { width: var(--w); background: var(--c); transform-origin: left; animation: iq-grow 1s ease-out both; }
.iq-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--iq-mute); }
.iq-legend li { display: flex; align-items: center; gap: 6px; }
.iq-legend span { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.iq-legend b { color: var(--iq-ink); }

.iq-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.iq-alerts li { padding: 9px 11px; border-radius: 11px; border-left: 3px solid; animation: iq-in .5s ease-out both; animation-delay: calc(var(--i) * .1s); }
.iq-alerts li.is-bad { background: #fef2f2; border-color: #ef4444; }
.iq-alerts li.is-warn { background: #fffbeb; border-color: #f59e0b; }
.iq-alerts li.is-ok { background: #f0fdf4; border-color: #22c55e; }
.iq-alerts b { display: block; font-size: 11.5px; }
.iq-alerts small { font-size: 10.5px; color: var(--iq-mute); }

.iq-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 128px; }
.iq-bars div { display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.iq-bars span { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.iq-bars i { width: 38%; height: var(--h); border-radius: 5px 5px 2px 2px; background: #f97316; transform-origin: bottom; animation: iq-up .9s ease-out both; animation-delay: calc(var(--i) * .07s); }
.iq-bars i.is-g { background: #0ea5e9; }
.iq-bars small { font-size: 10px; color: var(--iq-mute); }

.iq-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.iq-rows li { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 11.5px; }
.iq-rows b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-rows em { font: 600 11px "Inter", system-ui, sans-serif; font-variant-numeric: tabular-nums; font-style: normal; color: #374151; }
.iq-meter { height: 7px; border-radius: 99px; background: #f3f4f6; overflow: hidden; }
.iq-meter i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: #22c55e; transform-origin: left; animation: iq-grow 1s ease-out both; }
.iq-meter.is-bad i { background: #ef4444; }
.iq-meter--blue i { background: #0284c7; }

.iq-pm { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.iq-pm li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 11px; background: #fafafa; border: 1px solid var(--iq-line); animation: iq-in .5s ease-out both; animation-delay: calc(var(--i) * .08s); }
.iq-pm li.is-bad { background: #fef2f2; border-color: #fecaca; }
.iq-pm b { display: block; font-size: 11.5px; }
.iq-pm small { font-size: 10.5px; color: var(--iq-mute); }

.iq-list { list-style: none; margin: 0; padding: 8px; display: flex; flex-direction: column; gap: 6px; border-radius: 14px; background: #fff; border: 1px solid var(--iq-line); }
.iq-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 10px; }
.iq-list li.is-on { background: #fff8e6; box-shadow: inset 3px 0 0 var(--iq-y2); }
.iq-list b { display: block; font-size: 11.5px; }
.iq-list small { font-size: 10px; color: var(--iq-mute); }

.iq-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.iq-table th { padding: 6px 8px; text-align: left; font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--iq-mute); border-bottom: 1px solid var(--iq-line); }
.iq-table td { padding: 8px; border-bottom: 1px solid var(--iq-line); white-space: nowrap; }
.iq-table tr:last-child td { border-bottom: 0; }

@keyframes iq-grow { from { transform: scaleX(0); } }
@keyframes iq-up { from { transform: scaleY(0); } }
@keyframes iq-in { from { opacity: 0; translate: 0 6px; } }

/* Ventana angosta (tarjetas, banners, móviles): menú solo con íconos y rejillas a 2 columnas */
@container iq (max-width: 600px) {
  .iq-side { width: 54px; padding: 14px 8px; }
  .iq-logo img { height: 16px; }
  .iq-side li span { display: none; }
  .iq-side li { justify-content: center; padding: 8px; }
  .iq-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iq-split, .iq-split--obras { grid-template-columns: 1fr; }
  .iq-hello { flex-direction: column; align-items: flex-start; }
  .iq-user { display: none; }
}
@container iq (max-width: 480px) { .iq-side { display: none; } .iq-hello ul { flex-wrap: wrap; } }

/* Vitrina de la página de producto */
.iq-show { margin-top: 40px; }
.iq-show__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.iq-show__tabs button { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; border: 1px solid rgba(17, 19, 22, .12); background: #fff; font: inherit; font-size: 14px; font-weight: 500; color: #374151; cursor: pointer; }
.iq-show__tabs button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.iq-show__tabs button:hover { border-color: rgba(17, 19, 22, .3); }
.iq-show__tabs button[aria-selected="true"] { background: #fbbf24; border-color: #fbbf24; color: #111827; font-weight: 600; }
.iq-show__tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(17, 24, 39, .35); transform-origin: 0 50%; animation: iq-timer 7s linear both; }
.iq-show.is-paused .iq-show__tabs button::after { content: none; }
.iq-show__tabs button:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
@keyframes iq-timer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (max-width: 760px) { .iq-show__tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .iq-show__tabs button { flex: none; } }
@media (prefers-reduced-motion: reduce) { .iq *, .iq-show__tabs button::after { animation: none !important; } }

/* Dónde aparece la ventana: banner del producto, Productos, Construcción y Maquinaria pesada */
.pp-hero__stage--iq { padding: 22px; place-items: stretch; background: linear-gradient(160deg, #fbbf24 0%, #f59e0b 100%); }
.pp-hero__stage--iq .pm { display: block; width: 100%; }
.pp-hero__stage--iq .iq { min-height: 540px; }
.pm-media--iomaq { background: linear-gradient(160deg, #fbbf24 0%, #f59e0b 100%); }
.pm-media--iomaq .iq { min-height: 0; }
.bigprod__mock--iq { padding: 22px; }
.bigprod__mock--iq .iq { min-height: 0; height: 100%; }
.phub__iq, .pdeck__screen .phub__iq { width: 1120px; }
.phub__iq .iq { min-height: 480px; box-shadow: none; }
@media (max-width: 1024px) { .pp-hero__stage--iq { padding: 12px; } .pp-hero__stage--iq .iq { min-height: 460px; } }
/* Logotipo: completo en la ventana amplia; en el menú angosto, un sello "iQ" (el logotipo no cabe sin deformarse) */
.iq-logo img { display: block; height: 22px; width: auto; max-width: none; object-fit: contain; }
.iq-mark { display: none; place-items: center; width: 34px; height: 34px; margin: 0 auto; border-radius: 10px; background: #fbbf24; color: #111827; font: 800 15px/1 Inter, system-ui, sans-serif; letter-spacing: -.04em; }
@container iq (max-width: 600px) {
  .iq-logo { padding: 0 0 12px; }
  .iq-logo img { display: none; }
  .iq-mark { display: grid; }
}
/* Logotipo siempre completo: en la versión compacta pasa a la barra superior (nunca el sello "iQ") */
.iq-mark { display: none !important; }
.iq-top__logo { display: none; height: 18px; width: auto; max-width: none; }
@container iq (max-width: 600px) {
  .iq-logo { display: none; }
  .iq-top__logo { display: block; }
  .iq-top { justify-content: flex-start; gap: 12px; }
  .iq-side { padding-top: 16px; }
}
/* En Productos y en Nosotros, ioMaq llena toda la tarjeta igual que Norux (sin reducirse) */
.phub__iq, .pdeck__screen .phub__iq { position: absolute; inset: 0; width: auto; }
.phub__iq > .iq, .pdeck__screen .phub__iq > .iq { height: 100%; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }

/* ---------- Tipografía oficial del sitio y cifras que siempre caben ----------
   El área de contenido es su propio contenedor: las tarjetas de cifras se acomodan según el ancho
   real del tablero (en Productos, Nosotros o el banner), no según la pantalla. */
.iq, .iq :is(b, small, p, h4, strong, em, span, li) { font-family: "Inter", system-ui, sans-serif; }
.iq-main { container: iqm / inline-size; }
.iq-kpi small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iq-kpi p { overflow-wrap: anywhere; }
.iq-hello li b { font-variant-numeric: tabular-nums; }
@container iqm (max-width: 760px) {
  /* Cifras: ícono arriba y número a todo el ancho de la tarjeta */
  .iq-grid4:not(.iq-grid4--tight) .iq-kpi { flex-direction: column; gap: 8px; }
  .iq-kpi__ic { width: 30px; height: 30px; border-radius: 9px; }
  .iq-kpi b { font-size: 16px; }
  /* Saludo: título arriba y sus cuatro cifras en una fila parejo */
  .iq-hello { flex-direction: column; align-items: stretch; }
  .iq-hello ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .iq-hello li { min-width: 0; padding: 8px 6px; }
  .iq-hello li small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .03em; }
}
@container iqm (max-width: 420px) {
  .iq-hello ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iq-kpi b { font-size: 15px; }
}
