/*
 * KINT · Landings de producto (relojes checadores, biométricos, metas cumplidas).
 * Capa sobre css/landing.css que homologa estas páginas con el sistema de RH Power
 * (css/rh-power.css): mismos tokens, encabezados alineados a la izquierda, secciones
 * abiertas separadas por una línea fina y tarjetas planas. Solo aplica con body.kl-product,
 * así que no afecta al home ni a las landings de RH Power.
 */

.kl-product {
  --kl-navy: #002b49;
  --kl-ink: #0b1b2b;
  --kl-muted: #51657a;
  --kl-cyan: #00b2e2;
  --kl-cyan-ink: #007a9c; /* cian con contraste suficiente para texto pequeño sobre blanco */
  --kl-yellow: #ffd700;
  --kl-bg: #ffffff;
  --kl-surface: #f3f8fb;
  --kl-card: #ffffff;
  --kl-line: #dbe7ef;
  --kl-block: clamp(2.75rem, 6vw, 4.75rem);
}

html.dark .kl-product {
  --kl-navy: #e7f0f6;
  --kl-ink: #e7f0f6;
  --kl-muted: #9fb3c4;
  --kl-cyan-ink: #00b2e2;
  --kl-bg: #07131f;
  --kl-surface: #0b1b2b;
  --kl-card: #0f2336;
  --kl-line: #1d3850;
}

/* Fondo plano, como RH Power (sin los degradados radiales de landing.css). */
body.kl-product,
html.dark body.kl-product {
  background: var(--kl-bg);
  color: var(--kl-ink);
}

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */
body.kl-product > section:first-of-type {
  background: var(--kl-bg);
  border-bottom: 1px solid var(--kl-line);
  padding-block: 0;
}
body.kl-product > section:first-of-type::before {
  display: none;
}

/* Franja superior: nombre del producto y bajada en una línea discreta (el H1 es el del hero). */
body.kl-product > section:first-of-type > .container:first-child {
  max-width: 64rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  padding-top: clamp(1.25rem, 3vw, 2rem);
  text-align: left;
}
body.kl-product > section:first-of-type > .container:first-child > :is(h1, p) {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: none;
}
body.kl-product > section:first-of-type > .container:first-child > :first-child {
  font-weight: 700;
  color: var(--kl-navy);
}
body.kl-product > section:first-of-type > .container:first-child > p:not(:first-child) {
  color: var(--kl-muted);
}

/* Bloque video + texto: sin la tarjeta de vidrio, el hero es la página. */
body.kl-product > section:first-of-type .container.max-w-5xl,
html.dark body.kl-product > section:first-of-type .container.max-w-5xl {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

/* En reloj-checador-biometrico el H1 (con la palabra clave) está en la franja y el hero usa H2. */
body.kl-product > section:first-of-type .container.max-w-5xl :is(h1, h2) {
  font-size: clamp(2.35rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--kl-navy);
  text-wrap: balance;
}
body.kl-product h1 .text-kint-primary {
  color: inherit;
}

/* Etiqueta sobre el H1: sin mayúsculas forzadas. */
body.kl-product > section:first-of-type span.uppercase {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--kl-cyan-ink);
}

body.kl-product > section:first-of-type p.text-lg {
  color: var(--kl-muted);
  max-width: 34rem;
}
body.kl-product > section:first-of-type ul {
  max-width: 34rem;
}

/* El video vertical no ocupa toda la pantalla del celular. */
body.kl-product [data-video-page] {
  max-width: min(100%, 22rem);
  margin-inline: auto;
}
@media (min-width: 768px) {
  body.kl-product [data-video-page] {
    margin-inline: 0;
  }
}

/* Sello de la Ley Federal: debajo del precio, sin encimarse (base.css lo sube con margen negativo). */
body.kl-product .law-badge {
  margin-top: 1.5rem;
  margin-left: 0.5rem;
}

/* ------------------------------------------------------------------ *
 * Botones: primario amarillo y secundario con contorno, como RH Power
 * ------------------------------------------------------------------ */
