/* ==========================================================
   Colegio San Martín Iquique — hoja de estilos principal
   ========================================================== */

:root {
  --navy-900: #0b1f3a;
  --navy-800: color-mix(in srgb, var(--navy-900) 55%, var(--navy-700));
  --navy-700: #1c3a66;
  --gold: #c9a24b;
  --gold-dark: color-mix(in srgb, var(--gold) 56%, #000); /* oscuro para que el texto dorado se lea bien (contraste AA) */
  --cream: #f7f3ea;
  --paper: #ffffff;
  --ink: #1d2433;
  --muted: #5b6577;
  --line: #e5e1d6;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 31, 58, .08);
  --shadow-lg: 0 24px 60px rgba(11, 31, 58, .16);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 84px;

  /* Variables de estilo editables desde el panel (Estilo visual) */
  --page-bg: #ffffff;
  --heading: var(--navy-900);
  --base-size: 16px;
  --btn-radius: 999px;
  --btn-pad-y: .85rem;
  --btn-pad-x: 1.5rem;
  --btn-transform: none;
  --btn-bg: var(--gold);
  --btn-text: var(--navy-900);
  --header-bg: rgba(255, 255, 255, .96);
  --footer-bg: #071629;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); font-size: var(--base-size); }
/* Tamaño del texto elegido por quien visita (botones A− / A+ de la barra superior) */
html.texto-1 { font-size: calc(var(--base-size) * 1.125); }
html.texto-2 { font-size: calc(var(--base-size) * 1.25); }
html.texto-3 { font-size: calc(var(--base-size) * 1.4); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; color: var(--heading); }
p { margin: 0 0 1em; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.center { text-align: center; margin-top: 2.5rem; }
.ico { width: 15px; height: 15px; fill: currentColor; flex: none; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 999;
  background: var(--gold); color: var(--navy-900); padding: .5rem 1rem; border-radius: 6px;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: var(--btn-pad-y) var(--btn-pad-x); border-radius: var(--btn-radius); border: 2px solid transparent;
  text-transform: var(--btn-transform);
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 8px 20px color-mix(in srgb, var(--btn-bg) 35%, transparent); }
.btn--gold:hover { filter: brightness(1.08); }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--outline { border-color: var(--navy-900); color: var(--navy-900); background: transparent; }
.btn--outline:hover { background: var(--navy-900); color: #fff; }
.btn--block { width: 100%; }

.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-dark); margin-bottom: .75rem; display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.eyebrow--light { color: var(--gold); }
.title { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.title--sm { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.title--light { color: #fff; }

.link-arrow { font-weight: 600; color: var(--navy-700); display: inline-flex; align-items: center; gap: .4rem; }
.link-arrow::after { content: "→"; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Barra superior ---------- */
/* ---------- Aviso urgente (se enciende desde el panel) ---------- */
.aviso { position: relative; z-index: 60; color: #fff; font-size: .95rem; line-height: 1.45; animation: aviso-in .35s ease-out; }
.aviso--urgente { background: #b3261e; }
.aviso--importante { background: #f2c14e; color: #3a2a00; }
.aviso--info { background: #1c4f8a; }
.aviso__inner { display: flex; align-items: center; gap: .9rem; padding-top: .75rem; padding-bottom: .75rem; }
.aviso__ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: rgba(255,255,255,.22); }
.aviso--importante .aviso__ico { background: rgba(0,0,0,.12); }
.aviso__txt { margin: 0; flex: 1; min-width: 0; }
.aviso__txt strong { font-weight: 700; }
.aviso__link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; margin-left: .3rem; }
.aviso__cerrar { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 1rem; cursor: pointer; opacity: .8; }
.aviso__cerrar:hover, .aviso__cerrar:focus-visible { opacity: 1; background: rgba(255,255,255,.18); }
@keyframes aviso-in { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 600px) { .aviso { font-size: .9rem; } .aviso__inner { align-items: flex-start; gap: .7rem; } }
@media print { .aviso { color: #000; background: none; border: 2px solid #000; } .aviso__cerrar { display: none; } }

.topbar { background: var(--navy-900); color: rgba(255,255,255,.78); font-size: .82rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; min-height: 40px; gap: 1rem; }
.topbar__info, .topbar__links { display: flex; align-items: center; gap: 1.4rem; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: .4rem; }
.topbar a:hover { color: var(--gold); }
.topbar__texto { display: inline-flex; gap: .25rem; }
.topbar__texto button { min-width: 34px; height: 28px; padding: 0 .45rem; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; background: transparent; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.topbar__texto button:hover { border-color: var(--gold); color: var(--gold); }
.topbar__texto button[aria-pressed="true"] { background: rgba(255,255,255,.16); }
.topbar__texto button:disabled { opacity: .45; cursor: default; }

/* ---------- Cabecera ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent; transition: box-shadow .3s, border-color .3s;
}
.header.is-scrolled { box-shadow: 0 6px 24px rgba(11,31,58,.08); border-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); transition: height .3s; }
.header.is-scrolled .header__inner { height: 70px; }

.brand { display: flex; align-items: center; gap: .75rem; }
.brand__crest { width: 42px; color: var(--navy-900); }
.brand__crest svg { width: 100%; height: auto; display: block; }
.brand__crest--img { width: auto; }
.brand__crest--img img { display: block; height: 52px; width: auto; max-width: 150px; object-fit: contain; }
.brand--footer .brand__crest--img img { height: 56px; background: #fff; border-radius: 12px; padding: 6px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--serif); font-size: 1.25rem; color: var(--navy-900); }
.brand__text small { font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-dark); font-weight: 600; }
.brand--footer .brand__text small { color: var(--gold); }

.nav { display: flex; align-items: center; gap: 1.5rem; }
.nav__list { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.nav__link {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem .85rem; border-radius: 8px; border: 0; background: none;
  font-weight: 500; font-size: .95rem; color: var(--ink); position: relative;
}
.nav__link::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .25rem; height: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }

.has-sub { position: relative; }
.sub {
  list-style: none; margin: 0; padding: .5rem; position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
}
.sub a { display: block; padding: .6rem .85rem; border-radius: 8px; font-size: .92rem; color: var(--muted); }
.sub a:hover { background: var(--cream); color: var(--navy-900); }
.has-sub:hover .sub, .has-sub.is-open .sub { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover .caret, .has-sub.is-open .caret { transform: rotate(225deg); }

.burger { display: none; width: 44px; height: 44px; border: 0; background: none; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--navy-900); transition: .3s; }
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 28px; }
.burger.is-open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Portada ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--navy-700) 80%, #fff) 0%, transparent 60%),
              linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  padding: clamp(4rem, 9vw, 7.5rem) 0 clamp(6rem, 11vw, 9rem);
}
.hero__pattern {
  position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 4rem; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.2vw, 4.2rem); font-weight: 600; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero__lead { font-size: 1.15rem; color: rgba(255,255,255,.82); max-width: 560px; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__card {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(12px); border-radius: 20px; padding: 2rem; box-shadow: var(--shadow-lg);
}
.hero__card h2 { color: #fff; font-size: 1.45rem; margin-top: 1rem; }
.hero__card .meta { color: rgba(255,255,255,.6); font-size: .88rem; }
.hero__card .link-arrow { color: var(--gold); }
/* Imagen junto al lema (mitad izquierda): se funde con el fondo hacia la derecha */
.hero__foto {
  position: absolute; top: 0; bottom: 0; left: 0; width: 58%; pointer-events: none;
  isolation: isolate; opacity: var(--foto-op, .55);
  mask-image: linear-gradient(90deg, #000 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 100%);
}
.hero__foto[hidden] { display: none; }
.hero__foto img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.hero__foto--completa img { object-fit: contain; padding: 2rem; }
/* Duotono: sombras en el color principal y luces en el secundario aclarado */
.hero__foto--duo { background: color-mix(in srgb, var(--navy-700) 70%, #fff); }
.hero__foto--duo img { filter: grayscale(1) contrast(1.08); mix-blend-mode: multiply; }
.hero__foto--duo::after { content: ""; position: absolute; inset: 0; background: var(--navy-900); mix-blend-mode: lighten; }

/* Carrusel de noticias de la portada */
.hero__slider { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.hs__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.hs__track::-webkit-scrollbar { display: none; }
.hs__slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; display: flex; flex-direction: column; }
.hs__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(255,255,255,.06); }
.hs__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.hs__img:hover img { transform: scale(1.03); }
.hs__img--vacia {
  display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--navy-700) 70%, transparent), color-mix(in srgb, var(--navy-900) 60%, transparent));
}
.hs__img--vacia span { font-family: "Fraunces", serif; font-size: 1.6rem; font-weight: 600; color: var(--gold); opacity: .8; }
.hs__body { padding: 1.5rem 1.75rem 1.25rem; }
.hs__body h2 { color: #fff; font-size: 1.35rem; margin-top: .85rem; line-height: 1.25; }
.hs__body h2 a { color: inherit; text-decoration: none; }
.hs__body h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hs__nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.25rem 1.1rem; margin-top: auto; }
.hs__nav[hidden] { display: none; }
.hs__btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06);
  color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; transition: background .2s, color .2s;
}
.hs__btn:hover, .hs__btn:focus-visible { background: var(--gold); color: var(--navy-900); }
.hs__dots { display: flex; gap: .45rem; }
.hs__dot { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: width .25s, background .25s; }
.hs__dot[aria-current="true"] { width: 24px; background: var(--gold); }

.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  background: var(--gold); color: var(--navy-900); padding: .3rem .7rem; border-radius: 999px;
}

/* ---------- Encabezado de subpáginas ---------- */
.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(900px 400px at 90% -20%, color-mix(in srgb, var(--navy-700) 80%, #fff) 0%, transparent 60%),
              linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(3rem, 6vw, 4.5rem);
}
.page-hero__inner { position: relative; max-width: 820px; margin-left: max(16px, (100% - 1200px) / 2); }
.page-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 600; margin: .4rem 0 .6rem; }
.page-hero p { color: rgba(255,255,255,.8); font-size: 1.1rem; margin: 0; max-width: 640px; }
.page-hero p a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; font-size: .85rem; color: rgba(255,255,255,.6); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .6; }
.crumbs a:hover { color: var(--gold); }
.crumbs [aria-current] { color: var(--gold); }
.sub a[aria-current] { color: var(--navy-900); font-weight: 600; background: var(--cream); }

/* ---------- Accesos rápidos ---------- */
.quick { position: relative; z-index: 2; margin-top: -4rem; }
.quick__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.quick__item { display: flex; gap: 1rem; align-items: center; padding: 1.6rem 1.5rem; border-right: 1px solid var(--line); transition: background .2s; }
.quick__item:last-child { border-right: 0; }
.quick__item:hover { background: var(--cream); }
.quick__item strong { display: block; color: var(--navy-900); font-size: .98rem; }
.quick__item small { color: var(--muted); font-size: .82rem; line-height: 1.35; display: block; }
.quick__ico {
  flex: none; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--cream); color: var(--gold-dark); transition: .2s;
}
.quick__ico svg { width: 24px; height: 24px; }
.quick__item:hover .quick__ico { background: var(--navy-900); color: var(--gold); }

/* ---------- Secciones ---------- */
.section { padding: clamp(4.5rem, 8vw, 7rem) 0; }
.section--tint { background: var(--cream); }
.section--dark { background: var(--navy-900); color: rgba(255,255,255,.82); }
.section__head { margin-bottom: 3rem; max-width: 640px; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }

/* Nosotros */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.frame {
  position: relative; aspect-ratio: 4/5; border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
  box-shadow: var(--shadow-lg); display: flex; align-items: flex-end;
}
.frame::before {
  content: ""; position: absolute; inset: 22px; border: 1px solid rgba(201,162,75,.5); border-radius: 14px;
}
.frame::after {
  content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,75,.35), transparent 65%);
}
.frame__quote { position: relative; z-index: 1; padding: 3rem; color: #fff; }
.frame__mark { font-family: var(--serif); font-size: 7rem; line-height: .6; color: var(--gold); display: block; }
.frame__quote p { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.25; margin: 1rem 0; }
.frame__sign { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

.tabs { margin-top: 2rem; }
.tabs__list { display: inline-flex; background: var(--cream); padding: .3rem; border-radius: 999px; margin-bottom: 1.25rem; }
.tabs__list button { border: 0; background: none; padding: .55rem 1.3rem; border-radius: 999px; font-weight: 600; color: var(--muted); transition: .2s; }
.tabs__list button[aria-selected="true"] { background: var(--navy-900); color: #fff; }
.tabs__panel { animation: fade .35s ease; border-left: 3px solid var(--gold); padding-left: 1.25rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.checks li { padding-left: 1.75rem; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--gold-dark); font-weight: 700; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Pilares */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.pillar {
  background: #fff; border-radius: var(--radius); padding: 2rem 1.75rem; border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
/* Imagen opcional de pilares y departamentos (se sube desde el panel) */
.card-img { display: block; margin-bottom: 1.2rem; }
.card-img--icono { width: auto; height: 64px; max-width: 120px; object-fit: contain; }
.card-img--foto { width: calc(100% + 3.5rem); max-width: none; margin: -2rem -1.75rem 1.4rem; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.pillar, .dept { overflow: hidden; }
.pillar h3 { font-size: 1.25rem; }
.pillar p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Niveles */
.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.level { border-radius: 20px; padding: 2.5rem; background: var(--cream); position: relative; overflow: hidden; }
.level__top span {
  display: inline-block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700;
  border: 1px solid var(--gold); color: var(--gold-dark); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.5rem;
}
.level h3 { font-size: 1.75rem; }
.level p { color: var(--muted); }
.level--dark { background: var(--navy-900); }
.level--dark h3 { color: #fff; }
.level--dark p { color: rgba(255,255,255,.75); }
.level--dark .level__top span { color: var(--gold); }
.level--dark .link-arrow { color: var(--gold); }

/* Admisión */
.admission {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); color: rgba(255,255,255,.85);
  padding: clamp(4rem, 7vw, 6rem) 0; position: relative; overflow: hidden;
}
.admission::before {
  content: ""; position: absolute; left: -10%; bottom: -60%; width: 600px; height: 600px; border-radius: 50%;
  border: 1px solid rgba(201,162,75,.25);
}
.admission__inner { position: relative; display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem 4rem; align-items: start; }
.admission h2 { color: #fff; font-size: clamp(2rem, 3.8vw, 3rem); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 1rem; }
.steps li {
  counter-increment: s; display: grid; grid-template-columns: 48px 1fr; column-gap: 1rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 1.1rem 1.25rem;
}
.steps li::before {
  content: counter(s); grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--navy-900); font-family: var(--serif); font-weight: 700; font-size: 1.2rem;
}
.steps strong { color: #fff; }
.steps span { font-size: .92rem; color: rgba(255,255,255,.7); }
.admission__cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1rem; }

/* Noticias */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted); padding: .5rem 1rem; border-radius: 999px;
  font-size: .88rem; font-weight: 600; transition: .2s;
}
.chip:hover { border-color: var(--navy-900); color: var(--navy-900); }
.chip.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s, box-shadow .3s; animation: fade .4s ease both;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__date {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--cream); border-bottom: 1px solid var(--line);
}
.card__day { font-family: var(--serif); font-size: 2.2rem; line-height: 1; color: var(--navy-900); }
.card__month { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); line-height: 1.3; }
.card__tag {
  margin-left: auto; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 999px; background: #fff; color: var(--gold-dark); border: 1px solid var(--gold);
}
.card__body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card__body h3 { font-size: 1.15rem; line-height: 1.35; }
.card__body p { color: var(--muted); font-size: .92rem; flex: 1; }

/* Equipo */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.member { background: #fff; border-radius: var(--radius); padding: 1.75rem; display: grid; grid-template-columns: 56px 1fr; column-gap: 1rem; align-items: center; border: 1px solid var(--line); }
.member__avatar {
  grid-row: span 2; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-900); color: var(--gold); font-family: var(--serif); font-weight: 700;
}
.member h3 { font-size: 1.05rem; margin: 0; }
.member p { margin: 0; color: var(--muted); font-size: .88rem; }

.member__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.member__name { font-size: .88rem; font-weight: 600; color: var(--gold-dark); margin: .1rem 0 0; }
.member__text { display: flex; flex-direction: column; gap: .15rem; }
.member__text h3 { margin: 0; }
.card__img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }

/* Redes sociales */
.social__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.social__item {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.4rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.social__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.social__ico {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--navy-900); color: var(--gold);
}
.social__ico svg { width: 22px; height: 22px; fill: currentColor; }
.social__item strong { display: block; color: var(--navy-900); line-height: 1.3; }
.social__item small { color: var(--muted); font-size: .82rem; }

/* Departamentos */
.depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.dept {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.75rem;
  border-top: 3px solid var(--gold); transition: transform .3s, box-shadow .3s;
}
.dept:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.dept h3 { font-size: 1.3rem; }
.dept p { color: var(--muted); font-size: .95rem; }
.dept__meta { font-size: .9rem; }
.dept__meta strong { color: var(--navy-900); }
.dept__link { color: inherit; text-decoration: none; }
.dept__link:hover { color: var(--navy-700); text-decoration: underline; text-underline-offset: 3px; }
.dept__acts {
  display: inline-flex; margin-top: 1rem; padding: .5rem .95rem; border-radius: 999px;
  background: var(--navy-900); color: #fff; font-weight: 600; font-size: .88rem; text-decoration: none;
}
.dept__acts:hover { background: var(--gold); color: var(--navy-900); }

.dept__team { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.dept__team summary { cursor: pointer; font-weight: 600; color: var(--navy-700); font-size: .9rem; }
.dept__team ul { list-style: none; padding: 0; margin: .7rem 0 0; display: grid; gap: .55rem; }
.dept__team li { display: flex; flex-direction: column; font-size: .88rem; line-height: 1.35; }
.dept__team li span { color: var(--muted); font-size: .82rem; }
.contact-line { font-size: .82rem; margin-top: .35rem !important; word-break: break-word; }
.contact-line a { color: var(--navy-700); }
.contact-line a:hover { color: var(--gold-dark); text-decoration: underline; }

/* Docentes y personal */
.staff-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 2.5rem; }
.staff-search { flex: 1 1 280px; max-width: 420px; display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 999px; padding: .2rem 1rem; background: #fff; }
.staff-search svg { width: 18px; height: 18px; fill: var(--muted); flex: none; }
.staff-search input { border: 0; outline: none; font: inherit; padding: .6rem 0; width: 100%; background: none; }
.staff-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,75,.18); }
.staff-group + .staff-group { margin-top: 4.5rem; }
.staff-group__title { font-size: clamp(1.6rem, 2.8vw, 2.1rem); font-weight: 500; display: flex; align-items: baseline; gap: .8rem; margin-bottom: 2rem; }
.staff-group__title::after { content: ""; flex: 1; height: 1px; background: var(--line); align-self: center; }
.staff-group__title small { font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--gold-dark); background: var(--cream); padding: .15rem .6rem; border-radius: 999px; }
.staff-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.pcard { display: flex; flex-direction: column; min-width: 0; }
.pcard__photo {
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem;
  background: var(--cream); box-shadow: 0 1px 0 var(--line);
}
.pcard__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .5s ease; }
.pcard:hover .pcard__photo img { transform: scale(1.04); }
.pcard__photo--empty {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--gold) 28%, transparent) 0, transparent 45%),
    linear-gradient(140deg, var(--navy-900), var(--navy-700));
}
.pcard__photo--empty::after {
  content: ""; position: absolute; inset: 10px; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: calc(var(--radius) - 6px);
}
.pcard__initials { font-family: var(--serif); font-size: clamp(2rem, 3.2vw, 2.6rem); font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.pcard__name { font-family: var(--sans); font-size: 1.12rem; font-weight: 600; color: var(--heading); margin: 0 0 .35rem; line-height: 1.3; }
.pcard__role { color: var(--muted); font-size: .92rem; margin: 0 0 .35rem; line-height: 1.4; }
.pcard__mail, .pcard__tel { font-size: .88rem; color: var(--navy-700); overflow-wrap: anywhere; line-height: 1.45; width: fit-content; }
.pcard__mail { border-bottom: 1px solid color-mix(in srgb, var(--gold) 60%, transparent); }
.pcard__mail:hover, .pcard__tel:hover { color: var(--gold-dark); }
.person { display: flex; gap: .9rem; align-items: flex-start; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s, box-shadow .2s; }
.person:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.person__avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: var(--gold); font-family: var(--serif); font-weight: 700; font-size: .9rem; }
.person h3 { font-size: 1rem; margin: 0 0 .15rem; font-family: var(--sans); font-weight: 600; }
.person p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.empty-note { color: var(--muted); text-align: center; padding: 2rem; }

