/* ==========================================================================
   Oposan · Estilos de la web pública
   Estilo A (institucional) con detalles del B: ficha de datos y subrayado.
   ========================================================================== */

/* ---- Fuentes (servidas desde la propia web) ---- */
@font-face {
  font-family: "Public Sans";
  src: url("../fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --blue: #0768A9;        /* Azul Canarias: botones, enlaces */
  --blue-dark: #055385;   /* Hover de botones */
  --navy: #0F2A44;        /* Títulos */
  --yellow: #FFCC00;      /* Amarillo Canarias: solo detalles, nunca texto */
  --ink: #1B2733;         /* Texto */
  --muted: #52606D;       /* Texto secundario */
  --line: #D9E1E8;        /* Bordes */
  --soft: #EAEFF4;        /* Secciones alternas */
  --white: #FFFFFF;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 3px;
  --wrap: 1120px;
  --header-h: 72px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; border-radius: var(--radius); }
.skip-link:focus { top: 12px; color: #fff; }

/* Secciones: dejan hueco para el menú fijo al saltar desde el menú */
section[id], [id].scroll-target { scroll-margin-top: calc(var(--header-h) + 12px); }
.section { padding-block: 80px; }
.section--soft { background: var(--soft); }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; max-width: 70ch; }
.section-head p { color: var(--muted); }
.kicker {
  font: 600 13px/1.3 var(--sans);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--blue);
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); }
@media (max-width: 560px) {
  /* Móvil: títulos de sección siempre por debajo del título de la portada */
  .section-head h2 { font-size: 28px; }
}
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 4px; background: var(--yellow); margin-top: 16px;
}