body.kl-product a.inline-flex.bg-kint-primary {
  background: var(--kl-yellow);
  color: #002b49;
  border-radius: 0.75rem !important;
  box-shadow: none;
}
body.kl-product a.inline-flex.bg-kint-primary:hover {
  background: #f5cc00;
  transform: none;
}
body.kl-product a.inline-flex.bg-gray-900 {
  background: transparent;
  color: var(--kl-navy);
  border: 2px solid currentColor;
  border-radius: 0.75rem !important;
  box-shadow: none;
}
body.kl-product a.inline-flex.bg-gray-900:hover {
  background: var(--kl-surface);
  opacity: 1;
}
body.kl-product a.inline-flex:focus-visible {
  outline: 3px solid var(--kl-cyan);
  outline-offset: 3px;
}

/* "Volver al inicio" es navegación, no una llamada a la acción. */
body.kl-product a[href$="index.html"].bg-kint-primary {
  background: transparent;
  color: var(--kl-cyan-ink);
  padding-inline: 0;
}
body.kl-product a[href$="index.html"].bg-kint-primary:hover {
  background: transparent;
  text-decoration: underline;
}

/* ------------------------------------------------------------------ *
 * Secciones: abiertas, separadas por una línea fina
 * ------------------------------------------------------------------ */
body.kl-product main.container.mx-auto {
  margin-top: 0;
  padding-top: 0;
}
body.kl-product main.container.mx-auto > .max-w-6xl {
  max-width: 72rem;
}

body.kl-product main section,
body.kl-product main section.text-center.section-anchor,
html.dark body.kl-product main section,
html.dark body.kl-product main section.text-center.section-anchor {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: var(--kl-block) 0 !important;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--kl-line);
  border-radius: 0;
  box-shadow: none;
}
body.kl-product main section:first-child,
body.kl-product main section section {
  border-top: 0;
}
body.kl-product main section section {
  padding-block: 0 !important;
}

/* Bloque KIS-TA: panel en tono superficie, sin sombra. */
body.kl-product main section.rounded-2xl.shadow-lg,
html.dark body.kl-product main section.rounded-2xl.shadow-lg {
  background: var(--kl-surface);
  border-top: 0;
  border-radius: 1.5rem;
  margin-block: var(--kl-block) !important;
  padding-inline: clamp(0.25rem, 2vw, 1.5rem) !important;
}
body.kl-product main section.rounded-2xl.shadow-lg + section {
  border-top: 0;
}
body.kl-product main section.rounded-2xl.shadow-lg + section.rounded-2xl.shadow-lg {
  margin-top: calc(var(--kl-block) * -0.5) !important;
}

/* Encabezados de sección: una sola escala, alineados a la izquierda. */
body.kl-product main h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--kl-navy);
  text-align: left;
  max-width: 32ch;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
body.kl-product main h2 span.text-kint-primary {
  color: inherit;
}
body.kl-product main .text-center.mb-12 {
  text-align: left;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
body.kl-product main .text-center.mb-12 h2 {
  margin-bottom: 0.5rem;
}
body.kl-product main .text-center.mb-12 p {
  color: var(--kl-muted);
  max-width: 60ch;
}

body.kl-product main h3 {
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--kl-navy);
}
body.kl-product main :is(h4, a, span, p).text-kint-primary:not(h2 *) {
  color: var(--kl-cyan-ink);
}

/* ------------------------------------------------------------------ *
 * Tarjetas planas: borde fino, sin sombra ni elevación al pasar el mouse
 * ------------------------------------------------------------------ */
body.kl-product main :is(article, div.shadow-lg, div.shadow-md, a.shadow-lg),
body.kl-product #inspiration-carousel > div,
html.dark body.kl-product #inspiration-carousel > div {
  background: var(--kl-card) !important;
  border: 1px solid var(--kl-line);
  border-radius: 1rem !important;
  box-shadow: none !important;
  transform: none !important;
}
body.kl-product main section.rounded-2xl.shadow-lg :is(div.shadow-md, div.shadow-lg) {
  background: var(--kl-card) !important;
}
body.kl-product main img.shadow-lg {
  box-shadow: none;
  border: 1px solid var(--kl-line);
}
body.kl-product main a.shadow-lg:hover {
  border-color: var(--kl-cyan);
}

/* ------------------------------------------------------------------ *
 * Acomodo de la información
 * (selectores por estructura: Lucide cambia <i> por <svg> al cargar)
 * ------------------------------------------------------------------ */

