/* estudios-ia.com — hoja de estilos común
   Tipografías autoalojadas (sin peticiones a terceros, compatible con RGPD). */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #182033;
  --ink-2: #4a5468;
  --ink-3: #6b7486;
  --paper: #ffffff;
  --mist: #f1f3f7;
  --line: #d9dee7;
  --action: #2c3fb8;
  --action-hover: #1f2f93;
  --action-soft: #e6e9fa;

  /* Color de identidad de cada programa */
  --t-gen: #e7ddf8;   --t-gen-ink: #5b34a6;
  --t-sap: #d6e9f8;   --t-sap-ink: #1c5f92;
  --t-code: #f6e7b8;  --t-code-ink: #7a5800;
  --t-mint: #d3efe2;  --t-mint-ink: #1d6b4c;

  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --gutter: 16px;
  --radius-s: 4px;
  --radius-m: 6px;
  --radius-l: 12px;
  --header-h: 64px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 56px); color-scheme: light; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--action); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--action-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--sans); margin: 0; line-height: 1.12; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.005em; line-height: 1.25; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--gutter); top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-m); z-index: 100; }
.skip-link:focus { top: 10px; color: #fff; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  font: 600 1rem/1.2 var(--sans);
  border-radius: var(--radius-m); border: 2px solid var(--action);
  background: var(--action); color: #fff; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); color: #fff; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Etiquetas ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.chips li { font-size: .9375rem; padding: 3px 9px; border-radius: var(--radius-s); background: var(--chip, var(--mist)); color: var(--ink); }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { font-weight: 750; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; }
.site-nav > ul { display: flex; align-items: center; gap: 4px; list-style: none; }
.site-nav a, .sub-toggle { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font: 500 1rem/1.3 var(--sans); border-radius: var(--radius-m); }
.site-nav a:hover, .sub-toggle:hover { background: var(--mist); color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"], .sub-toggle.is-current { font-weight: 650; }
.site-nav > ul > li > a[aria-current="page"] { background: var(--mist); }
.site-nav .btn { display: inline-flex; padding: 8px 16px; font-weight: 600; font-size: .9375rem; color: #fff; margin-left: 10px; }
.site-nav .btn:hover { background: var(--action-hover); color: #fff; }
.has-sub { position: relative; }
.sub-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; }
.sub-toggle svg { width: 12px; height: 12px; transition: transform .15s ease; }
.sub-toggle[aria-expanded="true"] { background: var(--mist); }
.sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.sub { list-style: none; display: none; }
.sub.is-open { display: block; }
html:not(.js) .has-sub:hover .sub, html:not(.js) .has-sub:focus-within .sub { display: block; }
.sub a { padding: 10px 12px; }
.sub a strong { display: block; font-weight: 650; }
.sub a span { display: block; margin-top: 2px; font-size: .875rem; font-weight: 400; color: var(--ink-2); }
.sub a[aria-current="page"] { background: var(--mist); }
.sub-all { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.sub-all a { color: var(--action); font-weight: 600; }
@media (min-width: 960px) {
  .sub { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 400px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: 0 14px 36px rgba(24,32,51,.12); }
  .sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
}
@media (max-width: 959px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; font: 600 1rem var(--sans); background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-m); cursor: pointer; }
  .nav-toggle svg { width: 18px; height: 18px; }
  .site-header .wrap { flex-wrap: wrap; }
  .site-nav { width: 100%; }
  .js .site-nav { display: none; padding-bottom: 14px; }
  .js .site-nav.is-open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav a, .sub-toggle { padding: 12px 8px; }
  .sub-toggle { width: 100%; justify-content: space-between; }
  .sub { padding: 2px 0 6px 12px; }
  html:not(.js) .sub { display: block; }
  .site-nav .btn { display: flex; justify-content: center; min-height: 48px; margin: 8px 0 0; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--mist { background: var(--mist); }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-2); font-size: 1.125rem; margin-top: 14px; margin-bottom: 0; }

/* ---------- Hero de la home ---------- */
.hero { padding-block: clamp(56px, 9vw, 120px) clamp(56px, 8vw, 104px); }
.hero h1 { font-size: clamp(2.625rem, 6.4vw, 5.25rem); font-weight: 720; letter-spacing: -0.032em; line-height: 1.04; max-width: 12ch; color: var(--ink); }
.hero-slogan { font-size: clamp(1.5rem, 2.9vw, 2.375rem); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; color: var(--ink); margin: 22px 0 0; }
.hero-slogan em { font-style: normal; color: var(--action); }
.hero-lead { font-family: var(--serif); font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.55; color: var(--ink-2); max-width: 38em; margin: 24px 0 36px; }

/* ---------- Estado de cada programa ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--t-mint-ink); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--closed { color: var(--ink-3); }
.status--soon { color: #9a3b12; }

/* ---------- Lista de programas (home) ---------- */
.programs { list-style: none; border-top: 1px solid var(--line); }
.program { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 48px; padding-block: 32px; border-bottom: 1px solid var(--line); position: relative; padding-left: 22px; }
.program::before { content: ""; position: absolute; left: 0; top: 34px; bottom: 34px; width: 6px; border-radius: 3px; background: var(--accent); }
@media (min-width: 900px) { .program { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; padding-left: 32px; } .program > div:first-child { grid-row: 1 / span 2; } }
.program--gen { --accent: var(--t-gen-ink); --chip: var(--t-gen); }
.program--sap { --accent: var(--t-sap-ink); --chip: var(--t-sap); }
.program--code { --accent: var(--t-code-ink); --chip: var(--t-code); }
.program-kind { color: var(--ink-2); font-size: .9375rem; margin-bottom: 8px; }
.program h3 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 700; letter-spacing: -0.015em; }
.program h3 a { color: var(--ink); text-decoration: none; }
.program h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.program-summary { font-family: var(--serif); font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); margin: 12px 0 16px; max-width: 38em; }
.program .chips { margin-bottom: 4px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; font-size: .96875rem; align-content: start; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 550; }
.program-cta { margin-top: 18px; grid-column: 1 / -1; }
@media (min-width: 900px) { .program-cta { grid-column: 2; grid-row: 2; align-self: start; margin-top: 6px; } }