/* Historia */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.6rem; }
.timeline::before { content: ""; position: absolute; left: 108px; top: .4rem; bottom: .4rem; width: 2px; background: var(--line); }
.timeline li { display: grid; grid-template-columns: 90px 1fr; gap: 2.4rem; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 103px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--page-bg); }
.timeline__year { font-family: var(--serif); font-size: 1.3rem; color: var(--navy-900); font-weight: 600; text-align: right; }
.timeline h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.timeline p { margin: 0; color: var(--muted); }

/* Llamado a contacto */
.cta-band { background: var(--cream); padding: clamp(3rem, 6vw, 4.5rem) 0; }
.cta-band__inner { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem 3rem; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .3rem; }
.cta-band p { margin: 0; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.narrow { max-width: 820px; }
.pillar .link-arrow { margin-top: 1rem; font-size: .92rem; }
.split__copy .checks { margin-top: 1.25rem; }

/* Departamentos / documentos */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  list-style: none; cursor: pointer; padding: 1.15rem 0; font-weight: 600; color: var(--navy-900);
  display: flex; justify-content: space-between; align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.4rem; color: var(--gold-dark); transition: transform .25s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion p { color: var(--muted); margin: 0 0 1.2rem; }

.docs { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .75rem; }
.docs a {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 12px;
  font-weight: 500; transition: .2s;
}
.docs a:hover { border-color: var(--gold); background: var(--cream); }
.docs__tag { font-size: .7rem; font-weight: 700; background: var(--navy-900); color: var(--gold); padding: .3rem .5rem; border-radius: 6px; }
.subhead { font-size: 1.2rem; }
.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.links a { display: inline-block; padding: .45rem .9rem; border-radius: 999px; background: var(--cream); font-size: .88rem; font-weight: 500; }
.links a:hover { background: var(--navy-900); color: #fff; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.contact__list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.contact__list span { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.contact__list a { color: #fff; }
.contact__list a:hover { color: var(--gold); }
.map { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--navy-800); }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.3); }

