/* Tipografía institucional: Source Serif 4 (titulares) + Source Sans 3 (textos). OFL, alojadas en el tema. */
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-latin-ext.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-latin-ext.woff2") format("woff2"); font-weight: 300 800; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* INESIA 2026 — sistema visual.
   Colores tomados del logo: tinta #113045 (texto INESIA), líneas #223948, nodos dorados #C9B38B. */

/* ---------------------------------------------------------------- Fuentes */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-next-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------- Tokens */
:root {
  --ground: #FAF8F3;
  --surface: #FFFFFF;
  --ink: #113045;
  --ink-soft: #3E5466;
  --ink-muted: #5B6D7B;
  --line: #E6E0D3;
  --line-strong: #CFC6B3;
  --gold: #C9A96B;
  --gold-bright: #E9D3A1;
  --gold-soft: #F3EBD8;
  --gold-ink: #7E6026;
  --night: #0D2232;
  --night-2: #17344B;
  --on-night: #EAF0F4;
  --on-night-soft: #A9BCCB;
  --success-bg: #E7F2EA;
  --success-ink: #1D5634;
  --error-bg: #FBEBEA;
  --error-ink: #8B2420;

  --font-display: "Bricolage Grotesque", "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, sans-serif;
  --font-text: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(17, 48, 69, .06);
  --shadow: 0 1px 2px rgba(17, 48, 69, .05), 0 12px 32px -16px rgba(17, 48, 69, .22);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
}

/* ---------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); scrollbar-color: var(--line-strong) var(--ground); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--ink);
}
::selection { background: var(--gold-bright); color: var(--night); }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 650; line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; color: var(--ink); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
ul[class], ol[class], dl[class] { list-style: none; margin: 0; padding: 0; }
dd { margin: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(720px + 2 * var(--gutter)); }
.muted { color: var(--ink-muted); }

/* ---------------------------------------------------------------- Botones y enlaces */
.btn, .btn-enroll-action {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 12px 22px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-family: var(--font-text); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out), box-shadow .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn .icon { transition: transform .25s var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary, .btn-enroll-action.btn-primary {
  background: var(--ink); color: var(--surface);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 6px 18px -8px rgba(17, 48, 69, .55);
}
.btn--primary:hover, .btn-enroll-action.btn-primary:hover { background: var(--night-2); color: var(--surface); text-decoration: none; box-shadow: 0 0 0 4px rgba(201, 169, 107, .28), 0 6px 18px -8px rgba(17, 48, 69, .55); }
.btn--primary:active { transform: translateY(1px); }
.btn-enroll-action.btn-secondary { background: var(--gold-soft); color: var(--ink); border-color: var(--gold); }
.btn-enroll-action.btn-secondary:hover { background: var(--gold-bright); color: var(--ink); }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .95rem; }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }
.btn--block, .enrol .btn-enroll-action { width: 100%; }

.link-quiet { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.link-quiet:hover { text-decoration-color: var(--gold); }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 700; text-decoration: none; color: var(--ink); }
.link-arrow .icon { transition: transform .25s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }
.back-link { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; font-size: .95rem; color: var(--ink-soft); text-decoration: none; }
.back-link::before { content: ""; width: .5em; height: .5em; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: .05em; }
.back-link:hover { color: var(--ink); }