/* ---------- Prosa larga ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 64px; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } .split-aside { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; } }
.split-aside p { color: var(--ink-2); margin-top: 14px; }
.prose { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.7; max-width: 36em; }
.prose h3 { font-size: 1.3125rem; margin: 1.8em 0 .5em; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 1em; }

/* ---------- Pasos (contenido secuencial) ---------- */
.steps { list-style: none; counter-reset: step; display: grid; gap: 0; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; padding-block: 22px; border-top: 1px solid var(--line); }
.steps > li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 1.0625rem; }
.steps h3 { margin-bottom: 6px; }
.steps p { margin: 0; color: var(--ink-2); max-width: 46em; }
.steps p + p { margin-top: 8px; }

/* ---------- Bloques de hechos ---------- */
.factlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; margin: 0; }
@media (min-width: 760px) { .factlist { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.factlist > div { padding-block: 20px; border-top: 1px solid var(--line); }
.factlist dt { font-weight: 650; font-size: 1.125rem; margin-bottom: 6px; }
.factlist dd { margin: 0; color: var(--ink-2); }

/* ---------- Personas ---------- */
.people { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 32px; }
@media (min-width: 700px) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .people { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.people li { padding-block: 16px; border-top: 1px solid var(--line); }
.people strong { display: block; font-weight: 650; }
.people span { color: var(--ink-2); font-size: .9375rem; }
.people-sub { margin-top: 36px; margin-bottom: 8px; font-size: 1.125rem; }

/* ---------- Preguntas frecuentes ---------- */
.faq { max-width: 860px; border-bottom: 1px solid var(--line); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-weight: 650; font-size: 1.125rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: 0 0 14px; height: 14px; margin-top: 6px; background: linear-gradient(var(--ink), var(--ink)) center/14px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center/2px 14px no-repeat; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 0 22px; color: var(--ink-2); max-width: 46em; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------- Formulario ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px 64px; }
@media (min-width: 960px) { .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.contact-aside p { color: var(--ink-2); margin-top: 14px; }
.contact-alt { list-style: none; margin-top: 24px; display: grid; gap: 10px; }
.contact-alt li[hidden] { display: none; }
.lead-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(20px, 3vw, 32px); }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 12px; font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid #b9c1cf; border-radius: var(--radius-m);
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--action-soft); border-color: var(--action); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: .875rem; margin-top: 4px; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .9375rem; color: var(--ink-2); }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--action); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-m); font-size: .96875rem; }
.form-status:empty { display: none; }
.form-status.is-ok { background: var(--t-mint); color: #0f4a33; }
.form-status.is-error { background: #fbe3e1; color: #7c1d17; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 22px; }
.form-actions small { color: var(--ink-3); }

/* ---------- Ficha de programa ---------- */
.crumbs { font-size: .9375rem; color: var(--ink-3); padding-top: 24px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.p-hero { padding-block: clamp(28px, 5vw, 56px) clamp(40px, 6vw, 72px); }
.p-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 64px; align-items: start; }
@media (min-width: 980px) { .p-hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.p-kind { color: var(--ink-2); font-size: 1rem; margin-bottom: 14px; }
.p-hero h1 { font-size: clamp(2.25rem, 4.8vw, 3.75rem); font-weight: 740; letter-spacing: -0.03em; line-height: 1.06; }
.p-lead { font-family: var(--serif); font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.6; color: var(--ink-2); margin: 22px 0 28px; max-width: 36em; }
.sheet { border-radius: var(--radius-l); background: var(--mist); padding: 24px; border-top: 6px solid var(--accent); }
.sheet .facts { gap: 12px 20px; }
.sheet-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--ink-2); }
.page--gen { --accent: var(--t-gen-ink); --chip: var(--t-gen); --tint: var(--t-gen); }
.page--sap { --accent: var(--t-sap-ink); --chip: var(--t-sap); --tint: var(--t-sap); }
.page--code { --accent: var(--t-code-ink); --chip: var(--t-code); --tint: var(--t-code); }
.deadline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 22px; padding: 12px 16px; background: var(--tint); border-radius: var(--radius-m); font-weight: 600; }
.deadline small { font-weight: 500; color: var(--ink-2); font-size: .9375rem; }

