/* CERTEMEC · sitio público
   Mundo visual: presentación corporativa en versión sobria. Blanco y grafito dominan,
   naranja como acento (botones, números, líneas, íconos), pizarra en bandas oscuras. */

:root {
  --orange: #F55F00;
  --orange-hover: #FF7424;
  --orange-text: #C24A00;      /* texto naranja pequeño sobre blanco, 4,9:1 */
  --orange-on-dark: #FF8A47;   /* texto naranja pequeño sobre pizarra */
  --orange-large: #EE5A00;     /* titulares naranjas sobre blanco o niebla: 3,2:1 o más (WCAG 1.4.3) */
  --graphite: #22272B;
  --slate: #2E3842;
  --slate-deep: #252E37;
  --slate-line: #47535F;
  --ink: #22272B;
  --body: #3A424B;
  --muted: #5A6470;
  --on-dark: #D7DDE3;
  --on-dark-muted: #C9D1D9;
  --line: #E3E7EB;
  --line-strong: #C9D0D7;
  --mist: #F4F6F8;
  --peach: #FFF4EC;
  --white: #FFFFFF;

  --font-display: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --container: 1280px;
  --gutter: clamp(16px, 4vw, 24px);
  --header-h: 84px;
  --cut: 12px;                 /* esquina cortada de botones */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 18px 44px -18px rgba(34, 39, 43, 0.28);
  --shadow-lift: 0 26px 54px -20px rgba(34, 39, 43, 0.34);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--line-strong) var(--mist);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  caret-color: var(--orange);
  text-rendering: optimizeLegibility;
}

::selection { background: var(--orange); color: var(--graphite); }

img, video, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { font-family: var(--font-display); color: inherit; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }

a { color: var(--orange-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: #8E3600; }

:focus-visible { outline: 3px solid var(--graphite); outline-offset: 3px; }
.on-dark :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--orange-on-dark); }
.on-dark a:not(.btn):hover, .band-dark a:not(.btn):hover { color: var(--white); }

.tabular { font-variant-numeric: tabular-nums; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--graphite); color: var(--white); padding: 12px 18px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }

.icon { flex: none; }

/* ---------- Títulos: línea naranja de 64 × 4 px sobre H1/H2 ---------- */

.title-block { display: grid; gap: 18px; }
.rule { display: block; width: 64px; height: 4px; background: var(--orange); transform-origin: left center; }
.h1 { font-weight: 800; font-size: clamp(2.25rem, 1.2rem + 3.4vw, 4rem); line-height: 1.03; letter-spacing: -0.025em; text-transform: uppercase; }
.h2 { font-weight: 800; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.1; letter-spacing: -0.02em; }
.h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.25; }
.key { color: var(--orange-large); }
.on-dark .key, .band-dark .key { color: var(--orange); }
.lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.6; color: var(--muted); max-width: 62ch; }
.on-dark .lead { color: var(--on-dark); }
.section-head { display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: flex-end; justify-content: space-between; }
.section-head .lead { max-width: 46ch; }

/* Frase de marca en mayúsculas espaciadas (nunca como antetítulo). */
.brand-phrase { font-family: var(--font-display); font-weight: 600; font-size: 0.75rem; letter-spacing: 0.28em; line-height: 1.9; text-transform: uppercase; }

/* ---------- Botones: rectos con esquina inferior izquierda cortada ---------- */

.btn {
  --btn-bg: var(--graphite); --btn-fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; line-height: 1.2;
  text-decoration: none; color: var(--btn-fg); background: var(--btn-bg);
  border: 0; cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn .icon { color: var(--orange); transition: transform 200ms var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { --btn-bg: var(--orange); --btn-fg: var(--graphite); }
.btn--primary:hover { --btn-bg: var(--orange-hover); }
.btn--primary .icon { color: var(--graphite); }
.btn--dark:hover { --btn-bg: #33393F; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--graphite); clip-path: none; box-shadow: inset 0 0 0 2px var(--graphite); padding: 0 22px; }
.btn--outline:hover { --btn-bg: var(--graphite); --btn-fg: var(--white); }
.btn--outline .icon { color: currentColor; }
.btn--small { min-height: 44px; padding: 0 16px; font-size: 0.875rem; --cut: 9px; }
.btn--block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { --btn-bg: var(--line); --btn-fg: var(--muted); cursor: not-allowed; transform: none; }
.btn[aria-disabled="true"] .icon, .btn:disabled .icon { color: currentColor; transform: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; text-decoration: none; }
.link-arrow .icon { transition: transform 200ms var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Cabecera fija ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px -12px rgba(34, 39, 43, 0.18);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.site-nav { display: flex; align-items: stretch; align-self: stretch; gap: 26px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 48px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; color: var(--ink); text-decoration: none;
  box-shadow: inset 0 0 0 var(--orange); transition: box-shadow 200ms var(--ease-out), color 160ms;
}
.site-nav a:hover { color: var(--orange-text); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--orange); }
.site-header__actions { display: flex; align-items: center; gap: 10px; }
.btn-aula {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; color: var(--ink); text-decoration: none;
  border: 1px solid var(--line-strong); background: var(--white);
}
.btn-aula .icon { color: var(--orange); }
.btn-aula:hover { border-color: var(--graphite); color: var(--ink); }
.menu-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }
.menu-toggle .icon-close { display: none; }
.site-header.is-open .menu-toggle .icon-open { display: none; }
.site-header.is-open .menu-toggle .icon-close { display: block; }

@media (max-width: 1400px) {
  .site-nav { gap: 20px; }
  /* Solo el ícono a la vista, pero el texto sigue siendo el nombre del enlace (QA-038). */
  .btn-aula span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
}
.site-header__actions .btn, .btn-aula { white-space: nowrap; }

@media (max-width: 1100px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: inline-flex; }
  .site-header__actions .btn { display: none; }
  .btn-aula { display: none; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 32px;
    background: var(--white); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;
  }
  .site-header.is-open .site-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav a { font-size: 1.25rem; padding: 14px 0 14px 14px; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { box-shadow: none; color: var(--orange-text); font-weight: 700; }
  .site-nav .site-nav__extra { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
}
@media (min-width: 1101px) { .site-nav__extra { display: none; } }
.site-nav a { white-space: nowrap; }

/* Barra fija inferior en móvil: cotizar + WhatsApp siempre a mano. */
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -8px 20px -8px rgba(34, 39, 43, 0.18);
  }
  .mobile-bar .btn { flex: 1; clip-path: none; }
  .mobile-bar__wa { width: 52px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--graphite); color: var(--white); }
  body { padding-bottom: 76px; }
}