/* ---------------------------------------------------------------- Nivel (tres nodos) */
.level { display: inline-flex; align-items: center; gap: .6em; font-size: .9rem; font-weight: 700; color: var(--ink-soft); }
.level__nodes { display: inline-flex; align-items: center; gap: 5px; }
.level__nodes .level__node { position: relative; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #8A9AA6; background: transparent; }
.level__nodes .level__node + .level__node::before { content: ""; position: absolute; right: 100%; top: 50%; width: 5px; height: 1.5px; background: #8A9AA6; margin-right: 0; transform: translateY(-50%); }
.level__nodes .level__node.is-on { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 3px rgba(201, 169, 107, .22); }
.level__nodes .level__node.is-on + .level__node.is-on::before { background: var(--gold); }

/* ---------------------------------------------------------------- Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -18px rgba(17, 48, 69, .5); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: block; flex: none; margin-right: auto; }
.brand__logo { width: auto; height: 42px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav__list { display: flex; align-items: center; gap: 4px; }
.site-nav__list a { display: block; padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: .98rem; text-decoration: none; color: var(--ink-soft); }
.site-nav__list a:hover { color: var(--ink); background: rgba(17, 48, 69, .05); }
.site-nav__list .current-menu-item > a, .site-nav__list .current_page_item > a { color: var(--ink); background: var(--gold-soft); }
.site-nav__list .menu-item--lang a { font-size: .85rem; padding: 6px 8px; color: var(--ink-muted); }
.site-nav__list .menu-item--lang:first-of-type { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line-strong); }
.site-nav__account { display: flex; align-items: center; gap: 14px; }
.site-nav__user { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--ink-soft); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle__close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: inline; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 16px var(--gutter) 28px; background: var(--ground);
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -28px rgba(17, 48, 69, .5);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s var(--ease-out), transform .25s var(--ease-out), visibility 0s .25s;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .site-nav__list a { padding: 12px 14px; font-size: 1.125rem; border-radius: var(--radius-sm); }
  .site-nav__list .menu-item--lang { display: inline-block; }
  .site-nav__list .menu-item--lang:first-of-type { margin: 8px 0 0; padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .site-nav__account { justify-content: space-between; }
  .brand__logo { height: 36px; }
}

/* ---------------------------------------------------------------- Secciones */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tight { padding-block: clamp(32px, 5vw, 56px) clamp(64px, 8vw, 96px); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 32px; margin-bottom: 32px; }
.section__title { font-size: clamp(2rem, 3.2vw + .5rem, 3rem); }

.page-head { padding-block: clamp(40px, 6vw, 72px) 8px; }
.page-head--compact { padding-bottom: 0; }
.page-head__title { font-size: clamp(2.25rem, 4vw + .5rem, 3.75rem); letter-spacing: -0.03em; max-width: 18ch; }
.page-head__lead { margin-top: 16px; font-size: 1.1875rem; color: var(--ink-soft); max-width: 58ch; }

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; padding-block: clamp(32px, 6vw, 80px) clamp(56px, 8vw, 104px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero__title { font-size: clamp(2.75rem, 5.2vw + .75rem, 5.25rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.035em; max-width: 12ch; font-variation-settings: "opsz" 96; }
.hero__lead { margin-top: 24px; font-size: clamp(1.125rem, .6vw + 1rem, 1.3125rem); color: var(--ink-soft); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }
.hero__note { margin-top: 14px; font-size: .95rem; color: var(--ink-muted); }
.hero__network { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: end; }
.network { position: absolute; inset: 0; width: 100%; height: 100%; }
.network__fallback { position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain; opacity: .95; }
.network.is-ready + .network__fallback { display: none; }

.chooser { margin: 44px 0 0; padding: 0; border: 0; min-width: 0; }
.chooser__legend { padding: 0; margin-bottom: 12px; font-family: var(--font-display); font-weight: 650; font-size: 1.1875rem; letter-spacing: -0.01em; }
.chooser__options { display: flex; flex-wrap: wrap; gap: 10px; }
.chooser__option {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 10px 18px 10px 14px;
  border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font-weight: 700; font-size: .98rem; color: var(--ink); cursor: pointer;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.chooser__option:hover { border-color: var(--gold); }
.chooser__option[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); box-shadow: 0 0 0 4px rgba(201, 169, 107, .25); }
.chooser__option[aria-pressed="true"] .level__node:not(.is-on) { border-color: rgba(234, 240, 244, .5); }
.chooser__option[aria-pressed="true"] .level__node + .level__node::before { background: rgba(234, 240, 244, .5); }
.chooser__result { margin-top: 14px; font-weight: 700; color: var(--ink-soft); min-height: 1.6em; }
.chooser__result a { display: inline-flex; align-items: center; gap: .4em; color: var(--gold-ink); }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__network { order: -1; max-width: 300px; justify-self: start; margin: -8px 0 -16px -12px; }
}

/* ---------------------------------------------------------------- Filtro */
.filter { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.filter__btn { min-height: 38px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; font-weight: 700; font-size: .93rem; color: var(--ink-soft); cursor: pointer; transition: background-color .2s, color .2s; }
.filter__btn:hover { color: var(--ink); background: rgba(17, 48, 69, .05); }
.filter__btn[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.courses__count { font-weight: 700; color: var(--ink-muted); }

/* ---------------------------------------------------------------- Cursos (filas) */
.course-list { display: grid; gap: 16px; }
.course-row {
  position: relative; display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr) auto; gap: 28px; align-items: center;
  padding: 14px 28px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease-out), box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.course-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.course-row[hidden] { display: none; }
.cover { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: var(--night); aspect-ratio: 16 / 9; }
.cover__net, .cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.course-row:hover .cover__net, .course-row:hover .cover__img { transform: scale(1.04); }
.course-row__body { display: grid; gap: 8px; align-content: center; min-width: 0; }
.course-row__title { font-size: clamp(1.25rem, 1vw + .9rem, 1.5rem); letter-spacing: -0.015em; }
.course-row__title a { text-decoration: none; }
.course-row__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.course-row__title a:focus-visible { outline: 0; }
.course-row:has(.course-row__title a:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.course-row__excerpt { color: var(--ink-soft); max-width: 62ch; }
.course-row__meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 4px; font-size: .93rem; color: var(--ink-muted); }
.course-row__meta li { display: inline-flex; align-items: center; gap: 6px; }
.course-row__side { display: grid; justify-items: end; gap: 6px; text-align: right; }
.course-row__price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.course-row__price.is-free { color: var(--gold-ink); }
.course-row__soon { font-size: .85rem; font-weight: 700; color: var(--ink-muted); }
.course-row__side .link-arrow { position: relative; z-index: 1; margin-top: 6px; }
.course-list__empty { padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--ink-soft); }
.course-list__empty a { font-weight: 700; color: var(--gold-ink); }

@media (max-width: 860px) {
  .course-row { grid-template-columns: 1fr; gap: 16px; padding: 12px 12px 20px; }
  .course-row__body, .course-row__side { padding-inline: 8px; }
  .course-row__side { grid-auto-flow: column; justify-content: space-between; align-items: center; text-align: left; }
  .course-row__side .link-arrow { margin-top: 0; }
}

/* ---------------------------------------------------------------- Noche: cómo funciona */
.night { position: relative; background: var(--night); color: var(--on-night); overflow: hidden; isolation: isolate; }
.night::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, rgba(169, 188, 203, .35) 1px, transparent 1.5px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 80% at 85% 10%, #000 10%, transparent 70%);
}
.night .section__title { color: var(--on-night); max-width: 16ch; }
.route { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 72px; counter-reset: step; position: relative; }
.route::before { content: ""; position: absolute; left: 10px; right: 10px; top: 10px; height: 1.5px; background: linear-gradient(90deg, var(--gold) 0%, rgba(201, 169, 107, .35) 100%); }
.route__step { position: relative; padding-top: 44px; counter-increment: step; }
.route__node { position: absolute; top: 0; left: 0; width: 21px; height: 21px; border-radius: 50%; background: var(--night); border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(201, 169, 107, .12), 0 0 22px rgba(233, 211, 161, .45); }
.route__node::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--gold-bright); }
.route__step h3 { color: var(--on-night); font-size: 1.375rem; }
.route__step h3::before { content: counter(step) ". "; color: var(--gold); }
.route__step p { margin-top: 10px; color: var(--on-night-soft); max-width: 34ch; }
@media (max-width: 760px) {
  .route { grid-template-columns: 1fr; gap: 28px; margin-top: 40px; }
  .route::before { left: 10px; right: auto; top: 10px; bottom: 10px; width: 1.5px; height: auto; background: linear-gradient(180deg, var(--gold), rgba(201, 169, 107, .3)); }
  .route__step { padding: 0 0 0 44px; }
}