/* Subnavegación de la ficha */
.subnav { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255,255,255,.97); border-block: 1px solid var(--line); }
.subnav ul { display: flex; gap: 2px; list-style: none; overflow-x: auto; scrollbar-width: none; padding-block: 6px; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; white-space: nowrap; padding: 8px 12px; color: var(--ink-2); text-decoration: none; font-size: .9375rem; font-weight: 550; border-radius: var(--radius-m); }
.subnav a:hover { color: var(--ink); background: var(--mist); }
.subnav a.is-active { color: var(--ink); background: var(--tint); }

/* Listas de resultados */
.outcomes { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 48px; counter-reset: none; }
@media (min-width: 820px) { .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.outcomes li { padding: 18px 0 18px 30px; border-top: 1px solid var(--line); position: relative; }
.outcomes li::before { content: ""; position: absolute; left: 0; top: 26px; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.audience { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 820px) { .audience { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.audience li { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l); }
.audience strong { display: block; font-size: 1.125rem; margin-bottom: 8px; }
.audience span { color: var(--ink-2); }
.req { margin-top: 28px; padding: 18px 20px; border-left: 4px solid var(--accent); background: var(--paper); max-width: 860px; }
.req p { margin: 0; }
.req p + p { margin-top: 8px; }
.stack { margin-top: 40px; }
.stack h3 { margin-bottom: 14px; }

/* Barra de créditos ECTS */
.ects { display: flex; gap: 3px; margin: 8px 0 12px; height: 56px; }
.ects a { flex: var(--ects) 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; background: var(--seg, var(--tint)); color: var(--ink); font-weight: 700; text-decoration: none; border-radius: var(--radius-s); font-size: .9375rem; }
.ects a:hover { outline: 2px solid var(--accent); outline-offset: 1px; color: var(--ink); }
.ects a.is-tfm { background: var(--ink); color: #fff; }
.ects-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .9375rem; color: var(--ink-2); margin-bottom: 28px; }
.ects-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--sw); margin-right: 6px; vertical-align: -1px; }
.modules { border-bottom: 1px solid var(--line); }
.module { border-top: 1px solid var(--line); }
.module summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 18px 0; }
.module summary::-webkit-details-marker { display: none; }
.module-n { font-weight: 700; color: var(--ink-3); font-size: 1.0625rem; }
.module-t { font-weight: 650; font-size: 1.125rem; }
.module-c { font-size: .9375rem; color: var(--ink-2); white-space: nowrap; }
.module-c::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: 12px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg) translateY(-3px); transition: transform .2s ease; }
.module[open] .module-c::after { transform: rotate(-135deg) translateY(-1px); }
.module-body { padding: 0 0 22px 54px; color: var(--ink-2); max-width: 54em; }
.module-body ul { padding-left: 1.1em; display: grid; gap: 4px; }
.module-body p { margin: 10px 0 0; font-size: .9375rem; color: var(--ink-3); }
@media (max-width: 560px) { .module summary { grid-template-columns: 30px minmax(0, 1fr); } .module-c { grid-column: 2; } .module-body { padding-left: 44px; } }
.note { margin-top: 28px; color: var(--ink-2); max-width: 760px; }