/* Subrayado amarillo para una frase clave */
.mark { background: linear-gradient(transparent 60%, var(--yellow) 60%); padding-inline: 2px; }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 16px/1 var(--sans);
  padding: 15px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--blue);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn--secondary { background: #fff; color: var(--blue); }
.btn--secondary:hover { background: var(--soft); color: var(--blue-dark); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Cabecera ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  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 { display: block; flex: none; }
.brand img { height: 40px; width: auto; }
@media (max-width: 380px) { .brand img { height: 32px; } .header-cta { padding: 9px 11px; font-size: 14px; } }
.header-cta { display: none; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 11px; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 22px; height: 22px; }
.site-nav ul { display: flex; align-items: center; gap: 4px 22px; list-style: none; }
.site-nav a { color: #3E4C59; text-decoration: none; font-size: 15px; font-weight: 500; padding-block: 6px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav .nav-cta { background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--radius); font-weight: 600; }
.site-nav .nav-cta:hover { background: var(--blue-dark); color: #fff; }

@media (max-width: 900px) {
  .header-cta {
    display: inline-flex; margin-left: auto;
    background: var(--blue); color: #fff; text-decoration: none;
    font-weight: 600; font-size: 15px; padding: 10px 14px; border-radius: var(--radius);
  }
  .header-cta:hover { background: var(--blue-dark); color: #fff; }
  .site-header .wrap { gap: 10px; }
  .site-nav li:has(.nav-cta) { display: none; }
  .nav-toggle { display: inline-flex; flex: none; }
  .header-cta { flex: none; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(15, 42, 68, .08);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 20px; }
  .site-nav li a { display: block; padding: 12px 0; border-bottom: 1px solid var(--soft); font-size: 17px; }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav .nav-cta { margin-top: 12px; text-align: center; padding: 14px 16px; }
}

/* ---- Portada ---- */
/* Mismo espacio (72px) sobre la portada, entre la foto y las cifras, y bajo las cifras */
.hero { padding-block: 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: center; }
.hero-inner { display: grid; gap: 22px; }
.hero-photo { margin: 0; position: relative; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #C3D1DE; }
/* Oscurece un poco la esquina superior derecha (reflejo del sol) para que la foto no se funda con el fondo blanco */
.hero-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, rgba(15, 42, 68, .26) 0%, rgba(15, 42, 68, 0) 55%);
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { display: none; }
}
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.12; }
.hero-lead { font-size: 19px; color: #3E4C59; max-width: 60ch; }
.lead-short { display: none; }
@media (max-width: 900px) {
  .br-desktop, .lead-long { display: none; }
  .lead-short { display: inline; }
}
/* Móvil: título de la portada a 34px */
@media (max-width: 560px) {
  .hero h1 { font-size: 34px; }
}
@media (max-width: 560px) { .hero .btn-row .btn { flex: 1 1 100%; } }
.stats { margin-top: 72px; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--soft); border-top: 3px solid var(--yellow); padding: 22px 24px 24px; display: grid; gap: 6px; align-content: start; }
.stat b { font: 600 32px/1 var(--serif); color: var(--navy); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.stat strong { font-weight: 600; color: var(--navy); line-height: 1.35; }
.stat span { font-size: 15px; color: var(--muted); line-height: 1.45; }
@media (max-width: 700px) {
  .stats { grid-template-columns: 1fr; gap: 10px; margin-top: 72px; }
  .stat { grid-template-columns: 100px 1fr; column-gap: 14px; row-gap: 2px; align-items: center; padding: 16px; }
  .stat b { grid-row: span 2; font-size: 32px; margin: 0; }
}

/* ---- Oposiciones ---- */
/* Al abrir una tarjeta en escritorio, ocupa casi todo el ancho y la otra se estrecha a un lado */
.opos-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch;
}
.opos-grid[data-open="0"] { grid-template-columns: minmax(0, 1fr) 200px; align-items: start; }
.opos-grid[data-open="1"] { grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
/* Animación al abrir, cerrar o cambiar de tarjeta (View Transitions):
   cada tarjeta y el bloque de debajo se mueven y cambian de tamaño de forma continua.
   Las imágenes no se estiran: se recortan desde arriba a la izquierda mientras crecen. */
#a2-industrial { view-transition-name: opo-a2; }
#a1-industrial { view-transition-name: opo-a1; }
.includes { view-transition-name: opo-includes; }
::view-transition-group(opo-a2), ::view-transition-group(opo-a1), ::view-transition-group(opo-includes) {
  animation-duration: .4s; animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}
::view-transition-image-pair(opo-a2), ::view-transition-image-pair(opo-a1) { overflow: hidden; }
::view-transition-old(opo-a2), ::view-transition-new(opo-a2),
::view-transition-old(opo-a1), ::view-transition-new(opo-a1) {
  inline-size: auto; block-size: auto; /* tamaño natural, recortado por el contenedor */
}
/* El estado anterior desaparece rápido y el nuevo aparece un poco más despacio, sin texto doble */
::view-transition-old(opo-a2), ::view-transition-old(opo-a1) { animation-duration: .15s; }
::view-transition-new(opo-a2), ::view-transition-new(opo-a1) { animation-duration: .3s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

.opo { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.opo-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); flex: 1; }
.opo-code {
  background: var(--blue); color: #fff; border-bottom: 4px solid var(--yellow);
  display: grid; align-content: center; justify-items: center; gap: 4px; padding: 20px 8px;
}
.opo-code > span { font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.opo-code b { font: 600 50px/1 var(--serif); }
.opo-body { padding: 22px 24px 18px; display: grid; gap: 8px; align-content: start; }
.opo-tag { font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.opo h3 { font-size: 24px; }
.opo-desc { color: #3E4C59; font-size: 16px; }
.badge {
  justify-self: start;
  font: 600 12px/1 var(--sans); letter-spacing: .04em;
  padding: 6px 10px; border-radius: 999px;
  background: #fff; color: var(--navy); border: 1px solid var(--line);
}

/* Ficha de datos (detalle del estilo B) */
.spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); margin: 0; }
.spec div { padding: 12px 16px; border-right: 1px solid var(--line); min-width: 0; }
.spec div:last-child { border-right: 0; }
.spec dt { font: 600 11px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #6A7784; }
.spec dd { margin: 2px 0 0; font: 500 15px/1.35 var(--mono); color: var(--navy); }

/* Botón "Ver detalles" */
.opo-foot { padding: 16px 24px 20px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
.opo-foot-title { display: none; margin: 0; min-width: 0; font: 600 17px/1.3 var(--serif); color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opo-foot-title b { font-weight: 600; color: var(--blue); margin-right: 4px; }
.opo-sentinel { height: 0; }
/* Tarjeta abierta: la barra del botón se queda fija bajo el menú al hacer scroll,
   y al quedarse fija muestra el nombre de la oposición */
.opo { scroll-margin-top: calc(var(--header-h) + 16px); }
.opo-head { display: flex; flex-direction: column; flex: 1; }
/* Escritorio: toda la cabecera de la tarjeta abierta (con el cuadro azul del grupo)
   se queda fija a la misma altura que la tarjeta estrechada de al lado */
@media (min-width: 801px) {
  /* Tarjeta abierta: la cabecera se reduce a la altura del cuadro azul.
     La ficha (turno, plazas, convocatoria) se oculta porque ya está en los detalles,
     y el botón "Ocultar detalles" sube a la derecha del nombre. */
  .opo.is-open .opo-head { display: grid; grid-template-columns: 116px minmax(0, 1fr) auto; align-items: stretch; }
  .opo.is-open .opo-row { display: contents; }
  .opo.is-open .spec { display: none; }
  .opo.is-open .opo-sentinel { display: none; }
  .opo.is-open .opo-foot { grid-column: 3; grid-row: 1; border-top: 0; padding: 0 24px; align-self: center; }
  .opo.is-open .opo-toggle { white-space: nowrap; }
  .opo.is-open .opo-head {
    position: sticky; top: calc(var(--header-h) + 16px); z-index: 5; background: #fff;
    /* tapa el hueco de 16px sobre la cabecera para que el texto no asome por encima */
    box-shadow: 0 -16px 0 1px var(--soft), 0 10px 18px -12px rgba(15, 42, 68, .3);
  }
}
/* Móvil: solo la barra del botón se queda fija, y al quedarse fija muestra el nombre */
@media (max-width: 800px) {
  .opo-head { display: contents; }
  .opo.is-open .opo-foot { position: sticky; top: var(--header-h); z-index: 5; background: #fff; }
  /* La ficha se oculta al abrir (los datos están en los detalles): la barra queda más arriba y se fija antes */
  .opo.is-open .spec { display: none; }
  .opo.is-open .opo-foot.is-stuck { background: var(--blue); border-top-color: var(--blue); box-shadow: 0 8px 16px -8px rgba(15, 42, 68, .45); padding-block: 12px; }
  .opo.is-open .opo-foot.is-stuck .opo-foot-title { display: block; flex: 1; order: -1; color: #fff; }
  .opo.is-open .opo-foot.is-stuck .opo-foot-title b { color: #fff; }
}
@media (max-width: 560px) {
  .opo.is-open .opo-foot.is-stuck { gap: 10px; padding: 10px 14px; }
  .opo.is-open .opo-foot.is-stuck .opo-foot-title { white-space: normal; font-size: 15px; line-height: 1.25; }
  .opo.is-open .opo-foot.is-stuck .opo-toggle { font-size: 14px; padding: 10px 12px; flex: none; }
}
/* Amarillo relleno: se usa solo para abrir y cerrar tarjetas ("amarillo = ver más") */
.opo-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font: 600 15px/1 var(--sans); padding: 12px 18px; border-radius: var(--radius);
  background: var(--yellow); color: var(--navy); border: 1.5px solid var(--yellow);
  transition: background-color .15s, border-color .15s;
}
.opo-toggle:hover { background: #F2BF00; border-color: #F2BF00; }
.opo-toggle:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.opo-toggle svg { width: 18px; height: 18px; transition: transform .2s; }
.opo.is-open .opo-toggle svg { transform: rotate(180deg); }

/* Detalles: ocultos solo cuando hay JavaScript (sin él se ven siempre) */
.opo-detail { padding: 28px 24px 32px; display: grid; gap: 32px; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.js .opo-detail { display: none; }
.js .opo.is-open .opo-detail { display: grid; }
.opo-detail h4 { font-size: 20px; margin-bottom: 10px; }
.opo-detail .full { grid-column: 1 / -1; }
.opo-detail p + p { margin-top: 10px; }
.opo-detail .note { font-size: 15px; color: var(--muted); }
.def { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 16px; }
.def dt { color: var(--muted); }
.def dd { margin: 0; }
.steps { list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.steps li::before {
  content: counter(step);
  font: 600 18px/34px var(--serif); text-align: center; color: var(--navy);
  width: 34px; height: 34px; border: 1px solid var(--line); background: var(--soft);
}
.steps b { display: block; color: var(--navy); }
.steps span { font-size: 15px; color: var(--muted); }
.ticks { list-style: none; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .55em;
  width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue);
  transform: rotate(-45deg);
}

/* Tarjeta estrechada (la otra, cuando una está abierta en escritorio) */
@media (min-width: 801px) {
  .opo.is-mini { position: sticky; top: calc(var(--header-h) + 16px); }
  .opo.is-mini .opo-row { grid-template-columns: 1fr; }
  .opo.is-mini .opo-code { padding: 24px 8px; }
  .opo.is-mini .badge, .opo.is-mini .opo-desc, .opo.is-mini .spec { display: none; }
  .opo.is-mini .opo-body { padding: 16px; }
  .opo.is-mini h3 { font-size: 19px; }
  .opo.is-mini .opo-tag { font-size: 12px; letter-spacing: .06em; line-height: 1.35; }
  .opo.is-mini .opo-foot { padding: 12px 16px 16px; }
  .opo.is-mini .opo-toggle { font-size: 14px; padding: 11px 14px; }
}
@media (max-width: 800px) {
  .opos-grid, .opos-grid[data-open="0"], .opos-grid[data-open="1"] { grid-template-columns: 1fr; }
  .opo-detail { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .opo-row { grid-template-columns: 84px minmax(0, 1fr); }
  .opo-code b { font-size: 36px; }
  .opo-body { padding: 18px 18px 14px; }
  .opo h3 { font-size: 22px; }
  .opo-foot { padding: 14px 18px 18px; }
  .opo-detail { padding: 24px 18px 28px; }
  .spec div { padding: 10px 12px; }
  .spec dd { font-size: 14px; }
}
@media (max-width: 400px) {
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec div:nth-child(2) { border-right: 0; }
  .spec div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); }
}

/* Qué incluye (común a todas las oposiciones) */
.includes { margin-top: 64px; display: grid; gap: 24px; }
.includes h3 { font-size: 26px; }
.includes-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.include {
  display: grid; gap: 16px; align-content: start;
  background: #fff; border: 1px solid var(--line);
  padding: 24px;
}
.include-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--soft); border: 1px solid var(--line); border-bottom: 3px solid var(--yellow);
  color: var(--blue);
}
.include-icon svg { width: 28px; height: 28px; }
.include b { display: block; font: 600 19px/1.3 var(--serif); color: var(--navy); margin-bottom: 4px; }
.include span { font-size: 15px; color: var(--muted); }
@media (max-width: 900px) { .includes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .includes h3 { font-size: 24px; }
  .includes-grid { grid-template-columns: 1fr; gap: 10px; }
  .include { grid-template-columns: 52px 1fr; gap: 16px; padding: 16px; align-items: start; }
}

/* ---- Quiénes somos ---- */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
/* Tarjeta: foto a la izquierda (mitad de la tarjeta) y texto a la derecha */
.person {
  background: #fff; border: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr; grid-template-areas: "photo name" "photo body";
}
.person-photo { grid-area: photo; margin: 0; background: #6E6A66; border-right: 4px solid var(--yellow); }
.person-photo img { display: block; width: 100%; height: 100%; min-height: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
.person-name { grid-area: name; padding: 24px 24px 0; display: grid; gap: 4px; }
.person-kicker { font: 600 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--blue); }
.person h3 { font-size: 23px; line-height: 1.2; }
.person-li { --pad: 4px; display: inline-flex; padding: var(--pad); vertical-align: calc(.1em - var(--pad)); margin-left: 4px; color: #0A66C2; } /* icono algo por encima de la línea base; zona de clic de al menos 24 × 24 px */
.person-li:hover { color: #004182; }
.person-li svg { width: .72em; height: .72em; } /* crece con el nombre */
.person .role { font-size: 14px; color: var(--muted); line-height: 1.45; }
.person-body { grid-area: body; padding: 18px 24px 24px; display: grid; gap: 14px; align-content: start; }
/* Datos principales como cifras grandes, igual que en la portada */
.person-stats { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 14px; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; }
.person-stats dt { font: 600 22px/1.1 var(--serif); color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.person-stats dd { margin: 0; font-size: 14px; line-height: 1.45; color: #3E4C59; }
.person-note { font-size: 14px; color: var(--muted); font-style: italic; }
/* Escritorio: la columna de texto es estrecha, así que cada cifra va encima de su explicación */
@media (min-width: 801px) {
  .person-stats { grid-template-columns: 1fr; gap: 2px; }
  .person-stats dt { font-size: 26px; }
  .person-stats dd + dt { margin-top: 12px; }
}
@media (max-width: 1000px) and (min-width: 801px) {
  .person { grid-template-columns: 2fr 3fr; }
}
@media (max-width: 800px) {
  .team { grid-template-columns: 1fr; }
  /* Móvil: foto pequeña junto al nombre y el resto del texto debajo */
  .person { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "photo name" "body body"; }
  .person-photo { border-right: 0; border-bottom: 4px solid var(--yellow); }
  .person-photo img { aspect-ratio: 4 / 5; }
  .person-name { padding: 12px 16px; align-content: center; }
  .person h3 { font-size: 20px; }
  .person-li { vertical-align: -2px; }
  .person-li svg { width: 16px; height: 16px; }
  .person .role { font-size: 13px; }
  .person-body { padding: 16px 18px 20px; }
}

/* ---- Preguntas frecuentes ---- */
.faq { display: grid; border-top: 1px solid var(--line); max-width: 860px; }
/* Escritorio: título a la izquierda (1/3), fijo al hacer scroll, y preguntas a la derecha (2/3) */
@media (min-width: 901px) {
  .faq-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
  .faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 24px); margin-bottom: 0; }
  .faq-layout .faq { max-width: none; }
}
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
  padding: 20px 0;
  font: 600 19px/1.35 var(--serif); color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font: 400 26px/1 var(--sans); color: var(--blue);
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 22px; color: #3E4C59; max-width: 70ch; }
.faq .answer p + p { margin-top: 10px; }

/* ---- Precios ---- */
/* Dos tarjetas de precio blancas con línea azul y una columna gris claro con condiciones y botón */
.prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.price-card { background: #fff; color: var(--ink); border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 28px 26px; display: grid; gap: 14px; align-content: start; }
.price-kicker { font: 700 12px/1.3 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--blue); }
.price-amount { font: 600 52px/1 var(--serif); color: var(--navy); font-variant-numeric: tabular-nums; }
.price-amount small { font: 500 18px/1 var(--sans); color: var(--muted); }
.price-old { font: 600 24px/1 var(--serif); color: var(--muted); margin-left: 8px; }
.price-old[hidden] { display: none; }
.price-what { font-size: 15px; color: #3E4C59; }
.price-incl { list-style: none; display: grid; gap: 8px; font-size: 15px; color: #3E4C59; }
.price-incl li { position: relative; padding-left: 24px; }
.price-incl li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 11px; height: 6px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
/* Interruptor "Soy colegiado/a": cambia el precio de la matrícula */
.price-switch { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font: 600 15px/1.35 var(--sans); color: var(--navy); }
.price-switch-track { width: 46px; height: 26px; flex: none; border-radius: 999px; background: #C9D4DE; position: relative; transition: background-color .2s; }
.price-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.price-switch[aria-checked="true"] .price-switch-track { background: var(--blue); }
.price-switch[aria-checked="true"] .price-switch-track::after { transform: translateX(20px); }
.price-switch:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.price-side { background: var(--soft); padding: 28px 26px; display: grid; gap: 18px; align-content: start; }
.price-side h3 { font-size: 20px; }
.price-conds { list-style: none; display: grid; gap: 12px; font-size: 15px; color: #3E4C59; }
.price-conds li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.price-conds svg { width: 20px; height: 20px; color: var(--blue); margin-top: 2px; }
.price-conds b { color: var(--navy); }
.price-side .btn { width: 100%; }
@media (prefers-reduced-motion: reduce) { .price-switch-track, .price-switch-track::after { transition: none; } }
@media (max-width: 960px) {
  .prices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-side { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .prices { grid-template-columns: 1fr; gap: 14px; }
  .price-amount { font-size: 44px; }
}

/* ---- Contacto ---- */
.contact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
/* Cada tarjeta en columna: la acción queda siempre abajo y alineada entre tarjetas */
.contact-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; }
.contact-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.contact-icon { width: 32px; height: 48px; display: grid; place-items: center start; color: var(--blue); flex: none; }
.contact-icon .ci { width: 30px; height: 30px; }
.contact-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
/* Etiqueta que cuelga del borde superior de la tarjeta de WhatsApp */
.contact-card--main { position: relative; }
.contact-badge { position: absolute; top: -4px; right: 20px; background: var(--yellow); color: var(--navy); font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 9px 12px 8px; border-radius: 0 0 3px 3px; }
.contact-card h3 { font-size: 22px; }
.contact-card > p { color: #3E4C59; font-size: 15px; }
/* Mismo formato en todas las tarjetas: nombre arriba, dato debajo */
.contact-people { list-style: none; display: grid; gap: 12px; margin-top: 6px; }
.contact-people li { display: grid; gap: 2px; }
.contact-who { font-size: 15px; font-weight: 600; color: var(--navy); }
.contact-role { font-size: 14px; font-weight: 400; color: var(--muted); }
.contact-role::before { content: "· "; }
.contact-person { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.contact-person .contact-who { display: grid; gap: 1px; line-height: 1.25; }
.contact-person .contact-role::before { content: none; }
.contact-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--yellow); flex: none; }
.contact-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.contact-num { font: 600 19px/1.3 var(--sans); color: var(--navy); text-decoration: none; overflow-wrap: anywhere; }
.contact-num:hover { text-decoration: underline; color: var(--navy); }
.copy-btn { position: relative; flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: transparent; color: var(--blue); border-radius: var(--radius); cursor: pointer; }
.copy-btn:hover { background: var(--soft); }
.copy-btn svg { width: 16px; height: 16px; }
.copy-ok { position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--blue); }
.contact-actions { margin-top: auto; padding-top: 18px; display: flex; gap: 10px; }
.contact-actions .btn { flex: 1 1 0; padding-inline: 12px; font-size: 15px; white-space: nowrap; }
/* En escritorio, teléfonos y correo se alinean con el botón de la tarjeta de WhatsApp */
@media (min-width: 901px) { .contact-card--phone .contact-people, .contact-card--mail .contact-people { margin-top: auto; } }
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; gap: 14px; }
  .contact-card--phone .contact-people, .contact-card--mail .contact-people { margin-top: 14px; }
  .contact-card .contact-actions { padding-top: 12px; }
}
@media (max-width: 400px) { .contact-actions { flex-wrap: wrap; } .contact-actions .btn { flex-basis: 100%; } }
/* En pantallas táctiles no hace falta copiar: se llama o se escribe directamente */
@media (hover: none) { .copy-btn { display: none; } }

/* ---- Pie ---- */
.site-footer { background: var(--navy); color: #C9D6E2; padding-block: 56px 28px; font-size: 15px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--yellow); } /* el azul no se ve sobre el fondo marino */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr .9fr; gap: 40px; }
.footer-brand img { height: 40px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 38ch; }
.footer-grid h2 { font: 600 12px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #8FA6BB; margin-bottom: 16px; }
.footer-contact { list-style: none; display: grid; gap: 16px; }
.footer-contact li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; }
.footer-contact svg { width: 18px; height: 18px; color: var(--yellow); margin-top: 3px; }
.footer-contact a { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.footer-contact span { display: block; font-size: 13px; color: #9FB3C6; }
.footer-links { list-style: none; display: grid; gap: 10px; }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; color: #8FA6BB; font-size: 14px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-legal a { color: #C9D6E2; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 48px; } }

/* ---- Páginas interiores (Novedades, legal) ---- */
.page-head { padding-block: 64px 32px; border-bottom: 1px solid var(--line); }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--blue); }
.back-link svg { width: 18px; height: 18px; transition: transform .15s; }
.back-link:hover svg { transform: translateX(-3px); }
.page-head h1 { font-size: clamp(32px, 4.4vw, 46px); }
.page-head h1::after { content: ""; display: block; width: 56px; height: 4px; background: var(--yellow); margin-top: 16px; }
.page-head p { margin-top: 14px; color: var(--muted); max-width: 65ch; }
/* Novedades: la más reciente a todo el ancho y las demás en tarjetas de dos en dos */
.news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-block: 40px 80px; }
.post { border: 1px solid var(--line); border-top: 4px solid var(--blue); display: grid; grid-template-columns: 96px minmax(0, 1fr); background: #fff; }
.post:first-child { grid-column: 1 / -1; }
.post-date { background: var(--soft); display: grid; align-content: start; justify-items: center; padding: 24px 8px; text-align: center; }
.post-date b { font: 600 40px/1 var(--serif); color: var(--navy); }
.post-date span { margin-top: 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.post:first-child .post-date b { font-size: 48px; }
.post-body { padding: 24px 26px; display: grid; gap: 10px; align-content: start; }
.post-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; }
.tag--conv { background: #E3F0FA; color: var(--blue); }
.tag--opo { background: #FFF4C2; color: #6B5300; }
.tag--aca { background: #EDF0F3; color: var(--muted); }
.post-status { font: 700 11px/1 var(--sans); letter-spacing: .04em; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--navy); }
.post h2 { font-size: 22px; line-height: 1.3; }
.post:first-child h2 { font-size: 27px; }
.post p { color: #3E4C59; font-size: 16px; }
.post-body p:has(> .post-more) { margin-top: 12px; }
.post-more { font-weight: 600; text-decoration: none; }
.post-more:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .news { grid-template-columns: 1fr; gap: 14px; padding-block: 28px 64px; }
  .post { grid-template-columns: 1fr; }
  .post-date { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; padding: 12px 18px; text-align: left; }
  .post-date b, .post:first-child .post-date b { font-size: 28px; }
  .post-date span { margin-top: 0; }
  .post-body { padding: 18px; }
  .post:first-child h2 { font-size: 23px; }
}

.legal { max-width: 800px; padding-block: 24px 80px; }
.legal h2 { font-size: 26px; margin: 40px 0 12px; }
.legal h3 { font-size: 19px; margin: 24px 0 8px; }
.legal p, .legal li { color: #3E4C59; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 22px; display: grid; gap: 6px; margin-top: 8px; }
.pending { background: #FFF4C2; padding: 0 4px; border-radius: 2px; }