/* ---------------------------------------------------------------- Principios */
.principles__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.principles__title { font-size: clamp(2.25rem, 3.6vw + .5rem, 3.5rem); letter-spacing: -0.03em; max-width: 11ch; }
.principles__list { display: grid; }
.principles__list > div { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 8px 32px; padding: 22px 0; border-top: 1px solid var(--line-strong); }
.principles__list > div:last-child { border-bottom: 1px solid var(--line-strong); }
.principles__list dt { font-family: var(--font-display); font-weight: 650; font-size: 1.375rem; letter-spacing: -0.015em; }
.principles__list dd { color: var(--ink-soft); }
@media (max-width: 860px) {
  .principles__grid { grid-template-columns: 1fr; }
  .principles__list > div { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Cierre */
.closing { padding-top: 0; }
.closing__inner {
  position: relative; padding: clamp(36px, 6vw, 72px); border-radius: 28px; background: var(--gold-soft); overflow: hidden; isolation: isolate;
}
.closing__inner::after {
  content: ""; position: absolute; z-index: -1; right: -60px; bottom: -80px; width: 380px; aspect-ratio: 1;
  background: url("../img/brain.png") center / contain no-repeat; opacity: .16;
}
.closing__title { font-size: clamp(2rem, 3vw + .5rem, 3rem); letter-spacing: -0.03em; max-width: 16ch; }
.closing__inner > p { margin-top: 14px; font-size: 1.125rem; color: var(--ink-soft); max-width: 48ch; }
.closing__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }

/* ---------------------------------------------------------------- Ficha de curso */
.course-head { padding-block: clamp(28px, 4vw, 48px) clamp(32px, 5vw, 56px); }
.course-head__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.course-head__copy { display: grid; gap: 18px; justify-items: start; }
.course-head__title { font-size: clamp(2.25rem, 3.6vw + .75rem, 3.75rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.course-head__lead { font-size: 1.1875rem; color: var(--ink-soft); max-width: 52ch; }
.course-head__cover { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.course__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(64px, 8vw, 104px); }
.course__section + .course__section { margin-top: 56px; }
.course__section > h2 { font-size: clamp(1.625rem, 1.5vw + 1rem, 2.125rem); margin-bottom: 20px; }
.checklist { display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; }
.checklist .icon { width: 28px; height: 28px; padding: 6px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); stroke-width: 2.5; }
.syllabus { display: grid; gap: 10px; }
.syllabus__item details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.syllabus__item details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.syllabus summary { display: grid; grid-template-columns: 36px 1fr 24px; gap: 14px; align-items: center; padding: 14px 18px; cursor: pointer; list-style: none; border-radius: var(--radius); }
.syllabus summary::-webkit-details-marker { display: none; }
.syllabus summary:hover .syllabus__title { text-decoration: underline; text-decoration-color: var(--gold); }
.syllabus__num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line-strong); font-family: var(--font-display); font-weight: 700; font-size: .95rem; font-variant-numeric: tabular-nums; }
.syllabus details[open] .syllabus__num { border-color: var(--gold); background: var(--gold-soft); }
.syllabus__title { font-weight: 700; line-height: 1.35; }
.syllabus summary .icon { color: var(--ink-muted); transition: transform .3s var(--ease-out); }
.syllabus details[open] summary .icon { transform: rotate(180deg); }
.syllabus__body { padding: 0 18px 18px 68px; color: var(--ink-soft); display: grid; gap: 12px; }
.syllabus__lock { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 700; color: var(--ink-muted); }

.enrol { position: sticky; top: calc(var(--header-h) + 24px); }
.enrol__card { display: grid; gap: 20px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.enrol__price { font-family: var(--font-display); font-weight: 700; font-size: 2.5rem; letter-spacing: -0.03em; line-height: 1; }
.enrol__price.is-free { color: var(--gold-ink); }
.enrol__facts { display: grid; }
.enrol__facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: .97rem; }
.enrol__facts dt { color: var(--ink-muted); }
.enrol__facts dd { font-weight: 700; text-align: right; }
.enrol__note { font-size: .93rem; color: var(--ink-muted); }
@media (max-width: 960px) {
  .course-head__grid, .course__grid { grid-template-columns: 1fr; }
  .course-head__cover { order: -1; }
  .enrol { position: static; order: -1; }
}