/* Roles */
.roles { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 40px; }
@media (min-width: 760px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.roles li { padding: 16px 0; border-top: 1px solid var(--line); font-weight: 600; font-size: 1.0625rem; }

/* Precio */
.price { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 64px; align-items: start; }
@media (min-width: 900px) { .price { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.price-figure { font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 760; letter-spacing: -0.04em; line-height: 1; margin-top: 24px; }
.price-figure small { display: block; font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--ink-2); margin-top: 10px; }

/* Bloque destacado */
.callout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px 40px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-l); background: var(--tint, var(--mist)); }
@media (min-width: 860px) { .callout { grid-template-columns: minmax(0, 1fr) auto; } }
.callout h2, .callout h3 { font-size: clamp(1.375rem, 2.4vw, 1.875rem); margin-bottom: 10px; }
.callout p { margin: 0; color: var(--ink-2); max-width: 44em; }
.callout--gen { --tint: var(--t-gen); }

/* Programas relacionados */
.related { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) { .related { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.related a { display: block; height: 100%; padding: 22px 22px 22px 26px; border: 1px solid var(--line); border-radius: var(--radius-l); text-decoration: none; color: var(--ink); position: relative; background: var(--paper); }
.related a::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 5px; border-radius: 0 3px 3px 0; background: var(--accent); }
.related a:hover { border-color: var(--ink); color: var(--ink); }
.related strong { display: block; font-size: 1.1875rem; margin-bottom: 4px; }
.related span { color: var(--ink-2); font-size: .9375rem; }
.related .program--gen, .related .program--sap, .related .program--code { padding-left: 0; }

/* Barra fija en móvil */
.mobile-cta { display: none; }
@media (max-width: 759px) {
  .mobile-cta { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
  .mobile-cta .btn { flex: 1; min-height: 46px; padding-inline: 10px; }
  body.has-mobile-cta { padding-bottom: 76px; }
}

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #c9cfdb; padding-block: 56px 40px; font-size: .9375rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 48px; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr); } }
.site-footer h2 { font-size: 1rem; color: #fff; letter-spacing: 0; margin-bottom: 12px; font-weight: 650; }
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer p { max-width: 38em; margin: 0; }
.footer-legal a { color: #c9cfdb; }
.footer-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: #9aa3b5; font-size: .875rem; }
.footer-legal p { margin: 0; }

/* ---------- Página legal ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 24px; }
.legal h2 { font-size: 1.375rem; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; margin-bottom: 1em; }
.pending { background: var(--t-code); color: var(--ink); padding: 0 4px; border-radius: 3px; font-weight: 600; }

@media print {
  .site-header, .subnav, .mobile-cta, .lead-form, .site-footer { display: none !important; }
  .faq-item, .module { break-inside: avoid; }
}

/* Utilidades */
[hidden] { display: none !important; }
.section--contact { background: #eceffb; }
.consent .field-error { grid-column: 1 / -1; margin-top: 0; }

/* ---------- Blog ---------- */
.posts { list-style: none; display: grid; gap: 0; max-width: 860px; }
.posts:empty { display: none; }
.posts li { padding-block: 24px; border-top: 1px solid var(--line); }
.posts h3 { font-size: 1.375rem; margin: 4px 0 8px; }
.posts h3 a { color: var(--ink); text-decoration: none; }
.posts h3 a:hover { text-decoration: underline; }
.posts p { margin: 0; color: var(--ink-2); }
.post-meta { font-size: .9375rem; color: var(--ink-3); }
.empty { max-width: 680px; }
.empty h3 { font-size: 1.375rem; margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin-bottom: 20px; }

/* ---------- Portada del blog ---------- */
.blog-hero { padding-bottom: clamp(40px, 6vw, 72px); }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 32px; }
.blog-cats a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 550; font-size: .9375rem; }
.blog-cats a:hover { border-color: var(--ink); color: var(--ink); }
.featured { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .featured { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.featured a { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 24px; border-radius: var(--radius-l); background: var(--mist); color: var(--ink); text-decoration: none; border-top: 5px solid var(--cat); }
.featured a:hover { background: #e8ebf2; color: var(--ink); }
.featured strong { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
.featured span { color: var(--ink-2); font-size: .96875rem; }
.featured .feat-cat { font-size: .875rem; font-weight: 600; color: var(--cat); }
.cat--ia { --cat: #5b34a6; }
.cat--datos { --cat: #1d6b4c; }
.cat--estudiar { --cat: #2c3fb8; }
.posts { grid-template-columns: minmax(0, 1fr); gap: 0 48px; max-width: none; }
@media (min-width: 900px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Artículo ---------- */
.article-head { padding-top: clamp(24px, 4vw, 48px); padding-bottom: 8px; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); font-weight: 730; letter-spacing: -0.028em; line-height: 1.08; max-width: 22ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 20px 0 0; font-size: .9375rem; color: var(--ink-3); }
.article-meta a { color: var(--cat, var(--action)); font-weight: 600; text-decoration: none; }
.article-meta a:hover { text-decoration: underline; }
.article-body { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.72; max-width: 38em; padding: clamp(24px, 4vw, 40px) 0 clamp(40px, 6vw, 72px); }
.article-body > p:first-child { font-size: 1.3125rem; line-height: 1.6; color: var(--ink); }
.article-body p { margin: 0 0 1.1em; }
.article-body h2 { font-family: var(--sans); font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin: 1.9em 0 .6em; }
.article-body h3 { font-family: var(--sans); font-size: 1.25rem; margin: 1.6em 0 .5em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.2em; display: grid; gap: .45em; }
.article-body li::marker { color: var(--ink-3); }
.article-body strong { font-weight: 650; }
.article-body a { color: var(--action); }
.article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--mist); padding: .1em .35em; border-radius: 4px; }
.article-body pre { margin: 0 0 1.4em; padding: 18px 20px; background: #182033; color: #e7ebf3; border-radius: var(--radius-m); overflow-x: auto; font-size: .9rem; line-height: 1.55; }
.article-body pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
.article-body table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .96875rem; line-height: 1.45; min-width: 520px; }
.article-body th, .article-body td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.article-body thead th { background: var(--mist); font-weight: 650; border-bottom: 2px solid var(--line); }
.article-body tbody th, .article-body td:first-child { font-weight: 600; }
.article-cta { font-family: var(--sans); margin: 2.2em 0 0; padding: 22px 24px; background: var(--mist); border-left: 5px solid var(--cta, var(--action)); border-radius: 0 var(--radius-m) var(--radius-m) 0; font-size: 1rem; line-height: 1.55; }
.article-cta p { margin: 0 0 12px; color: var(--ink-2); }
.article-cta .article-cta-title { font-weight: 700; font-size: 1.125rem; color: var(--ink); margin-bottom: 6px; }
.article-cta .btn { color: #fff; text-decoration: none; }
.article-cta--gen { --cta: var(--t-gen-ink); }
.article-cta--sap { --cta: var(--t-sap-ink); }
.article-cta--code { --cta: var(--t-code-ink); }
.article-cta-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.article-cta-list a { font-weight: 600; }
.article-cta-status { margin-bottom: 14px !important; }
.article-faq { max-width: 860px; padding-bottom: clamp(48px, 7vw, 88px); }
.article-faq h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); margin-bottom: 16px; }

/* Índice lateral del artículo */
.article-aside { display: none; }
@media (min-width: 1100px) {
  .article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 72px; align-items: start; }
  .article-aside { display: block; position: sticky; top: calc(var(--header-h) + 32px); padding-top: clamp(24px, 4vw, 40px); }
}
.toc-title { font-weight: 650; font-size: .9375rem; margin: 0 0 10px; }
.toc ul { list-style: none; border-left: 2px solid var(--line); display: grid; gap: 2px; }
.toc a { display: block; margin-left: -2px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: .9375rem; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--cat, var(--action)); font-weight: 600; }
.aside-cta { margin-top: 28px; padding: 18px; border-radius: var(--radius-m); background: var(--mist); border-top: 4px solid var(--cta, var(--action)); }
.aside-cta p { margin: 0 0 12px; font-weight: 650; line-height: 1.3; }
.aside-cta .btn { color: #fff; }
.aside-cta--gen { --cta: var(--t-gen-ink); }
.aside-cta--sap { --cta: var(--t-sap-ink); }
.aside-cta--code { --cta: var(--t-code-ink); }
.post-meta { margin-top: 8px !important; }

/* Ilustración del artículo */
.article-figure { margin: 0 0 1.6em; }
.article-figure img { width: 100%; height: auto; border-radius: var(--radius-l); }

/* ---------- Últimos artículos (home) ---------- */
.news-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(24px, 3vw, 36px); }
.news-head .section-head { margin-bottom: 0; }
.news-nav { display: flex; gap: 8px; }
.news-nav[hidden] { display: none; }
.news-nav button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }
.news-nav button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.news-nav button:disabled { opacity: .35; cursor: default; }
.news-nav svg { width: 18px; height: 18px; }
.news-track { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 4px; }
.news-track::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .news-track { grid-auto-columns: calc((100% - 20px) / 2); } }
@media (min-width: 960px) { .news-track { grid-auto-columns: calc((100% - 40px) / 3); } }
@media (prefers-reduced-motion: reduce) { .news-track { scroll-behavior: auto; } }
.news-track > li { scroll-snap-align: start; }
.news-card { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius-l); background: var(--paper); color: var(--ink); text-decoration: none; overflow: hidden; border: 1px solid var(--line); }
.news-card:hover { color: var(--ink); border-color: var(--ink-3); }
.news-card img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.news-card-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 24px; }
.news-card .feat-cat { font-size: .875rem; font-weight: 600; color: var(--cat); }
.news-card strong { font-size: 1.1875rem; line-height: 1.25; letter-spacing: -0.01em; }
.news-card:hover strong { text-decoration: underline; text-underline-offset: .18em; }
.news-card-body > span:last-child { color: var(--ink-2); font-size: .96875rem; }
.news-more { margin-top: clamp(24px, 3vw, 36px); }

/* Portada del artículo */
.article-hero { margin: clamp(20px, 3vw, 32px) 0 0; }
.article-hero img { width: 100%; height: auto; border-radius: var(--radius-l); border: 1px solid var(--line); }
@media (min-width: 1100px) { .article-hero { max-width: calc(100% - 342px); } }