/* Encabezado del bloque KIS-TA: título a la izquierda, descripción a la derecha. */
@media (min-width: 900px) {
  body.kl-product main .text-center.mb-12:has(> h2 + p) {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: end;
  }
  body.kl-product main .text-center.mb-12:has(> h2 + p) > * {
    margin: 0;
  }
}

/* Tarjetas del bloque KIS-TA: encabezado, texto e imagen alineados fila a fila con la
   tarjeta vecina (subgrid); la imagen queda justo debajo del texto más largo de la fila. */
body.kl-product main section.rounded-2xl.shadow-lg .grid > div.shadow-md > .mt-6 > img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
@supports (grid-template-rows: subgrid) {
  body.kl-product main section.rounded-2xl.shadow-lg .grid > div.shadow-md:has(> :nth-child(3):last-child) {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  body.kl-product main section.rounded-2xl.shadow-lg .grid > div.shadow-md:has(> :nth-child(3):last-child) > .mt-6 {
    align-self: start;
  }
}

/* Ventajas y casos de éxito: columnas abiertas separadas por una línea, sin tarjeta.
   Ícono arriba, título y texto debajo. */
body.kl-product main .grid:has(> article > .flex.items-center:first-child > :is(i, svg) + h3),
body.kl-product main .grid:has(> a.group) {
  gap: 0 !important;
}
body.kl-product main .grid > article:has(> .flex.items-center:first-child > :is(i, svg) + h3),
body.kl-product main .grid > a.group {
  background: transparent !important;
  border: 0;
  border-top: 1px solid var(--kl-line);
  border-radius: 0 !important;
  padding: 1.5rem 0 !important;
}
body.kl-product main .grid > article:has(> .flex.items-center:first-child > :is(i, svg) + h3) > .flex:first-child,
body.kl-product main .grid > a.group > .flex:first-child {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
body.kl-product main .grid > article:has(> .flex.items-center:first-child > :is(i, svg) + h3) > .flex:first-child > :is(i, svg),
body.kl-product main .grid > a.group > .flex:first-child > :is(i, svg) {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--kl-cyan);
}
body.kl-product main .grid > article:has(> .flex.items-center:first-child > :is(i, svg) + h3) h3,
body.kl-product main .grid > a.group > .flex:first-child > span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--kl-navy);
}
body.kl-product main .grid > :is(article, a.group) p {
  color: var(--kl-muted);
  max-width: 36ch;
}
body.kl-product main .grid > a.group:hover {
  border-color: var(--kl-line);
}
body.kl-product main .grid > a.group:hover > .flex:first-child > span {
  text-decoration: underline;
  text-decoration-color: var(--kl-cyan);
  text-underline-offset: 4px;
}
@media (min-width: 768px) {
  body.kl-product main .grid > article:has(> .flex.items-center:first-child > :is(i, svg) + h3),
  body.kl-product main .grid > a.group {
    border-top: 0;
    border-left: 1px solid var(--kl-line);
    padding: 0.25rem clamp(1rem, 2.5vw, 2rem) 0.5rem !important;
  }
  body.kl-product main .grid > article:has(> .flex.items-center:first-child > :is(i, svg) + h3):first-child,
  body.kl-product main .grid > a.group:first-child {
    border-left: 0;
    padding-left: 0 !important;
  }
}
/* Casos de éxito en 2 columnas (tablet): la 3.ª empieza fila, sin línea a la izquierda. */
@media (min-width: 640px) and (max-width: 1023px) {
  body.kl-product main .grid > a.group:nth-child(odd) {
    border-left: 0;
    padding-left: 0 !important;
  }
  body.kl-product main .grid > a.group:nth-child(n + 3) {
    padding-top: 1.5rem !important;
  }
}

/* Especificaciones como ficha técnica: etiqueta en una columna fija y valor al lado. */
body.kl-product main div.shadow-lg:has(> .grid > .space-y-4 > div > h4) {
  background: transparent !important;
  border: 0;
  border-radius: 0 !important;
  padding: 0 !important;
}
body.kl-product main .grid:has(> .space-y-4 > div > h4) {
  column-gap: clamp(2rem, 5vw, 4rem);
  row-gap: 0;
}
body.kl-product main .space-y-4:has(> div > h4) {
  border-bottom: 1px solid var(--kl-line);
}
body.kl-product main .space-y-4 > div:has(> h4 + p) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.2rem;
  margin: 0 !important;
  padding: 1rem 0;
  border-top: 1px solid var(--kl-line);
}
body.kl-product main .space-y-4 > div > h4 {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--kl-navy) !important;
}
body.kl-product main .space-y-4 > div > h4 + p {
  margin: 0;
  color: var(--kl-ink);
}
@media (min-width: 560px) {
  body.kl-product main .space-y-4 > div:has(> h4 + p) {
    grid-template-columns: 10.5rem minmax(0, 1fr);
    gap: 1.25rem;
  }
}
/* En dos columnas de ficha, la etiqueta se angosta para que el valor respire. */
@media (min-width: 768px) and (max-width: 1100px) {
  body.kl-product main .space-y-4 > div:has(> h4 + p) {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.2rem;
  }
}