/* ---------------------------------------------------------------- Texto largo */
.prose { max-width: 68ch; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin-top: 1.8em; }
.prose h2 { font-size: 1.75rem; }
.prose h3 { font-size: 1.375rem; }
.prose a { color: var(--gold-ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--ink); }
.course__section.prose > h2 { margin-top: 0; }

.reading__head { padding-block: clamp(36px, 5vw, 64px) 24px; display: grid; gap: 14px; justify-items: start; }
.reading__title { font-size: clamp(2.125rem, 3vw + .75rem, 3.25rem); letter-spacing: -0.03em; }
.reading__date { color: var(--ink-muted); font-weight: 700; }
.reading__figure { margin-block: 8px 32px; }
.reading__figure img { border-radius: var(--radius-lg); }
.reading__body { padding-bottom: clamp(64px, 8vw, 104px); }

/* ---------------------------------------------------------------- Noticias */
.news-list { display: grid; }
.news-item { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 8px 32px; padding: 28px 0; border-top: 1px solid var(--line-strong); align-items: start; }
.news-item:last-child { border-bottom: 1px solid var(--line-strong); }
.news-item__date { font-weight: 700; color: var(--ink-muted); font-variant-numeric: tabular-nums; padding-top: .3em; }
.news-item__title { font-size: clamp(1.375rem, 1vw + 1rem, 1.75rem); letter-spacing: -0.02em; }
.news-item__title a { text-decoration: none; }
.news-item__title a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.news-item__excerpt { margin-top: 10px; color: var(--ink-soft); max-width: 64ch; }
.news-item__thumb img { width: 180px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 760px) { .news-item { grid-template-columns: 1fr; } .news-item__thumb { display: none; } }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--ink-soft); }
.pagination .page-numbers.current { background: var(--ink); color: var(--surface); }