.form { background: #fff; color: var(--ink); border-radius: 20px; padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-lg); align-self: start; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field label { font-size: .85rem; font-weight: 600; margin-bottom: .4rem; color: var(--navy-900); }
.field input, .field select, .field textarea {
  font: inherit; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fbfaf7;
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,75,.18); background: #fff; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #c0392b; }
.error { color: #c0392b; font-size: .8rem; min-height: 1em; margin-top: .3rem; }
.form__ok { margin: 1rem 0 0; padding: .9rem 1rem; background: #eaf6ee; color: #1e6b3a; border-radius: 10px; font-size: .92rem; }

/* Pie */
.footer { background: var(--footer-bg); color: rgba(255,255,255,.65); padding-top: 4.5rem; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; }
.brand--footer .brand__crest { color: #fff; }
.brand--footer .brand__text strong { color: #fff; }
.footer__claim { margin-top: 1.25rem; max-width: 300px; }
.footer h4 { color: #fff; font-family: var(--serif); font-size: 1.05rem; margin: 0 0 1rem; font-weight: 600; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer a:hover { color: var(--gold); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.5rem 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__bottom p { margin: 0; }

.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--gold); color: var(--navy-900); font-size: 1.2rem; font-weight: 700; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: .3s; z-index: 40;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* Botón flotante «Descarga la app del colegio» (al bajar queda solo el ícono; al pasar el mouse se abre) */
.boton-app {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: .65rem; height: 58px; max-width: 320px; padding: 0 1.2rem 0 5px; overflow: hidden;
  border: 2px solid var(--gold); border-radius: 999px; background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: #fff; text-decoration: none; box-shadow: 0 14px 30px rgba(0, 0, 0, .3); transition: max-width .35s ease, padding .35s ease, transform .2s ease;
}
.boton-app img { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.boton-app b { font-size: .95rem; white-space: nowrap; }
.boton-app em { font-style: normal; color: var(--gold); }
.boton-app:hover { color: #fff; transform: translateY(-2px); }
.boton-app.is-mini { max-width: 58px; padding: 0 0 0 5px; }
.boton-app.is-mini:hover, .boton-app.is-mini:focus-visible { max-width: 320px; padding: 0 1.2rem 0 5px; }
.boton-app ~ .to-top { bottom: calc(90px + env(safe-area-inset-bottom)); right: 26px; }
@media print { .boton-app { display: none; } }
@media (prefers-reduced-motion: reduce) { .boton-app { transition: none; } }

/* Animación de aparición */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) { .staff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1rem; }
  .pcard__photo { aspect-ratio: 4 / 3; margin-bottom: .75rem; }
  .pcard__name { font-size: .98rem; }
  .pcard__role { font-size: .84rem; }
  .pcard__mail, .pcard__tel { font-size: .8rem; }
}
@media (max-width: 340px) { .staff-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1080px) {
  .nav__cta { display: none; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .news { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); }
  .quick__grid { grid-template-columns: repeat(2, 1fr); }
  .quick__item:nth-child(2) { border-right: 0; }
  .quick__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  :root { --header-h: 70px; }
  .burger { display: block; }
  .header { backdrop-filter: none; background: linear-gradient(var(--header-bg), var(--header-bg)), #fff; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: #fff; flex-direction: column; align-items: stretch;
    padding: 1.5rem 16px 2rem; gap: 1.25rem; overflow-y: auto;
    transform: translateX(100%); transition: transform .35s ease; visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list > li { border-bottom: 1px solid var(--line); }
  .nav__link { width: 100%; justify-content: space-between; padding: 1rem .25rem; font-size: 1.05rem; }
  .nav__link::after { display: none; }
  .sub { position: static; box-shadow: none; border: 0; padding: 0 0 .75rem .5rem; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub:hover .sub { display: none; }
  .has-sub.is-open .sub { display: block; }
  .nav__cta { display: inline-flex; }
  .hero__inner, .split, .admission__inner, .two-col, .contact, .levels { grid-template-columns: 1fr; }
  .hero__inner { gap: 2.5rem; }
  .hero__foto { width: 100%; bottom: auto; height: 70%; mask-image: linear-gradient(180deg, #000 35%, transparent 100%); -webkit-mask-image: linear-gradient(180deg, #000 35%, transparent 100%); }
  .frame { aspect-ratio: auto; min-height: 340px; }
  .frame__mark { margin-top: 1rem; }
  .topbar__info span { display: none; }
}

@media (max-width: 420px) {
  .topbar__info { display: none; }
  .topbar__inner { justify-content: flex-end; }
}

@media (max-width: 600px) {
  .quick { margin-top: -3rem; }
  .quick__grid, .pillars, .news, .team { grid-template-columns: 1fr; }
  .quick__item { border-right: 0; border-bottom: 1px solid var(--line); }
  .quick__item:last-child { border-bottom: 0; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .level { padding: 2rem 1.5rem; }
  .frame__quote { padding: 2.25rem; }
  .topbar__links > .topbar__app { display: none; }
  .topbar__links { gap: .9rem; }
  .topbar a, .topbar span { white-space: nowrap; }
  .hero__actions .btn { flex: 1 1 auto; }
  .timeline::before { left: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: .2rem; padding-left: 2rem; }
  .timeline li::after { left: 3px; }
  .timeline__year { text-align: left; padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media (max-width: 600px) {
  .staff-tools .filters { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: .4rem; scrollbar-width: thin; }
  .staff-tools .chip { white-space: nowrap; flex: none; }
}

/* ---------- Horarios ---------- */
.tt-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem 1.5rem; margin-bottom: 2.5rem; }
.tt-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--cream); border: 1px solid var(--line); }
.tt-tabs button {
  border: 0; background: transparent; padding: .6rem 1.3rem; border-radius: 999px; font: 600 .92rem var(--sans);
  color: var(--muted); cursor: pointer; transition: .2s;
}
.tt-tabs button[aria-selected="true"] { background: var(--navy-900); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.tt-select { display: grid; gap: .3rem; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); flex: 1 1 260px; max-width: 380px; }
.tt-select select {
  font: 500 1rem var(--sans); color: var(--ink); text-transform: none; letter-spacing: 0; padding: .7rem 2.6rem .7rem 1rem;
  border: 1px solid var(--line); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%235b6577' stroke-width='2'/%3E%3C/svg%3E") no-repeat right .9rem center / 18px;
  appearance: none; cursor: pointer;
}
.tt-select select:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.tt-acciones { margin-left: auto; display: flex; flex-wrap: wrap; gap: .6rem; }
.tt-png[hidden] { display: none; }
.tt-head { margin-bottom: 1.5rem; }
.tt-head .title { margin-bottom: .2rem; }
.tt-sub { margin: 0; color: var(--muted); }

.tt-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.tt { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.tt th, .tt td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; vertical-align: top; }
.tt tr > :last-child { border-right: 0; }
.tt tbody tr:last-child > * { border-bottom: 0; }
.tt td[rowspan] { border-bottom: 1px solid var(--line); }
.tt thead th {
  background: var(--navy-900); color: #fff; font: 600 .8rem var(--sans); letter-spacing: .08em; text-transform: uppercase;
  padding: .7rem .5rem; border-right-color: rgba(255,255,255,.12);
}
.tt .tt-hora { width: 96px; text-align: center; font: 600 .8rem/1.2 var(--sans); color: var(--navy-900); background: var(--cream); padding: .3rem .4rem; vertical-align: middle; }
.tt thead .tt-hora { background: var(--navy-900); color: #fff; }
.tt .tt-hora small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; }
.tt-block {
  height: 100%; min-height: 40px; border-radius: 0; padding: .35rem .7rem; background: var(--c); color: var(--t);
  display: flex; flex-direction: column; justify-content: center; gap: 0; line-height: 1.2;
}
.tt td[rowspan] .tt-block { min-height: 100%; }
.tt td[rowspan] { height: 1px; } /* permite que el bloque doble ocupe toda la altura */
.tt-block strong { font-size: .86rem; font-weight: 700; }
.tt-block span { font-size: .74rem; opacity: .78; }
.tt-lista .tt-block { border-radius: 4px; padding: .45rem .75rem; min-height: 0; }
/* Electivos: el bloque se divide entre planes (Científico | Humanista) */
.tt-split { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 100%; min-height: 40px; }
.tt-split .tt-block { min-height: 0; padding: .35rem .5rem; }
.tt-split .tt-block + .tt-block { box-shadow: inset 1px 0 0 rgba(255,255,255,.85); }
.tt-block em { font-style: normal; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.tt-split strong { font-size: .8rem; }
.tt-lista .tt-split { border-radius: 4px; overflow: hidden; }
.tt-lista .tt-split .tt-block { border-radius: 0; padding: .45rem .6rem; }
.tt-vacio { background: #fff; }
.tt-pausa td { background: var(--cream); text-align: center; padding: .2rem; }
.tt-pausa td span { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }
.tt-pausa .tt-hora { font-size: .74rem; padding: .2rem; }

.tt-leyenda { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .86rem; color: var(--muted); }
.tt-leyenda li { display: flex; align-items: center; gap: .45rem; }
.tt-leyenda i { width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

.tt-movil { display: none; }
.tt-dias { margin-bottom: 1rem; }
.tt-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.tt-lista li { display: grid; grid-template-columns: 96px 1fr; gap: .75rem; align-items: stretch; }
.tt-lista__hora { font: 600 .82rem var(--sans); color: var(--navy-900); align-self: center; }
.tt-lista__pausa > span:last-child { background: var(--cream); border-radius: 4px; padding: .3rem .75rem; color: var(--gold-dark); font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.tt-lista__libre { display: block !important; color: var(--muted); text-align: center; padding: 1.5rem; }

@media (max-width: 760px) {
  .tt-desk { display: none; }
  .tt-movil { display: block; }
  .tt-tools { gap: .9rem; }
  .tt-tabs { width: 100%; }
  .tt-tabs button { flex: 1; }
  .tt-select { max-width: none; flex-basis: 100%; }
  .tt-print { display: none; }
  .tt-acciones { width: 100%; }
  .tt-png { flex: 1; }
  .tt-dias { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; }
  .tt-dias .chip { flex: none; }
}

@media print {
  .topbar, .header, .footer, .page-hero, .tt-tools, .cta-band, .to-top, #toTop, .tt-movil { display: none !important; }
  .tt-desk { display: block !important; }
  .section { padding: 0 !important; }
  .tt-wrap { box-shadow: none; }
  .tt-block, .tt thead th, .tt-hora, .tt-pausa td, .tt-leyenda i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 600px) { .header .brand__crest--img img { height: 44px; max-width: 120px; } }

/* ---------- CGPA y CEAL ---------- */
.orgs { display: grid; gap: 4.5rem; }
.org__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; flex-wrap: wrap; padding-bottom: 1.6rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.org__head .title { margin-bottom: .4rem; }
.org__desc { margin: 0; color: var(--muted); max-width: 640px; }
.org__links { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.org__ig {
  display: inline-flex; align-items: center; gap: .75rem; padding: .6rem 1.2rem .6rem .65rem; border-radius: 999px;
  background: linear-gradient(135deg, #f58529, #dd2a7b 50%, #8134af); color: #fff; text-decoration: none; font-weight: 600; line-height: 1.15;
  box-shadow: 0 8px 20px rgba(221, 42, 123, .22); transition: transform .2s;
}
.org__ig:hover { transform: translateY(-2px); }
.org__ig svg { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: rgba(255,255,255,.18); fill: currentColor; flex: none; }
.org__ig small { display: block; font-weight: 500; font-size: .78rem; opacity: .85; }
.org__ig--pronto { background: var(--cream); color: var(--muted); box-shadow: none; border: 1px dashed var(--line); }
.org__ig--pronto:hover { transform: none; }
.org__ig--pronto svg { background: #fff; }
.org__mail { font-size: .9rem; color: var(--navy-700); }
.org__vacio { color: var(--muted); padding: 2rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); margin: 0; }

/* ---------- Página de una noticia ---------- */
.card__link { color: inherit; }
.card__link:hover { color: var(--navy-700); text-decoration: underline; text-underline-offset: 3px; }
.noticia__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .8rem 0 0; }
.noticia__autor { font-size: .92rem; opacity: .9; }
.noticia__tag { background: var(--gold); color: var(--navy-900); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .65rem; border-radius: 999px; }
.noticia__art { max-width: 760px; margin: 0 auto; }
.noticia__portada { margin: 0 0 2rem; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(10, 25, 50, .12); }
.noticia__portada img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.noticia__cuerpo { font-size: 1.08rem; line-height: 1.75; }
.noticia__cuerpo > * + * { margin-top: 1.1em; }
.noticia__cuerpo h2, .noticia__cuerpo h3 { font-family: "Fraunces", Georgia, serif; color: var(--navy-900); line-height: 1.25; margin-top: 1.8em; }
.noticia__cuerpo h2 { font-size: 1.6rem; }
.noticia__cuerpo h3 { font-size: 1.25rem; }
.noticia__cuerpo ul, .noticia__cuerpo ol { padding-left: 1.4rem; }
.noticia__cuerpo li + li { margin-top: .35em; }
.noticia__cuerpo a { color: var(--navy-700); text-decoration: underline; text-underline-offset: 3px; }
.noticia__cuerpo blockquote { margin-left: 0; padding: .6rem 1.2rem; border-left: 4px solid var(--gold); background: var(--cream); border-radius: 0 10px 10px 0; font-style: italic; }
.noticia__cuerpo figure { margin: 1.8em 0; }
.noticia__cuerpo figure img { display: block; width: 100%; height: auto; border-radius: 12px; }
/* Varias fotos seguidas: galería */
.noticia__cuerpo .fotos { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin: 1.8em 0; }
.noticia__cuerpo .fotos--3 { grid-template-columns: repeat(3, 1fr); }
.noticia__cuerpo .fotos figure { margin: 0; }
.noticia__cuerpo .fotos figure img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.noticia__cuerpo .fotos figcaption { font-size: .82rem; }
@media (max-width: 560px) { .noticia__cuerpo .fotos--3 { grid-template-columns: repeat(2, 1fr); } }
.noticia__cuerpo figcaption { font-size: .88rem; color: #6b7280; text-align: center; margin-top: .5rem; }
.noticia__adjunto { margin-top: 2rem; }
.noticia__volver { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(10, 25, 50, .1); }
.noticia__volver a { font-weight: 600; color: var(--navy-700); }

/* ---------- Departamentos académicos ---------- */
.acas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.aca { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; transition: transform .25s, box-shadow .25s; }
.aca:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.aca__img { display: grid; place-items: center; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: var(--gold); overflow: hidden; }
.aca__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.aca:hover .aca__img img { transform: scale(1.04); }
.aca__img svg { width: 56px; height: 56px; }
.aca__body { display: flex; flex-direction: column; gap: .4rem; padding: 1.1rem 1.25rem 1.3rem; flex: 1; }
.aca__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--heading); line-height: 1.2; }
.aca__desc { color: var(--muted); font-size: .92rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aca__meta { margin-top: auto; padding-top: .5rem; font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--gold-dark); }

.page-hero--foto { background: linear-gradient(90deg, color-mix(in srgb, var(--navy-900) 94%, transparent) 0%, color-mix(in srgb, var(--navy-900) 78%, transparent) 100%), var(--portada) center / cover no-repeat; }

.dv { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.dv__side { position: sticky; top: 110px; display: grid; gap: 1rem; }
.dv__tiles { display: grid; gap: .8rem; }
.dv__tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1rem; align-items: center; text-align: left;
  padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--heading);
  transition: background .2s, color .2s, box-shadow .2s, transform .2s;
}
.dv__tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dv__tile.is-active { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; border-color: transparent; box-shadow: var(--shadow); }
.dv__tile-n { grid-row: span 2; font-family: var(--serif); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--gold); min-width: 2.2rem; text-align: center; }
.dv__tile-t { font-weight: 700; font-size: 1.08rem; }
.dv__tile-s { font-size: .85rem; opacity: .7; }
.dv__contacto { padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--cream); font-size: .92rem; }
.dv__contacto p { margin: 0 0 .4rem; display: grid; }
.dv__contacto span { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dv__contacto a { color: var(--navy-700); overflow-wrap: anywhere; }
.dv__volver { font-weight: 600; color: var(--navy-700); font-size: .92rem; }
.dv__titulo { margin-top: 0; }
.staff-grid--dv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news--dv { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Etiqueta de departamento en las noticias */
.card__dep, .noticia__dep { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .35rem; }
.card__dep + .card__dep { margin-left: .5rem; }
.noticia__dep { color: var(--gold); margin: 0; }

/* Tarjeta de persona: se puede tocar para ver su ficha */
.pcard__btn { all: unset; display: flex; flex-direction: column; cursor: pointer; border-radius: 10px; }
.pcard__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.pcard__btn:hover .pcard__name { color: var(--navy-700); text-decoration: underline; text-underline-offset: 3px; }

/* Ficha completa */
.perfil { border: 0; padding: 0; border-radius: 18px; width: min(760px, calc(100% - 32px)); max-height: calc(100% - 48px); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); background: #fff; color: var(--text, #1d2433); }
.perfil::backdrop { background: rgba(10, 18, 32, .55); }
.perfil__caja { position: relative; display: grid; grid-template-columns: 240px 1fr; }
.perfil__cerrar { position: absolute; top: .7rem; right: .7rem; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); cursor: pointer; font-size: 1rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); z-index: 1; }
.perfil__foto { background: var(--cream); min-height: 100%; }
.perfil__foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; min-height: 300px; }
.perfil__foto--vacia { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); min-height: 260px; }
.perfil__foto--vacia span { font-family: var(--serif); font-size: 3rem; color: var(--gold); }
.perfil__info { padding: 2rem 2rem 1.8rem; }
.perfil__info h2 { font-size: 1.7rem; margin: 0 2.5rem .3rem 0; }
.perfil__cargo { color: var(--muted); margin: 0 0 .8rem; }
.perfil__deps { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.perfil__deps a { font-size: .78rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; background: var(--cream); color: var(--navy-700); }
.perfil__frase { margin: 0 0 1.1rem; padding: .3rem 0 .3rem 1rem; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.1rem; font-style: italic; color: var(--heading); }
.perfil dl { margin: 0; display: grid; gap: .8rem; }
.perfil__dato dt { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dark); }
.perfil__dato dd { margin: .15rem 0 0; }
.perfil__contacto { display: flex; flex-direction: column; gap: .25rem; margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); }
.perfil__contacto a { color: var(--navy-700); overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .dv { grid-template-columns: 1fr; gap: 1.5rem; }
  .dv__side { position: static; }
  .dv__tiles { grid-template-columns: 1fr 1fr; }
  .dv__tile { grid-template-columns: 1fr; text-align: center; padding: .9rem; }
  .dv__tile-n { grid-row: auto; font-size: 1.8rem; }
  .dv__tile-s { display: none; }

  .staff-grid--dv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acas { grid-template-columns: 1fr; gap: .8rem; }
  .aca { flex-direction: row; }
  .aca__img { aspect-ratio: auto; width: 96px; flex: none; }
  .aca__img svg { width: 36px; height: 36px; }
  .aca__body { padding: .85rem 1rem; gap: .25rem; }
  .aca__name { font-size: 1.15rem; }
  .aca__desc { -webkit-line-clamp: 2; font-size: .86rem; }
  .news--dv { grid-template-columns: 1fr; }
  .perfil__caja { grid-template-columns: 1fr; }
  .perfil__foto img, .perfil__foto--vacia { min-height: 0; height: 260px; }
  .perfil__info { padding: 1.4rem 1.3rem 1.5rem; }
}

/* ---------- Calendario escolar y «Próximos eventos» ---------- */
:root {
  --ev-evento: var(--navy-700); --ev-reunion: #2f6db3; --ev-acto: #c7841a; --ev-evaluacion: #7b4bb3; --ev-feriado: #2e8b57; --ev-vacaciones: #2e8b57;
}
.eventos { display: grid; gap: 1rem; }
.eventos--inicio { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.evento { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 1rem; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; border-left: 4px solid var(--ev, var(--ev-evento)); }
.evento--reunion { --ev: var(--ev-reunion); } .evento--acto { --ev: var(--ev-acto); } .evento--evaluacion { --ev: var(--ev-evaluacion); }
.evento--feriado, .evento--vacaciones { --ev: var(--ev-feriado); }
.evento__fecha { display: grid; place-items: center; text-align: center; background: var(--cream); border-radius: 12px; padding: .5rem 0; line-height: 1; }
.evento__dia { font-family: "Fraunces", serif; font-size: 1.7rem; font-weight: 700; color: var(--navy-900); }
.evento__mes { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }
.evento__tipo { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ev, var(--ev-evento)); }
.evento__titulo { font-size: 1.08rem; margin: .15rem 0 .25rem; line-height: 1.3; }
.evento__meta { font-size: .86rem; color: var(--muted); margin: 0; }
.evento__desc { font-size: .92rem; margin: .5rem 0 0; color: var(--ink, inherit); }
.evento__link { display: inline-block; margin-top: .5rem; font-weight: 600; font-size: .9rem; color: var(--navy-700); }

.cal { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.cal__panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.cal__barra { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.cal__mes { flex: 1; text-align: center; font-size: 1.35rem; margin: 0; }
.cal__nav { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; color: var(--navy-900); cursor: pointer; }
.cal__nav:hover { background: var(--navy-900); color: #fff; }
.cal__hoy { margin-left: .25rem; }
.cal__grilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__dow { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: .3rem 0; }
.cal__dia { position: relative; min-height: 84px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: .35rem .4rem; text-align: left; display: flex; flex-direction: column; gap: 3px; font: inherit; color: inherit; cursor: default; }
.cal__dia--vacio { border: 0; background: transparent; }
.cal__dia.es-finde { background: #faf8f3; }
.cal__dia.es-libre { background: #edf7f0; }
.cal__dia.tiene { cursor: pointer; }
.cal__dia.tiene:hover { border-color: var(--navy-700); }
.cal__dia.is-active { border-color: var(--navy-900); box-shadow: 0 0 0 2px var(--navy-900) inset; }
.cal__dia:disabled { opacity: 1; }
.cal__num { font-size: .85rem; font-weight: 600; }
.cal__dia.es-hoy .cal__num { background: var(--gold); color: var(--navy-900); border-radius: 999px; padding: 0 .45rem; align-self: flex-start; }
.cal__evs { display: grid; gap: 2px; min-width: 0; }
.cal__ev { font-size: .68rem; line-height: 1.25; padding: 1px 5px; border-radius: 4px; color: #fff; background: var(--ev-evento); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal__ev--reunion { background: var(--ev-reunion); } .cal__ev--acto { background: var(--ev-acto); } .cal__ev--evaluacion { background: var(--ev-evaluacion); }
.cal__ev--feriado, .cal__ev--vacaciones { background: var(--ev-feriado); }
.cal__mas { font-size: .68rem; color: var(--muted); }
.cal__puntos { display: none; gap: 3px; }
.cal__puntos i, .cal__leyenda i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--ev-evento); }
i.cal__p--reunion { background: var(--ev-reunion); } i.cal__p--acto { background: var(--ev-acto); } i.cal__p--evaluacion { background: var(--ev-evaluacion); }
i.cal__p--feriado, i.cal__p--vacaciones { background: var(--ev-feriado); }
.cal__leyenda { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--muted); }
.cal__leyenda li { display: inline-flex; align-items: center; gap: .35rem; }
.cal__lista { display: grid; gap: .9rem; }
.cal__filtro { margin: 0; font-size: .9rem; color: var(--muted); }
.cal__filtro button { background: none; border: 0; padding: 0; color: var(--navy-700); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.evento__agregar { margin: .55rem 0 0; font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .25rem .7rem; align-items: baseline; }
.evento__agregar a, .evento__agregar button { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--navy-700); text-decoration: underline; cursor: pointer; }
.suscribir { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line, #e6e1d6); }
.suscribir h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.suscribir p { margin: 0 0 .8rem; font-size: .9rem; color: var(--muted); }
.suscribir__botones { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.suscribir .btn { padding: .55rem 1rem; font-size: .88rem; }
.suscribir small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 920px) { .cal { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .cal__panel { padding: .8rem; }
  .cal__grilla { gap: 3px; }
  .cal__dia { min-height: 48px; align-items: center; padding: .3rem .1rem; }
  .cal__evs { display: none; }
  .cal__puntos { display: flex; }
  .cal__mes { font-size: 1.15rem; }
  .evento { grid-template-columns: 54px minmax(0, 1fr); padding: .9rem 1rem; gap: .8rem; }
  .evento__dia { font-size: 1.45rem; }
}

/* ---------- Galería de fotos ---------- */
.albumes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.album { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: transform .25s, box-shadow .25s; }
.album:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.album__img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--navy-700), var(--navy-900)); overflow: hidden; }
.album__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.album:hover .album__img img { transform: scale(1.04); }
.album__n { position: absolute; right: .7rem; bottom: .7rem; background: rgba(0,0,0,.6); color: #fff; font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; }
.album__body { padding: 1rem 1.15rem 1.2rem; display: grid; gap: .2rem; }
.album__body strong { font-family: "Fraunces", serif; font-size: 1.15rem; color: var(--navy-900); line-height: 1.25; }
.album__body small { color: var(--muted); font-size: .85rem; }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.foto { padding: 0; border: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: var(--cream); cursor: zoom-in; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.foto:hover img { transform: scale(1.05); }
.visor { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(8,8,12,.94); color: #fff; }
.visor[open] { display: grid; place-items: center; }
.visor::backdrop { background: rgba(0,0,0,.6); }
.visor__img { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 6rem); object-fit: contain; border-radius: 6px; user-select: none; }
.visor__btn, .visor__cerrar { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.visor__btn { top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 2rem; line-height: 1; }
.visor__btn:hover, .visor__cerrar:hover { background: rgba(255,255,255,.25); }
.visor__prev { left: 1rem; } .visor__next { right: 1rem; }
.visor__cerrar { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.1rem; }
.visor__n { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); font-size: .9rem; opacity: .8; }
@media (max-width: 600px) {
  .albumes { grid-template-columns: minmax(0, 1fr); }
  .fotos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .foto { border-radius: 4px; }
  .visor__btn { width: 44px; height: 44px; margin-top: -22px; background: rgba(255,255,255,.08); }
  .visor__prev { left: .4rem; } .visor__next { right: .4rem; }
}

/* ---------- Compartir una noticia ---------- */
.compartir { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 2rem 0 1rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.compartir__t { font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: .3rem; }
.compartir__b { display: inline-flex; align-items: center; min-height: 40px; padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--navy-900); font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.compartir__b:hover { border-color: var(--navy-900); }
.compartir__b--wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.compartir__b--wa:hover { background: #17834a; border-color: #17834a; }
.compartir__b--fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.compartir__b--fb:hover { background: #1462c9; border-color: #1462c9; }

/* Enlace a la app desde Horarios */
.tt-app { margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: var(--radius, 14px); background: var(--cream, #f7f3ea); font-size: .95rem; }
.tt-app a { font-weight: 600; color: var(--navy-700); }
@media print { .tt-app { display: none; } }

/* Equipo directivo por secciones (organigrama) */
.team.team--grupos { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.team__titulo { font-family: var(--serif); font-size: 1.35rem; color: var(--navy-900); margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--gold); display: inline-block; }

/* Quien lidera un equipo (Equipos y funcionarios) */
.pcard--lider { position: relative; }
.pcard--lider .pcard__photo { box-shadow: 0 0 0 3px var(--gold); }
.pcard__lider { position: absolute; top: .5rem; left: .5rem; z-index: 1; background: var(--gold); color: var(--navy-900); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 999px; }

/* Buscador y filtros de noticias */
.news-tools { display: flex; flex-wrap: wrap; gap: .6rem; margin: -.5rem 0 1rem; }
.news-tools__buscar { position: relative; flex: 1 1 260px; }
.news-tools__buscar svg { position: absolute; left: .9rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--muted); pointer-events: none; }
.news-tools input, .news-tools select { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 999px; padding: .7rem 1rem; }
.news-tools input { padding-left: 2.6rem; }
.news-tools select { flex: 0 1 260px; width: auto; padding-right: 2rem; cursor: pointer; }
.news-tools input:focus, .news-tools select:focus { outline: 3px solid color-mix(in srgb, var(--gold) 55%, transparent); border-color: var(--gold); }
.news-tools__total { min-height: 1.4em; margin: 0 0 1rem; font-size: .9rem; color: var(--muted); }
.btn-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--navy-700); text-decoration: underline; cursor: pointer; }
@media (max-width: 600px) { .news-tools select { flex: 1 1 100%; } }

/* Formulario de contacto */
.form__trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__error { margin: .8rem 0 0; padding: .8rem 1rem; border-radius: 10px; background: #fdecea; color: #a1231a; font-weight: 600; font-size: .92rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
