/* =========================================================
   SCT Security — v2 de la portada: menos «plantilla», más empresa.
   Títulos a la izquierda y de un solo color, número de sección,
   foto real en el inicio, bloques sólidos (sin grillas de líneas finas),
   franja azul marino para las cifras. Se carga después de styles.css.
   ========================================================= */
:root {
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 6px 18px -8px rgba(16,24,40,.10);
  --shadow-lg: 0 2px 4px rgba(16,24,40,.04), 0 24px 48px -24px rgba(16,24,40,.22);
}

/* títulos de un solo color */
.dim, .hero h1 .dim { color: inherit; font-weight: inherit; }

/* etiquetas: texto, sin cápsula de color */
.pill { background: none; padding: 0; border-radius: 0; color: var(--primary); font-size: 12px; letter-spacing: .12em; }
.pill-warn { background: none; color: #A86200; }

/* ---------- encabezados de sección: a la izquierda, con número ---------- */
body { counter-reset: seccion; }
.head-center { counter-increment: seccion; text-align: left; max-width: 760px; margin: 0 0 44px; }
.head-center .pill { display: inline-block; color: var(--ink-2); margin-bottom: 18px; }
.head-center .pill::before { content: counter(seccion, decimal-leading-zero); color: var(--primary); margin-right: 12px; font-variant-numeric: tabular-nums; }
.head-center h2 { margin-top: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.04em; }
.head-center p { margin-top: 16px; font-size: 17px; line-height: 1.6; max-width: 62ch; color: var(--ink-2); }
.section { padding: 96px 0; }

/* ---------- inicio: foto real ---------- */
.hero.hero-foto { padding: 56px 0 72px; text-align: left; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 64px; align-items: center; }
.hero-k { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.hero-k i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.hero-foto h1 { font-size: clamp(40px, 4.6vw, 60px); line-height: 1.08; letter-spacing: -0.045em; margin: 22px 0 0; max-width: 15ch; }
.hero-foto .hero-sub { margin: 22px 0 0; max-width: 520px; }
.hero-foto .hero-ctas { justify-content: flex-start; margin-top: 32px; }
.hero-datos { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 32px; margin: 44px 0 0; }
.hero-datos div { display: flex; flex-direction: column; gap: 2px; }
.hero-datos dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.hero-datos dd { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.hero-img { position: relative; margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 4.6; background: var(--soft); box-shadow: var(--shadow-lg); }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; }
.hero-img figcaption {
  position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px; background: rgba(15, 29, 46, .82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-size: 14px; line-height: 1.4;
}
.hero-img figcaption img { width: 34px; height: 34px; flex-shrink: 0; }
.hero-img figcaption b { display: block; font-weight: 600; }
.hero-img figcaption span { color: rgba(255,255,255,.72); font-size: 13px; }

/* ---------- respaldo: cifras sueltas, solo aire entre ellas ---------- */
.hechos { padding: 8px 0 24px; }
.hechos ul { list-style: none; margin: 0; padding: 32px 36px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 28px; background: var(--soft); border-radius: var(--radius-lg); }
.hechos li { display: flex; flex-direction: column; gap: 4px; }
.hechos b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.hechos span { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }

/* ---------- industrias: bloques sólidos ---------- */
.rubros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rubro {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 168px; padding: 24px 24px 26px;
  border-radius: var(--radius-lg); background: var(--soft); text-decoration: none; color: var(--ink);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.rubro-n { font-size: 13px; font-weight: 600; color: var(--primary); font-variant-numeric: tabular-nums; margin-bottom: auto; }
.rubro b { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin-top: 28px; }
.rubro span:not(.rubro-n) { font-size: 14px; color: var(--ink-2); }
.rubro i { position: absolute; right: 22px; top: 20px; font-style: normal; font-size: 18px; color: var(--ink-3); transition: transform .25s var(--ease), color .25s; }
.rubro:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.rubro:hover span:not(.rubro-n) { color: rgba(255,255,255,.72); }
.rubro:hover .rubro-n { color: #7FB0FF; }
.rubro:hover i { color: #fff; transform: translateX(3px); }

/* ---------- compromisos: franja azul marino ---------- */
#compromisos { background: var(--ink); color: #fff; }
#compromisos .head-center .pill { color: rgba(255,255,255,.7); }
#compromisos .head-center .pill::before { color: #7FB0FF; }
#compromisos .head-center h2 { color: #fff; }
#compromisos .head-center p { color: rgba(255,255,255,.72); }
#compromisos .slas { gap: 40px; }
#compromisos .sla { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
#compromisos .sla:hover { box-shadow: none; }
#compromisos .sla b { color: #fff; font-size: clamp(40px, 4.4vw, 60px); letter-spacing: -0.05em; }
#compromisos .sla span { color: rgba(255,255,255,.7); font-size: 15px; max-width: 24ch; }

/* ---------- equipo: cifras en bloques, sin divisores ---------- */
.l-stats { border: 0; border-radius: 0; gap: 8px; overflow: visible; }
.l-stats div { border-radius: 12px; }
.l-stats div + div { border-left: 0; }
.l-photo-lg { object-fit: cover; mix-blend-mode: normal; border: 0; box-shadow: none; }

/* ---------- franja de empleo: plana ---------- */
.jobs-band { background: var(--soft); border-color: transparent; }

/* ---------- tarjetas más sobrias ---------- */
.card:hover { transform: none; }


/* etiquetas sin cápsula también en tarjetas y zonas */
.b-feature .card-k, .zona-tag { background: none; padding: 0; border-radius: 0; }
.zona-tag { color: var(--ink-3); }

/* formación: lista con aire, sin líneas */
.l-edu { border: 0; border-radius: 0; gap: 12px; overflow: visible; }
.l-edu li { padding: 0 0 0 14px; border-top: 0; border-left: 2px solid var(--line-2); }
.l-edu li:nth-child(-n+3) { background: none; border-left-color: var(--primary); }

/* marcas: carrusel dentro de la tarjeta Tecnología (ocupa el espacio libre, sin marco doble) */
.viz.viz-marcas { flex: 1; display: flex; padding: 0; overflow: hidden; }
.viz-marcas .brands { display: flex; flex-direction: column; justify-content: center; gap: 14px; width: 100%; min-width: 0; margin: 0; padding: 26px 0; text-align: left; }
.viz-marcas .marquee + .marquee .marquee-track { animation-direction: reverse; animation-duration: 30s; }
.viz-marcas .marquee { width: 100%; max-width: none; margin: 0; }
.viz-marcas .brands-title { white-space: normal; text-align: left; padding: 0 24px; margin-bottom: 6px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.viz-marcas .marquee-track { gap: 56px; padding-right: 56px; animation-duration: 26s; }
.viz-marcas .marquee-track li { height: 52px; }
.viz-marcas .marquee-track img { max-height: 36px; }

/* ---------- comparación alineada con el título ---------- */
.vs { margin: 0; max-width: none; }

/* ---------- portal de clientes: capturas reales ---------- */
.portal-show { margin-top: 0; }
.portal-show .tabs { margin-bottom: 16px; }
.portal-frame { border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.portal-bar { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; background: var(--soft); }
.portal-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-2); }
.portal-url { margin-left: 12px; font-size: 13px; color: var(--ink-3); }
.portal-url b { color: var(--ink); font-weight: 600; }
.portal-demo { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.portal-views { display: grid; }
/* todas las vistas quedan apiladas y cargadas; solo se muestra la activa (sin parpadeo en blanco al cambiar) */
.portal-views .panel { grid-area: 1 / 1; display: flex; margin: 0; padding: 0; flex-direction: column; opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s .35s; animation: none; }
.portal-views .panel.is-active { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.portal-views .panel img { width: 100%; height: auto; display: block; }
.portal-views figcaption { padding: 14px 18px; font-size: 14.5px; color: var(--ink-2); background: #fff; border-top: 1px solid var(--line); }
.portal-pie { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 22px; padding: 20px 24px; border-radius: var(--radius-lg); background: var(--soft); }
.portal-pie p { color: var(--ink-2); font-size: 15px; }
.portal-pie b { color: var(--ink); }
.portal-acc { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-img { aspect-ratio: 4 / 3.4; }
  .hechos ul { grid-template-columns: repeat(3, 1fr); }
  .rubros { grid-template-columns: 1fr 1fr; }
  #compromisos .slas { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .hero.hero-foto { padding: 32px 0 48px; }
  .hero-foto h1 { max-width: none; }
  .hero-datos { grid-template-columns: 1fr 1fr; gap: 18px 22px; margin-top: 32px; }
  .head-center { margin-bottom: 32px; }
  .head-center .pill { margin-bottom: 12px; }
  .section { padding: 72px 0; }
  .hechos ul { grid-template-columns: 1fr 1fr; padding: 24px 22px; gap: 22px; }
  .hechos li:last-child { grid-column: span 2; }
  .rubros { gap: 10px; }
  .rubro { min-height: 140px; padding: 18px 18px 20px; }
  .rubro b { font-size: 17px; margin-top: 18px; }
  #compromisos .slas { gap: 28px; }
  .portal-demo { display: none; }
  .portal-pie { padding: 18px; }
  .portal-acc { width: 100%; }
  .portal-acc .btn { flex: 1; }
}

/* =========================================================
   v2.1 — elementos gráficos: resaltado sólido detrás de las palabras clave,
   número en cuadro azul marino, fondos de color y el sello circular de SCT.
   ========================================================= */
/* resaltado tipo marcador: una franja sólida en la mitad baja de las letras (no tapa la línea de arriba) */
mark {
  color: inherit; background-color: transparent; padding: 0 .08em; margin: 0 -.02em;
  background-image: linear-gradient(#CFE0FB, #CFE0FB); background-repeat: no-repeat; background-size: 100% .42em; background-position: 0 88%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
#compromisos mark, #panel mark { background-image: linear-gradient(var(--primary), var(--primary)); color: #fff; }

.head-center .pill { display: inline-flex; align-items: center; gap: 12px; }
.head-center .pill::before {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 0; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 12px; letter-spacing: 0;
}
#compromisos .head-center .pill::before, #panel .head-center .pill::before { background: var(--primary); color: #fff; }

/* sello circular de SCT, grande y tenue, detrás de algunos títulos */
#servicios, #panel, #equipo, #cobertura, #contacto { position: relative; isolation: isolate; overflow: hidden; }
#servicios::before, #panel::before, #equipo::before, #cobertura::before, #contacto::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: 520px; height: 520px; top: -90px; right: -140px;
  background: url("../assets/isotipo-azul.png") center / contain no-repeat; opacity: .04;
}
#panel::before { background-image: url("../assets/isotipo-blanco.png"); opacity: .06; }
#equipo::before { right: auto; left: -170px; top: -60px; }
#contacto::before { top: auto; bottom: -160px; }

/* menos blanco: bloques de color por sección */
#servicios { background: #F1F5FB; }
#servicios .card:not(.b-dark) { background: #fff; }
#panel { background: var(--ink); color: #fff; }
#panel .head-center .pill { color: rgba(255,255,255,.75); }
#panel .head-center h2 { color: #fff; }
#panel .head-center p { color: rgba(255,255,255,.72); }
#panel .tabs { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
#panel .tab { color: rgba(255,255,255,.75); }
#panel .tab.is-active { background: #fff; color: var(--ink); }
#panel .portal-frame { border-color: transparent; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); }
#panel .portal-pie { background: rgba(255,255,255,.07); }
#panel .portal-pie p { color: rgba(255,255,255,.75); }
#panel .portal-pie b { color: #fff; }
#panel .portal-pie .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); box-shadow: none; }

/* foto del inicio con un bloque de color desplazado detrás */
.hero-img { overflow: visible; box-shadow: none; background: none; }
.hero-img::before { content: ""; position: absolute; inset: 20px -16px -16px 20px; border-radius: 22px; background: var(--ink); z-index: -1; }
.hero-img img { border-radius: 22px; }
.hero-img figcaption { z-index: 1; }
.hero.hero-foto { isolation: isolate; }
@media (max-width: 640px) {
  .hero-img::before { inset: 12px -8px -10px 12px; }
  #servicios::before, #panel::before, #equipo::before, #cobertura::before, #contacto::before { width: 300px; height: 300px; right: -110px; }
}

/* =========================================================
   v2.2 — pulido tras auditoría visual
   ========================================================= */
/* numeración continua también en la Ley y en Preguntas */
.pill-num { counter-increment: seccion; display: inline-flex; align-items: center; gap: 12px; color: var(--ink-2); margin-bottom: 18px; }
.pill-num::before {
  content: counter(seccion, decimal-leading-zero); display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--ink); color: #fff; font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
/* viñetas alineadas con la primera línea del texto */
.mini-list li { align-items: flex-start; line-height: 1.5; }
.mini-list li::before { flex-shrink: 0; margin-top: .62em; }
/* marcas: logos más presentes y filas con aire */
.viz-marcas .brands { gap: 22px; }
.viz-marcas .marquee-track img { max-height: 40px; }
/* equipo: la tarjeta más corta acompaña al leer la más larga */
@media (min-width: 961px) { .leaders > .leader:last-child { position: sticky; top: 96px; } }
/* cobertura: «Ver zona» siempre al pie de la tarjeta */
.zona i { margin-top: auto; padding-top: 10px; }
/* contacto alineado con el título, a todo el ancho */
.contact { max-width: none; margin: 0; }
/* pie: enlace al portal sin el punto azul que parecía un error */
.footer-portal::before { display: none; }
.footer-portal { font-weight: 600; color: var(--primary) !important; }