/* ---------------------------------------------------------------- Contacto y formularios */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__list { display: grid; gap: 26px; }
.contact__list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.contact__list .icon { width: 44px; height: 44px; padding: 11px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); }
.contact__list div { display: grid; gap: 2px; }
.contact__label { font-size: .88rem; font-weight: 700; color: var(--ink-muted); }
.contact__list a { font-weight: 700; font-size: 1.125rem; text-decoration: none; }
.contact__list a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.contact__sub { font-size: .93rem; color: var(--ink-muted); }
.contact__extra { margin-top: 32px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

.form { display: grid; gap: 20px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.form__title { font-size: 1.625rem; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 8px; }
.field__label { font-weight: 700; font-size: .98rem; }
.field__optional { font-weight: 400; color: var(--ink-muted); }
.field__input, .shop input[type="text"], .shop input[type="email"], .shop input[type="tel"], .shop input[type="password"], .shop select, .shop textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  font: inherit; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
textarea.field__input { min-height: 132px; resize: vertical; }
.field__input::placeholder { color: #7A8A96; }
.field__input:hover { border-color: #B6AC97; }
.field__input:focus, .shop input:focus, .shop select:focus, .shop textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(201, 169, 107, .35); }
.field__input:user-invalid { border-color: var(--error-ink); }
select.field__input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23113045' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
.field--check { grid-template-columns: 22px 1fr; align-items: start; gap: 12px; font-size: .97rem; color: var(--ink-soft); }
.field--check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.field--check a { color: var(--gold-ink); font-weight: 700; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; }
.notice--success { background: var(--success-bg); color: var(--success-ink); }
.notice--error { background: var(--error-bg); color: var(--error-ink); }

.notfound { min-height: 50vh; }
.notfound .closing__actions { margin-top: 28px; }

/* ---------------------------------------------------------------- Tienda (WooCommerce) */
.shop { --wc-primary: var(--ink); color: var(--ink); }
.shop a { color: var(--gold-ink); }
.shop .wc-block-components-button:not(.is-link), .shop .wp-element-button, .shop .button, .shop button[type="submit"] {
  min-height: 48px; padding: 12px 22px; border: 0; border-radius: 999px;
  background: var(--ink) !important; color: var(--surface) !important;
  font-family: var(--font-text); font-weight: 700; text-decoration: none; cursor: pointer;
}
.shop .wc-block-components-button:not(.is-link):hover, .shop .button:hover, .shop button[type="submit"]:hover { background: var(--night-2) !important; box-shadow: 0 0 0 4px rgba(201, 169, 107, .28); }
.shop .wc-block-components-text-input input, .shop .wc-block-components-combobox input, .shop .wc-blocks-components-select select { border-radius: var(--radius-sm) !important; border-color: var(--line-strong) !important; }
.shop .wc-block-components-sidebar, .shop .wp-block-woocommerce-checkout-order-summary-block { border-radius: var(--radius-lg); }
.shop .wc-block-components-title, .shop h2, .shop h3 { font-family: var(--font-display); letter-spacing: -0.015em; }
.shop .woocommerce-MyAccount-navigation ul { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.shop .woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 700; color: var(--ink-soft); text-decoration: none; }
.shop .woocommerce-MyAccount-navigation a:hover { background: rgba(17, 48, 69, .05); color: var(--ink); }
.shop .woocommerce-MyAccount-navigation .is-active a { background: var(--gold-soft); color: var(--ink); }
@media (min-width: 861px) {
  .shop .woocommerce:has(.woocommerce-MyAccount-navigation) { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
}
.shop .woocommerce-MyAccount-content { min-width: 0; }
.shop .inesia-mis-cursos li { border-color: var(--line) !important; }
.shop .woocommerce-message, .shop .woocommerce-info, .shop .woocommerce-error { list-style: none; padding: 14px 16px; margin: 0 0 20px; border-radius: var(--radius-sm); background: var(--gold-soft); color: var(--ink); border: 0; }
.shop .woocommerce-error { background: var(--error-bg); color: var(--error-ink); }
.shop .woocommerce-message, .shop .woocommerce-info, .shop .woocommerce-error { position: relative; padding-left: 3em; }
/* El icono de WooCommerce va en posición absoluta: se alinea con la primera línea dentro del hueco reservado */
.shop .woocommerce-message::before, .shop .woocommerce-info::before, .shop .woocommerce-error::before { top: 14px; left: 1.05em; line-height: 1.6; color: var(--gold-ink); }
.shop .woocommerce-error::before { color: var(--error-ink); }
.shop .woocommerce-message .button, .shop .woocommerce-info .button { float: right; margin: -4px 0 0 16px; }
/* Avisos de los bloques (carrito, checkout y toasts): el icono no se encoge ni se monta sobre el texto */
.wc-block-components-notice-banner { display: flex; align-items: flex-start; gap: 12px; }
.wc-block-components-notice-banner > svg { flex: none; width: 24px; height: 24px; margin: 0; }
.wc-block-components-notice-banner > .wc-block-components-notice-banner__content { flex: 1 1 auto; min-width: 0; }
.shop .woocommerce-form-login, .shop .woocommerce-form-register { max-width: 460px; display: grid; gap: 14px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.shop table { width: 100%; border-collapse: collapse; }
.shop table th, .shop table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }

/* ---------------------------------------------------------------- Pie */
.site-footer { background: var(--night); color: var(--on-night-soft); margin-top: 0; }
.site-footer a { color: var(--on-night); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.site-footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-block: 64px 48px; }
.site-footer__brain { width: 64px; height: 64px; margin-bottom: 14px; padding: 6px; border-radius: 18px; background: var(--on-night); }
.site-footer__name { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .02em; color: var(--on-night); }
.site-footer__tagline { margin-top: 8px; max-width: 32ch; font-size: .97rem; }
.site-footer__title { font-family: var(--font-text); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.site-footer__links { display: grid; gap: 8px; font-size: .97rem; }
.site-footer__links .menu-item--lang { display: none; }
.site-footer__funding { background: var(--surface); }
.site-footer__funding-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px 40px; padding-block: 22px; }
.site-footer__funding-row img { height: 44px; width: auto; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 22px 28px; font-size: .88rem; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 6px 22px; }
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } .site-footer__funding-row img { height: 36px; } }

/* ---------------------------------------------------------------- Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------------------------------------------------------------- Ajustes tras la revisión */
/* Nivel dentro de la fila de datos (no como etiqueta sobre el título) */
.course-row__meta .level { font-size: inherit; color: var(--ink-soft); }
.course-head__meta { margin-top: 2px; font-size: .97rem; }

/* El listado empieza a asomar en el primer pantallazo, para que el filtro del selector se vea actuar */
.hero { padding-bottom: clamp(24px, 3vw, 40px); }
.section.courses { padding-top: clamp(24px, 3vw, 40px); }

/* Filtro de nivel: en pantallas estrechas se desliza en horizontal en vez de partirse */
@media (max-width: 560px) {
  .filter { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .filter::-webkit-scrollbar { display: none; }
  .filter__btn { flex: none; }
}

/* WooCommerce clásico (acceso / registro / Mi cuenta): mismos campos que el resto del sitio */
.shop .woocommerce form .form-row input.input-text,
.shop .woocommerce form .form-row textarea,
.shop .woocommerce form .form-row select {
  min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font: inherit; color: var(--ink);
}
.shop .woocommerce form .form-row input.input-text:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(201, 169, 107, .35); }
.shop .woocommerce form .form-row label { font-weight: 700; margin-bottom: 6px; display: block; }
.shop .woocommerce form .password-input { position: relative; display: block; }
.shop .woocommerce form .show-password-input {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6D7B' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 20px;
}
.shop .woocommerce form .show-password-input::after { display: none; }
.shop .woocommerce form .show-password-input.display-password { background-color: var(--gold-soft); }
.shop .woocommerce-form-login .woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; gap: 10px; font-weight: 400; }
.shop .woocommerce-form-login input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ink); }
.shop .woocommerce-form-login .lost_password a { font-weight: 700; }
.shop .woocommerce-form-login, .shop .woocommerce-form-register { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* Resumen del pedido: sin la imagen gris de "sin foto" de WooCommerce */
.shop .wc-block-components-order-summary-item__image:has(img[src*="placeholder"]) { display: none; }
.shop .wc-block-components-order-summary-item:has(img[src*="placeholder"]) { grid-template-columns: 0 1fr auto; }
.shop .woocommerce form.woocommerce-form-login, .shop .woocommerce form.woocommerce-form-register { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; margin: 0; }
.shop .woocommerce > h2 { margin-bottom: 20px; }
.shop .wc-block-components-order-summary-item:has(img[src*="placeholder"]) { display: flex; gap: 12px; }
.shop .wc-block-components-order-summary-item:has(img[src*="placeholder"]) .wc-block-components-order-summary-item__description { padding-left: 0; flex: 1; }

/* ---------------------------------------------------------------- Hero a todo el ancho (máx. 1960px) */
.hero .wrap.hero__grid { max-width: 1960px; }
/* Más aire a la izquierda del texto en pantallas anchas; en móvil se queda el margen normal */
/* Cabecera, hero y pie comparten un borde exterior que crece con la pantalla */
@media (min-width: 861px) {
  :root { --edge: calc(var(--gutter) + clamp(16px, 11vw - 70px, 240px)); }
  .hero .wrap.hero__grid { padding-left: var(--edge); }
  .site-header__inner.wrap, .site-footer .wrap { max-width: 1960px; padding-inline: calc(var(--edge) + clamp(0px, 3vw, 64px)); }
}

/* ---------------------------------------------------------------- Filtro inteligente por nivel (cursos) */
.courses .section__head { align-items: end; }
.level-filter { display: grid; gap: 10px; }
.level-filter__label { margin: 0; font-family: var(--font-display); font-weight: 650; font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--ink); }
.level-filter__options { display: flex; flex-wrap: wrap; gap: 8px; }
.level-filter__btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px 8px 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink); cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}
.level-filter__btn:hover { border-color: var(--gold); }
.level-filter__level { font-weight: 600; font-size: .82rem; color: var(--ink-muted); }
.level-filter__count {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  background: rgba(17, 48, 69, .07); font-size: .8rem; color: var(--ink-soft);
}
.level-filter__btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); box-shadow: 0 0 0 4px rgba(201, 169, 107, .25); }
.level-filter__btn[aria-pressed="true"] .level-filter__level { color: rgba(234, 240, 244, .7); }
.level-filter__btn[aria-pressed="true"] .level-filter__count { background: rgba(234, 240, 244, .16); color: var(--surface); }
.level-filter__btn[aria-pressed="true"] .level__node:not(.is-on) { border-color: rgba(234, 240, 244, .5); }
.level-filter__btn[aria-pressed="true"] .level__node + .level__node::before { background: rgba(234, 240, 244, .5); }
@media (max-width: 600px) {
  .level-filter__options { display: grid; grid-template-columns: 1fr; }
  .level-filter__btn { justify-content: flex-start; border-radius: var(--radius); }
  .level-filter__count { margin-left: auto; }
}