/* ---------- Hero ---------- */

[data-hero] img.is-drifting { animation: drift 10s ease-in-out infinite alternate; }
[data-hero].is-paused img.is-drifting { animation-play-state: paused; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-2.5%); } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.hero__note { margin-top: 10px; max-width: 46ch; font-size: 0.875rem; color: var(--muted); }
.hero__control {
  position: absolute; right: var(--gutter); bottom: 124px;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(34, 39, 43, 0.55); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.hero__control:hover { background: rgba(34, 39, 43, 0.8); }
.hero__control .icon-play { display: none; }
[data-hero].is-paused .hero__control .icon-play { display: block; }
[data-hero].is-paused .hero__control .icon-pause { display: none; }
/* Pausa de los videos en bucle de las fichas (WCAG 2.2.2). */
.video-toggle {
  position: absolute; right: 16px; bottom: 16px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(34, 39, 43, 0.55); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.video-toggle:hover { background: rgba(34, 39, 43, 0.8); }
.video-toggle .icon-play { display: none; }
.video-toggle[aria-pressed="true"] .icon-play { display: block; }
.video-toggle[aria-pressed="true"] .icon-pause { display: none; }
.draft-banner { background: #FFF4E5; border-bottom: 1px solid #F5C08A; color: #7A3300; padding: 12px var(--gutter); font-size: 0.9375rem; text-align: center; }
.legal h2 { margin-top: 12px; }

@media (max-width: 820px) {
  .hero__control { top: 16px; bottom: auto; width: 44px; height: 44px; }
}

/* ---------- Servicios (dos puertas) ---------- */

.services { position: relative; z-index: 2; margin-top: -96px; }
@media (max-width: 820px) { .services { margin-top: -40px; } }
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 28px; }
.service {
  position: relative; display: flex; flex-direction: column; background: var(--white); color: var(--ink);
  box-shadow: var(--shadow-card); transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.service__media { position: relative; height: 250px; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% 84%, 0 100%); }
.service__media img, .service__media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; transition: transform 900ms var(--ease-out); }
.service:hover .service__media img, .service:hover .service__media video { transform: scale(1.05); }
.service__body { padding: 8px 36px 34px; display: grid; gap: 12px; }
.service__title { font-weight: 800; font-size: clamp(1.625rem, 1.3rem + 0.9vw, 2rem); line-height: 1.1; letter-spacing: -0.015em; }
.service__title a { color: inherit; text-decoration: none; }
.service__title a::after { content: ""; position: absolute; inset: 0; }
.service__text { color: var(--muted); }
.service__more { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; color: var(--orange-text); display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.service--evaluation .service__more { color: var(--ink); }
.service--evaluation .service__more .icon { color: var(--orange); }
.service:hover .service__more .icon { transform: translateX(3px); }
.service__more .icon { transition: transform 200ms var(--ease-out); }

/* Pestaña numérica de corte diagonal (como en la presentación). */
.tab {
  position: absolute; top: 0; left: 0; z-index: 1;
  background: var(--orange); color: var(--white);
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1;
  padding: 14px 32px 14px 20px; clip-path: polygon(0 0, 100% 0, 76% 100%, 0 100%);
  font-variant-numeric: tabular-nums;
}
.tab--slate { background: var(--slate); }
.tab--small { font-size: 1.25rem; padding: 11px 26px 11px 15px; }

/* ---------- Cifras ---------- */

.figures { padding-top: 80px; }
.figures__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); border-block: 1px solid var(--line); margin: 0; }
.figure { padding: 30px 24px; display: flex; flex-direction: column-reverse; gap: 6px; border-left: 1px solid var(--line); }
.figure:first-child { border-left: 0; padding-left: 0; }
.figure dt { color: var(--muted); font-weight: 500; }
.figure dd { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.5rem, 2rem + 1.4vw, 3.25rem); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure dd { white-space: nowrap; color: var(--orange); }
.figure dd small { font-size: 0.5em; color: var(--orange-text); }
@media (max-width: 560px) {
  .figures__list { grid-template-columns: 1fr 1fr; }
  .figure { padding: 20px 12px 20px 16px; border-bottom: 1px solid var(--line); }
  .figure:nth-child(odd) { border-left: 0; padding-left: 0; }
  .figure dd { font-size: 2.125rem; }
}

/* ---------- Secciones ---------- */