/* Modelos: el equipo completo sobre un fondo suave (object-cover lo recortaba). */
body.kl-product main .grid > div.overflow-hidden:has(> img.h-80) {
  background: var(--kl-surface) !important; /* fondo de la zona de la foto */
}
html.dark body.kl-product main .grid > div.overflow-hidden:has(> img.h-80) {
  background: #e9f1f6 !important;
}
body.kl-product main .grid > div.overflow-hidden:has(> img.h-80) > img {
  height: 17rem;
  object-fit: contain;
  padding: 1.5rem;
  mix-blend-mode: multiply; /* funde el fondo blanco de las fotos con la superficie */
}
body.kl-product main .grid > div.overflow-hidden:has(> img.h-80) > .p-5 {
  background: var(--kl-card);
  border-top: 1px solid var(--kl-line);
}
body.kl-product main .grid > div.overflow-hidden:has(> img.h-80) h3 {
  font-size: 1.2rem;
  letter-spacing: 0;
}
body.kl-product main .grid > div.overflow-hidden:has(> img.h-80) > .p-5 {
  display: flex;
  flex-direction: column;
  height: calc(100% - 17rem);
}
body.kl-product main .grid > div.overflow-hidden:has(> img.h-80) > .p-5 > a {
  margin-top: auto;
  padding-top: 1rem;
}

/* Tarjeta navy ("Integración total con KISTA"): conserva su fondo. */
body.kl-product main div.bg-kint-secondary.shadow-lg {
  background: #002b49 !important;
  border-color: transparent;
}
body.kl-product main div.bg-kint-secondary h3 {
  color: #ffffff;
}

/* ------------------------------------------------------------------ *
 * Cierre: el CTA final (section.text-center > tarjeta) como franja navy (el único bloque de color fuerte)
 * ------------------------------------------------------------------ */
body.kl-product main section.text-center:has(> div.inline-flex.flex-col) {
  border-top: 0;
}
body.kl-product main section.text-center > div.inline-flex.flex-col,
html.dark body.kl-product main section.text-center > div.inline-flex.flex-col {
  display: flex;
  width: 100%;
  max-width: none;
  background: #002b49 !important;
  border: 0;
  border-radius: 1.5rem !important;
  padding: clamp(2.25rem, 6vw, 4rem) clamp(1.25rem, 5vw, 3rem);
}
body.kl-product main section.text-center:has(> div.inline-flex.flex-col) :is(h2, h3) {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-align: center;
  max-width: 24ch;
  margin-inline: auto;
}
body.kl-product main section.text-center:has(> div.inline-flex.flex-col) p {
  color: #c9dbe7;
  max-width: 52ch;
}
body.kl-product main section.text-center:has(> div.inline-flex.flex-col) a.inline-flex.bg-gray-900 {
  color: #ffffff;
}
/* Botones con contorno dentro de la franja navy (p. ej. "Regresar al inicio"): texto blanco. */
body.kl-product main section.text-center:has(> div.inline-flex.flex-col) a.inline-flex.border {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  border-radius: 0.75rem;
}
body.kl-product main section.text-center:has(> div.inline-flex.flex-col) a.inline-flex.border:hover {
  background: rgba(255, 255, 255, 0.1);
}
body.kl-product main section.text-center > div.inline-flex.flex-col > div.flex {
  flex-wrap: wrap;
  justify-content: center;
}

body.kl-product main section.text-center:has(> div.inline-flex.flex-col) a.inline-flex.bg-gray-900:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  body.kl-product .cta-pulse-green,
  body.kl-product .cta-pulse-blue,
  body.kl-product .floating-cta-cotizar {
    animation: none;
  }
}