/* ---------------------------------------------------------------- Marca (red neuronal) */
.mark { display: block; overflow: visible; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); --mark-node: var(--ink); --mark-line: #5D7C93; --mark-gold: var(--gold); }
.brand:hover { text-decoration: none; }
.brand__mark { height: 42px; width: auto; flex: none; }
.brand__text { display: grid; gap: 4px; }
.brand__sub { font-family: var(--font-display); font-weight: 650; font-size: 9.5px; line-height: 1.15; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-soft); }
.brand__name { font-family: var(--font-display); font-weight: 750; font-size: 25px; line-height: .95; letter-spacing: .07em; }
@media (max-width: 960px) {
  .brand__mark { height: 36px; }
  .brand__sub { font-size: 8px; }
  .brand__name { font-size: 21px; }
}

.site-footer__mark { width: 128px; height: auto; margin-bottom: 16px; --mark-node: #9CB4C6; --mark-line: #3E5F78; --mark-gold: var(--gold-bright); }

/* ---------------------------------------------------------------- Cierre: panel nocturno con la red */
.closing__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title mark" "text mark" "actions mark";
  column-gap: clamp(24px, 5vw, 72px); align-items: center;
  background: var(--night); color: var(--on-night);
}
.closing__inner::after { content: none; }
.closing__inner::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .45;
  background-image: radial-gradient(circle at 1px 1px, rgba(169, 188, 203, .35) 1px, transparent 1.5px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 60% 90% at 80% 50%, #000 10%, transparent 70%);
}
.closing__title { grid-area: title; color: var(--on-night); }
.closing__inner > p { grid-area: text; color: var(--on-night-soft); }
.closing__actions { grid-area: actions; }
.closing__mark {
  grid-area: mark; width: clamp(220px, 26vw, 380px); height: auto;
  --mark-node: #9CB4C6; --mark-line: #3E5F78; --mark-gold: var(--gold-bright);
  filter: drop-shadow(0 0 22px rgba(233, 211, 161, .18));
}
.closing .btn--primary { background: var(--gold-bright); color: var(--night); box-shadow: 0 0 0 1px rgba(233, 211, 161, .4), 0 10px 40px -10px rgba(233, 211, 161, .5); }
.closing .btn--primary:hover { background: #F4E4BE; color: var(--night); }
.closing .link-quiet { color: var(--on-night); text-decoration-color: rgba(234, 240, 244, .35); }
.closing .link-quiet:hover { text-decoration-color: var(--gold-bright); }
.closing :focus-visible { outline-color: var(--gold-bright); }
@media (max-width: 760px) {
  .closing__inner { grid-template-columns: 1fr; grid-template-areas: "mark" "title" "text" "actions"; }
  .closing__mark { width: 180px; margin-bottom: 20px; }
}

/* ---------------------------------------------------------------- Marca: rutas doradas vivas (main.js) */
.mark { --mark-spark: #F6E2B0; }
.site-header.is-dark .brand, .closing__mark, .site-footer__mark { --mark-spark: #FFF8E8; }
.cover__net { --mark-line: #5B7488; --mark-node: #7F96A8; --mark-gold: #E9D3A1; --mark-spark: #FFF8E8; overflow: hidden; }
.mark__live circle { transform-box: fill-box; transform-origin: center; }

/* ---------------------------------------------------------------- Carrito en la cabecera */
.site-nav__cart { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; transition: background-color .2s, color .2s; }
.site-nav__cart:hover { color: var(--ink); background: rgba(17, 48, 69, .06); text-decoration: none; }
.site-nav__cart .icon { width: 23px; height: 23px; }
.site-nav__cart-count {
  position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; background: var(--gold); color: var(--night); font-size: .72rem; font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 2px var(--ground);
}
.site-nav__cart-count[data-count="0"] { display: none; }
.site-header.is-dark .site-nav__cart { color: var(--on-night-soft); }
.site-header.is-dark .site-nav__cart:hover { color: var(--on-night); background: rgba(234, 240, 244, .08); }
.site-header.is-dark .site-nav__cart-count { background: var(--gold-bright); box-shadow: 0 0 0 2px var(--night); }

/* ---------------------------------------------------------------- Precio de las filas de curso: columna fija, a la derecha y centrada en vertical */
@media (min-width: 861px) {
  .course-row { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr) 150px; }
  .course-row__side { align-self: center; justify-items: end; text-align: right; }
  .course-row__price { line-height: 1.1; }
}

/* ---------------------------------------------------------------- Ficha de curso: también te puede interesar */
.related { border-top: 1px solid var(--line); }
.related__title { font-size: clamp(1.75rem, 2vw + .75rem, 2.375rem); margin-bottom: 28px; }

/* ---------------------------------------------------------------- Hero institucional */
.hero__brand { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.seal { display: block; flex: none; color: var(--ink); --mark-node: var(--ink); --mark-line: #5D7C93; --mark-gold: var(--gold); }
.hero__seal { width: 92px; height: 92px; }
.hero__kicker { margin: 0; display: grid; gap: 2px; line-height: 1.2; }
.hero__kicker strong { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .22em; color: var(--ink); }
.hero__kicker span { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.hero__title--inst { max-width: 15ch; font-size: clamp(2.6rem, 4vw + .6rem, 4.6rem); }
.hero__facts { list-style: none; margin: 30px 0 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); }
.hero__facts strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); margin-right: 2px; }
.hero--3d .seal { color: var(--on-night); --mark-node: #C9D7E2; --mark-line: #6F8FA6; --mark-gold: var(--gold-bright); --mark-spark: #FFF8E8; }
.hero--3d .hero__kicker strong { color: var(--on-night); }
.hero--3d .hero__kicker span { color: var(--gold-bright); }
.hero--3d .hero__title--inst { font-size: clamp(2.6rem, 3.8vw + .6rem, 4.6rem); max-width: 14ch; }
.hero--3d .hero__facts { border-top-color: rgba(234, 240, 244, .16); color: var(--on-night-soft); }
.hero--3d .hero__facts strong { color: var(--gold-bright); }
@media (max-width: 860px) {
  .hero__seal { width: 72px; height: 72px; }
  .hero__brand { margin-bottom: 16px; }
  .hero__facts { margin-top: 22px; gap: 8px 20px; font-size: .9rem; }
}

/* ---------------------------------------------------------------- Pedido recibido */
.woocommerce-order-received .page-head__title { font-size: clamp(1.9rem, 2.2vw + 1rem, 3rem); max-width: 28ch; }
.woocommerce-thankyou-order-received { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; font-size: 1.1rem; }

.hero .hero__facts { margin-top: 40px; }
@media (max-width: 860px) { .hero .hero__facts { margin-top: 28px; } }

/* Móvil: la columna del hero no puede ser más ancha que la pantalla */
.hero__grid > * { min-width: 0; }
.hero__kicker span { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .hero__kicker span { letter-spacing: .08em; font-size: .72rem; }
  .hero__actions { flex-wrap: wrap; }
  .hero--3d .hero__title--inst { font-size: clamp(2.2rem, 9vw, 3rem); }
}

/* Hero: «INESIA.» destacado delante del nombre del instituto */
.hero__acronym, .hero__title .word--accent > span { color: var(--gold-ink); letter-spacing: .02em; }
.hero--3d .hero__acronym, .hero--3d .hero__title .word--accent > span { color: var(--gold-bright); }
.hero .hero__title--inst { max-width: 16ch; }

/* ---------------------------------------------------------------- Tipografía institucional (sustituye a Bricolage/Atkinson) */
:root {
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-text: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
.hero__title, .hero .hero__title--inst { font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; font-variation-settings: "opsz" 60; }
.section__title, .page-head__title, .closing__title { letter-spacing: -0.012em; }
.brand__name { font-weight: 700; letter-spacing: .1em; }
.brand__sub { font-family: var(--font-text); font-weight: 700; letter-spacing: .06em; }
.course-row__price, .enrol__price { font-family: var(--font-text); font-weight: 700; letter-spacing: -0.01em; }
.btn { font-family: var(--font-text); }

/* Hero: línea separadora a todo el ancho del contenido (mismos márgenes laterales que el texto) */
.hero__rule { grid-column: 1 / -1; align-self: end; width: 100%; height: 0; margin: clamp(32px, 4vw, 56px) 0 0; border: 0; border-top: 1px solid var(--line); }
.hero--3d .hero__rule { border-top-color: rgba(234, 240, 244, .16); }
@media (min-width: 861px) { .hero__rule { width: auto; margin-right: clamp(16px, 5vw, 112px); } }

/* ---------------------------------------------------------------- Tipografía: sans serif en negrita (sustituye a la serif) */
:root { --font-display: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.015em; }
.section__title, .page-head__title, .closing__title { font-weight: 800; letter-spacing: -0.02em; }
.brand__name { font-weight: 800; letter-spacing: .08em; }

/* ---------------------------------------------------------------- Hero: titular institucional */
.hero .hero__title--inst {
  max-width: none; font-weight: 800; letter-spacing: -0.025em; line-height: 1.02;
  /* «Inteligencia Artificial» (la línea más larga) ocupa como mucho la mitad de la pantalla */
  font-size: clamp(2.4rem, 4.6vw, 6rem); font-variation-settings: normal;
}
.hero__line { display: block; white-space: nowrap; }
.hero__acronym, .hero--3d .hero__acronym, .hero__title .word--accent > span, .hero--3d .hero__title .word--accent > span { color: inherit; letter-spacing: inherit; }
.hero .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) {
  .hero .hero__grid { grid-template-columns: 1fr; }
  .hero .hero__title--inst { font-size: clamp(2.1rem, 9.4vw, 3.4rem); }
  .hero__line { white-space: normal; }
}

/* "Empieza gratis" sin halo */
.hero .btn--primary, .hero .btn--primary:hover, .hero--3d .btn--primary, .hero--3d .btn--primary:hover { box-shadow: none; }

/* ---------------------------------------------------------------- Cabecera: inscripción a medias */
.site-nav__pending { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; font-weight: 700; font-size: .95rem; color: var(--ink); text-decoration: none; }
.site-nav__pending:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .3em; }
.site-nav__pending-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.site-header.is-dark .site-nav__pending { color: var(--on-night); }
.site-header.is-dark .site-nav__pending-dot { background: var(--gold-bright); }

/* Móvil: título de Cursos y filtro de nivel apilados a todo el ancho */
@media (max-width: 600px) {
  .courses .section__head { flex-direction: column; align-items: stretch; }
  .courses .level-filter { width: 100%; }
}

/* ---------------------------------------------------------------- Revisión de apartados (2026-11-04) */
/* "Del primer clic…": ol[class] anulaba el margen; separa el título de la línea de pasos */
.night .route { margin-top: clamp(40px, 5vw, 72px); }
/* Panel de cierre: nunca pegado a los bordes de la pantalla */
.closing__inner.wrap { width: calc(100% - 2 * var(--gutter)); max-width: 1200px; }
/* Noticia: el cuerpo alineado con el título y del mismo ancho */
.reading__body.prose { max-width: calc(720px + 2 * var(--gutter)); }
.prose blockquote { margin: 1.6em 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; }

/* ---------------------------------------------------------------- Portada: Actualidad (3 últimas noticias, en lista como /noticias/) */
.section.home-news { padding-block: clamp(56px, 6vw, 96px) clamp(40px, 5vw, 72px); }
.home-news__inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title more" "list list";
  align-items: end; column-gap: 32px;
}
.home-news__title { grid-area: title; }
.home-news__more { grid-area: more; justify-self: end; }
.news-rows { grid-area: list; list-style: none; margin: clamp(20px, 2.5vw, 32px) 0 0; padding: 0; display: grid; gap: 6px; }
.news-row {
  position: relative; display: grid; grid-template-columns: 10rem minmax(0, 1fr) auto; column-gap: clamp(24px, 3vw, 48px); align-items: start;
  margin-inline: -24px; padding: 26px 24px; border-radius: var(--radius-lg);
  transition: background-color .25s var(--ease-out);
}
.news-row.has-thumb { grid-template-columns: 10rem minmax(0, 1fr) 168px auto; }
.news-row:hover { background: var(--gold-soft); }
.news-row__date { padding-top: .3em; font-weight: 700; color: var(--gold-ink); font-variant-numeric: tabular-nums; }
.news-row__title { max-width: 60ch; font-size: clamp(1.3rem, .8vw + 1rem, 1.625rem); line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.news-row__title a { color: var(--ink); text-decoration: none; }
.news-row__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.news-row__title a:focus-visible { outline: 0; }
.news-row:has(.news-row__title a:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.news-row__excerpt {
  max-width: 76ch; margin-top: 8px; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-row__thumb img { display: block; width: 168px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.news-row__go {
  align-self: center; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; color: var(--ink);
  transition: transform .35s var(--ease-out), background-color .25s var(--ease-out);
}
.news-row:hover .news-row__go { transform: translateX(4px); background: var(--surface); }
@media (max-width: 760px) {
  .home-news__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "list" "more"; }
  .home-news__more { justify-self: stretch; margin-top: 24px; }
  .news-row, .news-row.has-thumb { grid-template-columns: minmax(0, 1fr); row-gap: 6px; margin-inline: -16px; padding: 20px 16px; }
  .news-row__date { padding-top: 0; font-size: .95rem; }
  .news-row__go, .news-row__thumb { display: none; }
}
@media (prefers-reduced-motion: reduce) { .news-row:hover .news-row__go { transform: none; } }

/* ---------------------------------------------------------------- Portada: cursos en cuadrícula de 3 */
.course-list--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.course-list--grid .course-row,
.v-3d .course-list--grid .course-row { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: 16px; align-items: stretch; padding: 12px 12px 18px; }
.course-list--grid .course-row__body { align-content: start; padding-inline: 8px; }
.course-list--grid .course-row__excerpt { max-width: none; }
.course-list--grid .course-row__side {
  grid-auto-flow: column; justify-content: space-between; align-items: center; justify-items: start; text-align: left;
  margin-inline: 8px; padding-top: 14px; border-top: 1px solid var(--line);
}
.course-list--grid .course-row__side .link-arrow { margin-top: 0; }
.course-list--grid .course-list__empty { grid-column: 1 / -1; }

@media (max-width: 1024px) {
  .course-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .course-list--grid { grid-template-columns: 1fr; }
}