.section { padding-top: clamp(72px, 8vw, 112px); }
.section--last { padding-bottom: clamp(72px, 8vw, 112px); }
/* La última sección de la página separa su contenido del pie aunque la que la seguía no se muestre
   (p. ej. el aula virtual sin cursos con código SENCE). */
main > .section:last-child { padding-bottom: clamp(72px, 8vw, 112px); }
.band { background: var(--mist); }
.band-dark { background: var(--slate); color: var(--white); }

/* Índice de líneas de formación */
.lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 36px; }
.line-tile {
  position: relative; background: var(--white); padding: 28px 24px; min-height: 148px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  color: var(--ink); text-decoration: none; font-family: var(--font-display); font-weight: 700;
  transition: background-color 200ms var(--ease-out);
}
.line-tile .icon { color: var(--orange); }
.line-tile__label { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.line-tile__count { font-family: var(--font-body); font-weight: 500; font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.line-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform 260ms var(--ease-out); }
.line-tile:hover { background: var(--peach); color: var(--ink); }
.line-tile:hover::after, .line-tile:focus-visible::after { transform: scaleX(1); }
@media (max-width: 560px) {
  .lines { grid-template-columns: 1fr 1fr; }
  .line-tile { min-height: 112px; padding: 18px 14px; font-size: 0.875rem; }
}

/* Enfoque y pilares (banda pizarra con foto en diagonal) */
.split { display: flex; flex-wrap: wrap; }
.split__text { flex: 1 1 560px; min-width: 0; padding: clamp(64px, 7vw, 104px) clamp(24px, 4vw, 64px) clamp(64px, 7vw, 104px) max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter))); }
.split__media { flex: 1 1 460px; min-width: 0; min-height: 560px; position: relative; overflow: hidden; clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%); }
.split__media img, .split__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split__media::after { content: ""; position: absolute; inset: 0; background: var(--orange); clip-path: polygon(16% 0, 18% 0, 2% 100%, 0 100%); }
@media (max-width: 1040px) {
  .split__media { min-height: 320px; clip-path: polygon(0 14%, 100% 0, 100% 100%, 0 100%); order: -1; }
  .split__media::after { clip-path: polygon(0 13%, 100% 0, 100% 2%, 0 15%); }
}
.checks { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px 28px; margin-top: 32px; }
.checks li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.check-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--orange); color: var(--graphite); display: inline-flex; align-items: center; justify-content: center; }
.pillars-title { margin-top: 48px; color: var(--orange-on-dark); }
.pillars { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 12px; margin-top: 16px; }
.pillar { border: 1px solid var(--slate-line); padding: 20px 14px; display: grid; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; line-height: 1.3; }
.pillar .icon { color: var(--orange); }

/* Cursos online y simulador */
.online { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: center; }
.online__text { flex: 1 1 420px; min-width: 0; display: grid; gap: 18px; align-content: start; }
.online__list { list-style: none; border-top: 1px solid var(--line); margin-top: 10px; }
.online__list li { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.online__list .icon { color: var(--orange); }
.online__list strong { font-family: var(--font-display); }
.online__list span { color: var(--muted); font-size: 0.9375rem; }
.video-frame { flex: 1.3 1 520px; min-width: 0; position: relative; aspect-ratio: 16 / 9; background: var(--slate); overflow: hidden; display: flex; align-items: center; justify-content: center; margin: 0; }
.video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-frame::after { content: ""; position: absolute; right: 0; top: 0; width: 140px; height: 90px; background: var(--orange); clip-path: polygon(70% 0, 100% 0, 100% 100%); }

/* Novedades (publicaciones del panel) */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; margin-top: 32px; }
.post { border: 1px solid var(--line); display: flex; flex-direction: column; }
.post img, .post video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post__body { padding: 20px 22px 24px; display: grid; gap: 10px; }
.post time { font-size: 0.8125rem; color: var(--muted); }

/* Llamado final */
.cta { position: relative; overflow: hidden; background: var(--mist); padding: clamp(36px, 5vw, 64px); display: flex; flex-wrap: wrap; gap: 28px 56px; align-items: center; justify-content: space-between; }
.cta::after { content: ""; position: absolute; right: 0; bottom: 0; width: 280px; height: 100%; background: #E8ECF0; clip-path: polygon(55% 0, 100% 0, 100% 100%, 15% 100%); }
.cta > * { position: relative; z-index: 1; }
.cta__text { max-width: 640px; display: grid; gap: 14px; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cabecera de página interior ---------- */

.page-head { position: relative; overflow: hidden; background: var(--mist); }
/* La foto crece en pantallas anchas sin invadir la columna de texto (640 px + márgenes). */
.page-head { --head-img-w: clamp(min(390px, 30%), calc(100% - 720px), 600px); }
.page-head__decor { position: absolute; inset: 0 0 0 auto; width: calc(var(--head-img-w) * 1.25 + 32px); background: var(--slate); clip-path: polygon(44% 0, 100% 0, 100% 100%, 22% 100%); }
.page-head__decor::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 100%; background: var(--orange); clip-path: polygon(40% 0, 41.6% 0, 21.6% 100%, 20% 100%); }
.page-head__img { position: absolute; inset: 0 0 0 auto; width: var(--head-img-w); height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }
/* Con la foto angosta (bajo 1200 px) cada página puede reencuadrar al sujeto con --focus-narrow. */
@media (max-width: 1199px) { .page-head__img { object-position: var(--focus-narrow, var(--focus, 50% 50%)); } }
.page-head__inner { position: relative; padding-block: 44px 56px; display: grid; gap: 20px; max-width: calc(var(--container)); }
.page-head__inner > :not(.crumbs) { max-width: 640px; }
/* Entre 761 y ~1020 px la foto ocupa el 30 % del ancho: el texto se acorta para no pasar bajo el corte diagonal. */
@media (min-width: 761px) { .page-head__inner > :not(.crumbs) { max-width: min(640px, 70% - 40px); } }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.875rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.on-dark .crumbs, .on-dark .crumbs a { color: var(--on-dark-muted); }
.on-dark .crumbs [aria-current] { color: var(--white); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: var(--white); border: 1px solid var(--line); padding: 8px 14px; font-size: 0.875rem; }
.chip strong { font-family: var(--font-display); }
/* Sello de certificación de la O.T.E.C.: visible, sin competir con el título. */
.seal { justify-self: start; display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px; background: var(--graphite); color: var(--on-dark); font-size: 0.9375rem; }
.seal .icon { color: var(--orange-on-dark); }
.seal strong { color: var(--white); font-family: var(--font-display); font-weight: 700; }
.seal > span { display: grid; gap: 2px; }
.seal__detail { font-size: 0.8125rem; color: var(--on-dark-muted); }
@media (max-width: 760px) {
  .page-head__decor { width: 120px; }
  .page-head__img { display: none; }
  .page-head__inner { padding-right: 120px; }
}
/* En el celular el corte pizarra baja a la esquina para no tapar texto ni íconos. */
@media (max-width: 560px) {
  .page-head__decor { inset: auto 0 0 auto; width: 110px; height: 84px; }
  .page-head__inner { padding-right: var(--gutter); }
}

/* ---------- Catálogo ---------- */

.catalog { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; padding-block: 48px 112px; }
.filters { flex: 1 1 260px; max-width: 300px; min-width: 0; display: grid; gap: 32px; }
.filters__group h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.125rem; color: var(--ink); margin-bottom: 12px; }
.filter-lines { list-style: none; border-top: 1px solid var(--line); }
.filter-lines a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 10px 12px 10px 14px;
  border-bottom: 1px solid var(--line); color: var(--body); text-decoration: none;
  font-family: var(--font-display); font-weight: 500; font-size: 0.875rem;
}
.filter-lines a:hover { background: var(--mist); color: var(--ink); }
.filter-lines a[aria-current="true"] { background: var(--peach); color: var(--ink); font-weight: 700; }
.filter-lines a[aria-current="true"] .count { color: var(--orange-text); font-weight: 700; }
.filter-lines .count { font-family: var(--font-body); font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter-lines a.is-empty { color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); text-decoration: none; font-size: 0.875rem; font-weight: 500; }
.pill:hover { border-color: var(--graphite); color: var(--ink); }
.pill[aria-current="true"] { background: var(--graphite); border-color: var(--graphite); color: var(--white); font-weight: 600; }
.filters__help { position: relative; overflow: hidden; background: var(--slate); color: var(--white); padding: 24px; display: grid; gap: 10px; }
.filters__help::after { content: ""; position: absolute; right: 0; bottom: 0; width: 90px; height: 70px; background: var(--orange); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.filters__help p { font-size: 0.875rem; color: var(--on-dark); }
.filters__help a { color: var(--orange-on-dark); font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; }
.filters-toggle { display: none; }
.filters__body { display: grid; gap: 32px; }
.results { flex: 999 1 640px; min-width: 0; }
.results__bar { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.results__count { color: var(--muted); font-size: 0.9375rem; }
.results__count strong { color: var(--ink); }
.results__actions { display: flex; gap: 18px; align-items: center; }
.course-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 24px; margin-top: 28px; }
.empty { padding: 64px 0; text-align: center; color: var(--muted); display: grid; gap: 16px; justify-items: center; }

@media (max-width: 900px) {
  .filters { max-width: none; flex-basis: 100%; }
  .filters-toggle { display: flex; }
  .filters__body { display: grid; gap: 28px; }
  .filters:not(.is-open) .filters__body { display: none; }
  .filters__help { display: none; }
}

/* Tarjeta de curso */
.course-card { position: relative; background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out); }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.course-card__media { position: relative; height: 188px; overflow: hidden; background: var(--line); }
.course-card__media img, .course-card__media video { width: 100%; height: 100%; object-fit: cover; }
.course-card__media video { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms var(--ease-out); }
.course-card.is-playing .course-card__media video { opacity: 1; }
.course-card:hover .course-card__media img.is-still, .course-card:focus-within .course-card__media img.is-still { animation: clip-drift 5s linear both; }
@keyframes clip-drift { from { transform: scale(1.02); } to { transform: scale(1.14) translateX(-4%); } }
.course-card__preview { position: absolute; right: 10px; bottom: 10px; background: rgba(34, 39, 43, 0.86); color: var(--white); font-size: 0.75rem; font-weight: 600; padding: 5px 10px; display: inline-flex; gap: 6px; align-items: center; opacity: 0; transition: opacity 200ms var(--ease-out); }
.course-card:hover .course-card__preview, .course-card:focus-within .course-card__preview { opacity: 1; }
.course-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card__line { font-size: 0.8125rem; color: var(--muted); }
.course-card__title { font-weight: 700; font-size: 1.125rem; line-height: 1.28; }
.course-card__title a { color: var(--ink); text-decoration: none; }
.course-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.course-card__title a:focus-visible { outline: none; }
.course-card:has(a:focus-visible) { outline: 3px solid var(--graphite); outline-offset: 3px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 0.875rem; color: var(--body); }
.meta__hours { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.meta__hours .icon { color: var(--orange); }
.meta__sep { width: 1px; height: 14px; background: var(--orange); }
/* Solo en cursos con código SENCE registrado en el panel (no se anuncia en genérico). */
.sence-tag { align-self: flex-start; font-size: 0.75rem; font-weight: 600; color: var(--ink); background: var(--white); border: 1px solid var(--orange); border-left-width: 3px; padding: 3px 8px; }
.ref-tag { margin-top: auto; align-self: flex-start; font-size: 0.75rem; font-weight: 500; color: var(--body); border: 1px solid #D5DBE1; padding: 4px 9px; }
@media (prefers-reduced-motion: reduce) {
  .course-card:hover .course-card__media img.is-still, .course-card:focus-within .course-card__media img.is-still { animation: none; }
}
/* En el celular la cartera se lee como lista: foto cuadrada a la izquierda. */
@media (max-width: 560px) {
  .course-grid { gap: 0; margin-top: 8px; }
  .course-card { flex-direction: row; border: 0; border-bottom: 1px solid var(--line); padding: 14px 0; gap: 14px; }
  .course-card:hover { transform: none; box-shadow: none; }
  .course-card__media { width: 104px; height: 104px; flex: none; }
  .course-card__body { padding: 0; gap: 6px; }
  .course-card__title { font-size: 1rem; }
  .course-card .tab--small { font-size: 1.1875rem; padding: 7px 20px 7px 9px; }
  .course-card__preview { display: none; }
  .course-card .ref-tag { margin-top: 2px; border: 0; padding: 0; color: var(--muted); }
}

/* ---------- Ficha de curso ---------- */

.course-hero { background: var(--slate); color: var(--white); }
.course-hero .split__text { padding-top: 40px; padding-bottom: 64px; display: grid; gap: 22px; align-content: start; }
.course-hero__id { display: flex; gap: 16px; align-items: center; margin-top: 14px; }
.course-hero__id .tab { position: static; font-size: 1.75rem; padding: 14px 34px 14px 18px; }
.course-hero h1 { font-weight: 800; font-size: clamp(2rem, 1.4rem + 2vw, 3.375rem); line-height: 1.04; letter-spacing: -0.025em; }
/* Cada dato toma el ancho de su contenido, para no partir palabras largas como «recomendaciones». */
/* El filete izquierdo de cada fila queda fuera del recorte, así el dato que baja de fila no arrastra borde ni sangría. */
.facts { display: flex; flex-wrap: wrap; border-top: 1px solid var(--slate-line); margin: 14px 0 0 -17px; clip-path: inset(0 0 0 17px); }
.facts div { flex: 1 1 auto; padding: 18px 16px 0; border-left: 1px solid var(--slate-line); min-width: 0; overflow-wrap: break-word; }
@media (max-width: 480px) { .facts { display: grid; grid-template-columns: 1fr 1fr; margin-left: 0; clip-path: none; } .facts div:nth-child(odd) { border-left: 0; padding-left: 0; } .facts div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.facts dt { font-size: 0.8125rem; color: var(--orange-on-dark); font-weight: 600; }
.facts dd { margin: 6px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.3; }
.course-body { display: flex; flex-wrap: wrap; gap: 48px 64px; align-items: flex-start; padding-top: 72px; }
.course-body__main { flex: 999 1 600px; min-width: 0; display: grid; gap: 48px; }
.prose { display: grid; gap: 14px; font-size: 1.0625rem; color: var(--body); max-width: 68ch; }
.steps { list-style: none; border-top: 1px solid var(--line); }
.steps li { display: flex; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.steps .num { font-family: var(--font-display); font-weight: 800; color: var(--orange-text); font-variant-numeric: tabular-nums; }
.info-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.info-box { background: var(--mist); padding: 26px; display: grid; gap: 12px; align-content: start; }
.info-box .icon { color: var(--orange); }
.ref-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.ref-list li { background: var(--white); border: 1px solid #D5DBE1; padding: 4px 10px; font-size: 0.8125rem; font-weight: 600; }
.request-card {
  flex: 1 1 340px; min-width: 0; position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--orange);
  box-shadow: 0 24px 60px -24px rgba(34, 39, 43, 0.24); padding: 32px; display: grid; gap: 18px;
}
.request-card strong { font-family: var(--font-display); font-size: 1.375rem; line-height: 1.2; }
.request-card p { color: var(--muted); font-size: 0.9375rem; }
.request-card__contact { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 8px; font-size: 0.875rem; color: var(--body); }
.request-card__contact span { display: flex; gap: 10px; align-items: center; }
.request-card__contact .icon { color: var(--orange); }
@media (max-width: 1040px) { .request-card { position: static; } }
.related { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; margin-top: 32px; }
.related a { display: flex; border: 1px solid var(--line); color: var(--ink); text-decoration: none; background: var(--white); transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out); }
.related a:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); color: var(--ink); }
.related img { width: 130px; height: 130px; object-fit: cover; flex: none; }
.related span { padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.related .num { font-family: var(--font-display); font-weight: 800; color: var(--orange-text); font-size: 0.875rem; }
.related strong { font-family: var(--font-display); font-size: 1rem; line-height: 1.25; }
.related small { color: var(--muted); font-size: 0.8125rem; }

/* ---------- Evaluaciones ---------- */

.eval-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; margin-top: 36px; }
.pending { color: var(--muted); }
.steps-dark { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 24px; margin-top: 32px; }
.steps-dark li { border-top: 1px solid var(--slate-line); padding-top: 16px; color: var(--on-dark); }
.steps-dark .num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; color: var(--orange); }
.steps-light li { border-top-color: var(--line); color: var(--body); }
.steps-light strong { color: var(--ink); font-family: var(--font-display); }
.steps-light .num { color: var(--orange-large); }
.dark-panel { position: relative; overflow: hidden; background: var(--slate); color: var(--white); padding: clamp(32px, 5vw, 56px); }
.dark-panel::after { content: ""; position: absolute; right: 0; top: 0; width: 220px; height: 100%; background: var(--orange); clip-path: polygon(78% 0, 84% 0, 36% 100%, 30% 100%); }
.dark-panel > * { position: relative; z-index: 1; }
.cross-link { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; border: 1px solid var(--line); padding: 28px 32px; color: var(--ink); text-decoration: none; }
.cross-link:hover { border-color: var(--graphite); color: var(--ink); }
.cross-link__text { display: flex; gap: 18px; align-items: center; }
.cross-link .icon { color: var(--orange); }
.cross-link strong { font-family: var(--font-display); font-size: 1.125rem; }
.cross-link small { display: block; color: var(--muted); font-size: 0.9375rem; }

/* ---------- Aula virtual ---------- */

.aula { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; }
.aula__text { flex: 1 1 480px; display: grid; gap: 20px; }
.aula__card { flex: 1 1 360px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--orange); box-shadow: var(--shadow-card); padding: 32px; display: grid; gap: 16px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.status--on::before { background: #1F8A4C; }

/* ---------- Normativa ---------- */

.norms { display: flex; flex-wrap: wrap; gap: 28px 64px; align-items: center; }
.norms__title { flex: 1 1 320px; }
.norms__list { flex: 2 1 560px; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.norms__list li { border: 1px solid #D5DBE1; padding: 10px 16px; font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; }

/* ---------- Formularios ---------- */

.form-wrap { position: relative; z-index: 2; margin-top: -96px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-bottom: 112px; }
.form-card { flex: 999 1 620px; min-width: 0; background: var(--white); border-top: 4px solid var(--orange); box-shadow: 0 24px 60px -20px rgba(34, 39, 43, 0.22); }
.form { padding: clamp(24px, 4vw, 48px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 22px 24px; }
.form__section { grid-column: 1 / -1; font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; color: var(--muted); padding-top: 22px; border-top: 1px solid var(--line); }
.form__section--first { padding-top: 0; border-top: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field { display: grid; gap: 7px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { font-family: var(--font-display); font-weight: 600; font-size: 0.8125rem; color: var(--ink); padding: 0; }
.field .req { color: var(--orange-text); }
.input, .select, .textarea {
  width: 100%; min-height: 50px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 0;
  background: var(--white); color: var(--ink); font: inherit; font-size: 1rem;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.textarea { padding: 12px 14px; min-height: 120px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: #6B7480; }
.input:hover, .select:hover, .textarea:hover { border-color: #9AA3AD; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--graphite); box-shadow: 0 0 0 3px rgba(245, 95, 0, 0.28); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: #B42318; }
.field__error { color: #B42318; font-size: 0.875rem; font-weight: 500; }
.field__hint { color: var(--muted); font-size: 0.8125rem; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border: 2px solid var(--line-strong); font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; background: var(--white); }
.choice input:checked + span { background: var(--graphite); border-color: var(--graphite); color: var(--white); }
.choice input:focus-visible + span { outline: 3px solid var(--graphite); outline-offset: 2px; }
.form__footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.form__footer small { color: var(--muted); font-size: 0.8125rem; max-width: 46ch; }
.alert { grid-column: 1 / -1; padding: 14px 18px; border: 1px solid #F1C2BD; background: #FDF1F0; color: #8A1C12; font-weight: 500; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { padding: clamp(32px, 5vw, 64px) clamp(24px, 4vw, 48px); display: grid; gap: 16px; justify-items: start; }
.success__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--orange); color: var(--graphite); display: flex; align-items: center; justify-content: center; }
.success p { color: var(--muted); max-width: 52ch; }
.channels { flex: 1 1 320px; min-width: 0; display: grid; gap: 16px; }
.channel-wa { background: var(--graphite); color: var(--white); padding: 24px 26px; display: flex; gap: 16px; align-items: center; text-decoration: none; }
.channel-wa:hover { background: #33393F; color: var(--white); }
.channel-wa .icon { color: var(--orange); }
.channel-wa strong { font-family: var(--font-display); font-size: 1.0625rem; display: block; }
.channel-wa small { color: var(--on-dark-muted); font-size: 0.875rem; }
.channel-list { background: var(--white); border: 1px solid var(--line); padding: 26px; display: grid; gap: 18px; list-style: none; }
.channel-list li { display: flex; gap: 14px; align-items: flex-start; }
.channel-list .icon { color: var(--orange); margin-top: 2px; }
.channel-list strong { display: block; font-family: var(--font-display); font-size: 0.875rem; }

/* ---------- Pie de página ---------- */

.site-footer { position: relative; overflow: hidden; background: var(--slate); color: var(--on-dark-muted); font-size: 0.875rem; }
.site-footer::before { content: ""; position: absolute; right: 0; bottom: 0; width: 420px; height: 100%; background: var(--orange); clip-path: polygon(80% 0, 86% 0, 42% 100%, 36% 100%); }
.site-footer::after { content: ""; position: absolute; right: 0; bottom: 0; width: 300px; height: 100%; background: var(--slate-deep); clip-path: polygon(78% 0, 100% 0, 100% 100%, 22% 100%); }
.site-footer > * { position: relative; z-index: 1; }
.site-footer__grid { padding-block: 64px 36px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 36px; }
.site-footer__brand { display: grid; gap: 18px; align-content: start; }
.site-footer__brand .brand__sub { line-height: 1.4; max-width: 24ch; }
.site-footer__brand .brand-phrase { color: var(--on-dark); font-size: 0.6875rem; letter-spacing: 0.26em; }
.site-footer h2 { font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem; color: var(--white); margin-bottom: 12px; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__legal { border-top: 1px solid #435060; padding-block: 20px 26px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 0.8125rem; }
.site-footer__legal::before { content: ""; width: 3px; height: 18px; background: var(--orange); }
.site-footer__legal .sep { color: #8693A0; }
.site-footer__entities { flex-basis: 100%; color: var(--on-dark-muted); }
@media (max-width: 760px) { .site-footer::before, .site-footer::after { width: 140px; } }

/* ---------- Movimiento ----------
   El contenido es visible por defecto. Solo cuando app.js confirma que Motion cargó
   y no hay preferencia de reducir movimiento, se prepara el estado inicial. */

html.motion-ready [data-hero] .word { opacity: 0; }
@media (min-width: 821px) {
  html.motion-ready .hero-g__media { opacity: 0; }
  html.motion-ready .hero-g__corner { transform: translateX(40%); }
}
html.motion-ready [data-rule] .rule { transform: scaleX(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  [data-hero] img.is-drifting { animation: none; }
}

/* ---------- Grupo CERTEMEC: logotipo por unidad ---------- */

.brand { display: inline-grid; justify-items: start; gap: 4px; padding-left: 12px; border-left: 3px solid var(--orange); line-height: 1; color: var(--graphite); }
.brand__label { font-family: var(--font-display); font-weight: 800; font-size: 0.6875rem; letter-spacing: 0.06em; }
.brand__word { height: 22px; width: auto; max-width: none; flex-shrink: 0; }
.brand__sub { font-family: var(--font-display); font-weight: 700; font-size: 0.6875rem; letter-spacing: 0.02em; text-transform: uppercase; }
.brand--lg { gap: 8px; padding-left: 16px; border-left-width: 4px; }
.brand--lg .brand__label { font-size: 1.125rem; }
.brand--lg .brand__word { height: 46px; }
.brand--lg .brand__sub { font-size: 0.8125rem; }
.brand--dark { color: var(--white); }
.site-header__logo { display: flex; align-items: center; text-decoration: none; padding: 10px 0; }
.service .brand { margin-bottom: 4px; }
@media (max-width: 1100px) { .site-header .brand__word { height: 20px; } }

/* ---------- Portada del Grupo (como la presentación: foto a la derecha, texto sobre blanco) ---------- */

.hero-g { position: relative; overflow: hidden; background: linear-gradient(180deg, #FFFFFF 0%, var(--mist) 100%); min-height: clamp(620px, 82vh, 760px); display: flex; align-items: center; isolation: isolate; }
.hero-g__media { position: absolute; top: 0; right: 0; bottom: 0; width: 58%; z-index: -1; clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%); }
.hero-g__media img, .hero-g__media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero-g__media::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.35) 22%, rgba(255, 255, 255, 0) 42%); }
.hero-g.is-paused .hero-g__media img { animation-play-state: paused; }
.hero-g__corner { position: absolute; z-index: 2; right: 0; bottom: 0; width: 360px; height: 210px; background: var(--slate); clip-path: polygon(46% 0, 100% 0, 100% 100%, 0 100%); display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 32px 32px 0; box-sizing: border-box; }
.hero-g__corner::before { content: ""; position: absolute; inset: 0; background: var(--orange); clip-path: polygon(40% 0, 46% 0, 0 100%, 0 100%); }
.hero-g__corner p { margin: 0; width: 180px; color: var(--white); font-size: 0.6875rem; }
.hero-g .hero__control { top: auto; bottom: 28px; right: 380px; }
.hero-g__content { padding-block: 64px 72px; }
.hero-g__copy { max-width: min(560px, 46%); display: grid; gap: 22px; justify-items: start; }
.hero-g__title { font-size: clamp(2.25rem, 1.2rem + 2.9vw, 3.5rem); }
.hero-g__title .word { display: inline-block; }
.hero-g__lead { font-size: 1.0625rem; line-height: 1.6; color: var(--body); font-weight: 500; max-width: 52ch; }
.units { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; border-top: 1px solid var(--line); }
.units li + li a { border-left: 1px solid var(--line); padding-left: 20px; }
.units a { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 16px 16px 16px 0; text-decoration: none; color: var(--ink); min-height: 48px; }
.units strong { font-family: var(--font-display); font-weight: 800; font-size: 0.9375rem; }
.units span { grid-column: 1; color: var(--muted); font-size: 0.875rem; }
.units .icon { grid-row: 1 / span 2; grid-column: 2; color: var(--orange); transition: transform 200ms var(--ease-out); }
.units a:hover { color: var(--ink); }
.units a:hover .icon { transform: translateX(3px); }
.pillar-icons { list-style: none; display: flex; flex-wrap: wrap; gap: 0; }
.pillar-icons li { display: grid; justify-items: center; gap: 6px; padding: 0 18px; font-size: 0.75rem; font-weight: 500; color: var(--body); border-left: 1px solid var(--orange); }
.pillar-icons li:first-child { border-left: 0; padding-left: 0; }
.pillar-icons .icon { color: var(--graphite); }
@media (max-width: 560px) { .pillar-icons { flex-wrap: nowrap; } .pillar-icons li { padding: 0 9px; font-size: 0.6875rem; } }
@media (max-width: 900px) {
  .hero-g { display: block; min-height: 0; background: var(--white); }
  .hero-g__media { position: relative; width: 100%; height: 300px; clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }
  .hero-g__media::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.5) 100%); }
  .hero-g__corner { width: 150px; height: 90px; padding: 0; }
  .hero-g__corner p { display: none; }
  .hero-g .hero__control { top: 16px; right: 16px; bottom: auto; width: 44px; height: 44px; }
  .hero-g__content { padding-block: 24px 40px; }
  .hero-g__copy { max-width: none; }
  .brand--lg .brand__word { height: 34px; }
  .units { grid-template-columns: 1fr; }
  .units li + li a { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
}
.services--g { margin-top: 0; padding-top: 56px; }
@media (max-width: 820px) { .services--g { margin-top: 0; } }

/* Índice de 14 líneas: 7 columnas en escritorio */
.lines--14 { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); }
.lines--14 .line-tile { min-height: 132px; padding: 22px 18px; font-size: 0.9375rem; }
@media (max-width: 560px) { .lines--14 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lines--14 .line-tile { min-width: 0; overflow-wrap: break-word; } }

/* Portafolio de evaluaciones en el inicio */
.eval-index { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); column-gap: 40px; margin-top: 32px; border-top: 1px solid var(--line); }
.eval-index a { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 20px 4px 20px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; min-height: 48px; }
.eval-index__num { font-family: var(--font-display); font-weight: 800; font-size: 1.375rem; color: var(--orange-text); font-variant-numeric: tabular-nums; }
.eval-index__text { display: grid; gap: 4px; }
.eval-index__text strong { font-family: var(--font-display); font-size: 1.0625rem; }
.eval-index__text span { color: var(--muted); font-size: 0.9375rem; }
.eval-index .icon { color: var(--orange); transition: transform 200ms var(--ease-out); }
.eval-index a:hover { color: var(--ink); background: var(--mist); }
.eval-index a:hover .icon { transform: translateX(3px); }

/* Formación para el cumplimiento y carpeta de arranque */
.compliance { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 32px; margin-top: 40px; }
.compliance article { border-top: 1px solid var(--slate-line); padding-top: 20px; display: grid; gap: 12px; align-content: start; }
.compliance p { color: var(--on-dark); }
.compliance__note { font-size: 0.9375rem; }
.compliance .compliance__ref { font-size: 0.8125rem; color: var(--on-dark-muted); }
.kickoff { margin-top: 48px; background: var(--slate-deep); padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 24px 48px; }
.kickoff > div { display: grid; gap: 12px; }
.kickoff p { color: var(--on-dark); }
.kickoff .checks { margin-top: 0; grid-template-columns: 1fr; }
.kickoff__note { grid-column: 1 / -1; border-top: 1px solid var(--slate-line); padding-top: 18px; font-size: 0.9375rem; }
.kickoff__note strong { color: var(--white); }

.video-frame--photo img { opacity: 1; }
.online__sence { width: 84px; height: auto; flex: none; border: 1px solid var(--line); }
/* ---------- C.E.P. ---------- */

.page-head--cep .page-head__inner { gap: 18px; }
.criteria { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; margin-top: 32px; }
.criteria li { border-top: 3px solid var(--graphite); padding-top: 18px; display: grid; gap: 8px; align-content: start; }
.criteria .num { font-family: var(--font-display); font-weight: 800; color: var(--orange-text); font-variant-numeric: tabular-nums; }
.criteria p { color: var(--body); }
.scope { margin-top: 28px; padding: 16px 20px; background: var(--mist); color: var(--body); }
.scope strong { color: var(--ink); font-family: var(--font-display); }
.course-card__summary { color: var(--body); font-size: 0.9375rem; }
.frame-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; background: rgba(34, 39, 43, 0.88); color: var(--on-dark); padding: 16px 20px; font-size: 0.875rem; display: grid; gap: 4px; }
.frame-caption strong { color: var(--white); font-family: var(--font-display); font-size: 0.9375rem; }
.tag { justify-self: start; display: inline-block; padding: 4px 12px; background: var(--orange); color: var(--graphite); font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; }
.compliance article .tag { margin-bottom: 4px; }
.criteria-note { margin-top: 32px; color: var(--on-dark); }
.dark-panel--light { background: var(--mist); color: var(--ink); }
.dark-panel--light::after { display: none; }
.dark-panel--light .lead { margin-top: 10px; }
.battery { background: var(--graphite); color: var(--on-dark); padding: 28px; display: grid; gap: 12px; }
.battery h2 { color: var(--white); }
.battery h2::before { content: ""; display: block; width: 40px; height: 3px; background: var(--orange); margin-bottom: 14px; }
.tab--on-dark { background: var(--white); color: var(--slate); }.request-data { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--graphite); padding: 24px 26px; display: grid; gap: 12px; }
.request-data ul { padding-left: 18px; display: grid; gap: 6px; color: var(--body); font-size: 0.9375rem; }
.request-data li::marker { color: var(--orange); }
.request-data p { color: var(--muted); font-size: 0.875rem; }.unit-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 24px; margin-top: 32px; }
.unit-blocks article { border: 1px solid var(--line); padding: 28px; display: grid; gap: 16px; align-content: start; justify-items: start; }
.unit-blocks p { color: var(--body); }
