/* ============================================================================
   Sitio de cada colegio (Red Educativa) · capa de rediseño
   Se carga DESPUÉS del <style> propio de views/red-educativa/partials/head.ejs.

   Identidad: institucional, seria y cercana. Serif cálida para los títulos, el color institucional
   como protagonista (las paletas y el tema oscuro del panel de apariencia siguen funcionando porque
   todo usa las variables --primary, --accent, --surface, --line, --text-*), fotografías enteras
   (nunca recortadas) y listas editoriales en lugar de iconos dentro de círculos.
   NO se comparte estilo con codeenlinea.com: es otra marca.
   ============================================================================ */

:root { --r-1: 6px; --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --accent-ink: var(--accent); }
/* En modo oscuro el acento (rojo/ocre institucional) se aclara cuando se usa como TEXTO, para cumplir contraste */
:root[data-theme="dark"] { --accent-ink: color-mix(in srgb, var(--accent) 48%, #fff); }

/* ---------- Animaciones de entrada: seguras sin JS (las activa animaciones.js) ---------- */
.reveal { opacity: 1; transform: none; transition: none; }
.anim-wait { opacity: 0; transform: translate3d(0, 22px, 0); will-change: opacity, transform; }
.anim-wait[data-anim="fade"] { transform: none; }
.anim-wait[data-anim="left"] { transform: translate3d(-16px, 0, 0); }
.anim-wait[data-anim="zoom"] { transform: scale(0.965); }
.anim-wait.anim-in { opacity: 1; transform: none; will-change: auto; transition: opacity 0.7s var(--ease-out), transform 0.85s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
@media print { .anim-wait { opacity: 1 !important; transform: none !important; } }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
/* El foco por teclado y los enlaces ancla no deben quedar bajo la cabecera fija */
html { scroll-padding-top: 96px; }
.main-header { transition: box-shadow 0.3s ease, padding 0.3s var(--ease-out), background-color 0.3s ease; }
.main-header.is-scrolled { padding-top: 8px; padding-bottom: 8px; box-shadow: 0 12px 30px -22px rgba(0, 0, 0, 0.5); }
.brand-text h1 { letter-spacing: -0.01em; }

/* ---------- Botones: cada tipo con su comportamiento ---------- */
.btn-primary, .btn-secondary, .btn-accent, .btn-outline, .top-login {
  position: relative; overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
}
.btn-primary::after, .btn-secondary::after, .btn-accent::after, .btn-outline::after {
  content: ""; position: absolute; left: var(--rx, 50%); top: var(--ry, 50%); width: 160%; aspect-ratio: 1; margin: -80% 0 0 -80%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 62%); transform: scale(0); opacity: 0; pointer-events: none; z-index: 0;
}
.is-ripple.btn-primary::after, .is-ripple.btn-secondary::after, .is-ripple.btn-accent::after, .is-ripple.btn-outline::after { animation: re-ripple 0.6s var(--ease-out); }
@keyframes re-ripple { 0% { transform: scale(0); opacity: 0.9; } 100% { transform: scale(1); opacity: 0; } }
.btn-primary > *, .btn-secondary > *, .btn-accent > * { position: relative; z-index: 1; }
.btn-primary svg, .btn-secondary svg, .btn-accent svg { transition: transform 0.3s var(--ease-out); }
.btn-primary:hover svg, .btn-secondary:hover svg, .btn-accent:hover svg { transform: translateX(3px); }

/* Principal: brillo que cruza y elevación */
.btn-primary { background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 78%, #000)); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 22px -14px color-mix(in srgb, var(--primary) 80%, transparent); }
.btn-primary::before { content: ""; position: absolute; inset: 0 auto 0 -70%; width: 40%; background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.28), transparent); transform: skewX(-18deg); transition: left 0.55s var(--ease-out); z-index: 0; pointer-events: none; }
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-light), var(--primary)); transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 20px 30px -16px color-mix(in srgb, var(--primary) 85%, transparent); }
.btn-primary:hover::before { left: 135%; }
.btn-primary:active { transform: translateY(0) scale(0.975); transition-duration: 0.08s; }

/* Acento (contacto): sobrio, con elevación y sombra de su color */
.btn-accent { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 12px 22px -14px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-accent:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 20px 30px -16px color-mix(in srgb, var(--accent) 85%, transparent); }

/* Secundario: contorno que se rellena desde la izquierda */
.btn-secondary { background: transparent; color: var(--text-main); border: 1.5px solid color-mix(in srgb, var(--text-main) 55%, transparent); box-shadow: none; }
.btn-secondary::before { content: ""; position: absolute; inset: 0; background: var(--text-main); transform: scaleX(0); transform-origin: left center; transition: transform 0.38s var(--ease-out); z-index: -1; }
.btn-secondary:hover { color: var(--surface); transform: translateY(-1px); box-shadow: none; border-color: var(--text-main); }
.btn-secondary:hover::before { transform: scaleX(1); }
:root[data-theme="dark"] .btn-secondary { background: transparent; border-color: rgba(255, 255, 255, 0.4); color: var(--text-main); }
:root[data-theme="dark"] .btn-secondary:hover { color: #14160f; }

/* Enlaces de acción: subrayado que se dibuja */
.noticia-body a, .news-link, .sede-map { background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1.5px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 0.35s var(--ease-out), color 0.2s ease; padding-bottom: 2px; }
.noticia-body a:hover, .news-link:hover, .sede-map:hover { background-size: 100% 1.5px; }

/* Controles compactos: respuesta de color y presión, sin elevación */
.tool-btn:hover, .menu-btn:hover { transform: none; }
.menu-btn:hover { filter: brightness(1.12); }

/* Estados: desactivado y enviando */
.btn-primary[disabled], .btn-secondary[disabled], .btn-accent[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.is-loading { color: transparent !important; cursor: progress; }
.is-loading::before { display: none; }
.is-loading::after { left: 50%; top: 50%; width: 1.15em; height: 1.15em; margin: -0.575em 0 0 -0.575em; aspect-ratio: auto; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; background: none; transform: none; opacity: 1; animation: re-spin 0.7s linear infinite; }
@keyframes re-spin { to { transform: rotate(360deg); } }

/* ---------- Portada (hero) ---------- */
.hero-content h2 { font-size: calc(clamp(2.1rem, 4.8vw, 3.7rem) * var(--fs, 1)); line-height: 1.06; letter-spacing: -0.02em; }
.hero-content h2 em { font-style: italic; font-weight: 600; background: linear-gradient(transparent 80%, color-mix(in srgb, var(--accent) 22%, transparent) 80%); }
.hero-kicker { background: transparent; color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); padding: 6px 14px 6px 10px; letter-spacing: 0.1em; }
.hero-media { border-radius: var(--r-1); border: 0; aspect-ratio: 4 / 3; box-shadow: 14px 14px 0 color-mix(in srgb, var(--primary) 16%, transparent), 0 34px 60px -30px rgba(10, 14, 11, 0.6); }
.hero-media:hover { transform: translate(-2px, -2px); box-shadow: 16px 16px 0 color-mix(in srgb, var(--primary) 20%, transparent), 0 38px 64px -30px rgba(10, 14, 11, 0.6); }
@media (max-width: 900px) { .hero-media { aspect-ratio: 16 / 10; box-shadow: 8px 8px 0 color-mix(in srgb, var(--primary) 16%, transparent), 0 24px 40px -24px rgba(10, 14, 11, 0.6); margin-right: 8px; } }

/* ---------- Acceso rápido ---------- */
.quick-links { max-width: 1230px; margin: 0 auto; padding: 0 5%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; z-index: 2; }
.ql { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px; padding: 22px 22px 20px; background: var(--surface); border: 1px solid var(--line); border-left-width: 0; text-decoration: none; color: var(--text-main); overflow: hidden; isolation: isolate; transition: background-color 0.3s ease, color 0.3s ease; }
.ql:first-child { border-left-width: 1px; border-radius: var(--r-1) 0 0 var(--r-1); }
.ql:last-child { border-radius: 0 var(--r-1) var(--r-1) 0; }
.ql::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--primary); transform: scaleX(0.25); transform-origin: left; transition: transform 0.5s var(--ease-out), background-color 0.3s ease; }
.ql::after { content: ""; position: absolute; inset: 0; background: var(--primary); transform: scaleY(0); transform-origin: bottom; transition: transform 0.5s var(--ease-out); z-index: -1; }
.ql-k { font: 700 0.7rem/1 'Manrope', sans-serif; letter-spacing: 0.14em; color: var(--accent-ink); }
.ql strong { font: 600 calc(1.25rem * var(--fs, 1))/1.15 'Lora', Georgia, serif; }
.ql-d { font-size: calc(0.84rem * var(--fs, 1)); color: var(--text-muted); line-height: 1.5; }
.ql-go { justify-self: end; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); transition: transform 0.4s var(--ease-out), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.ql-go svg { width: 15px; height: 15px; }
@media (hover: hover) {
  .ql:hover::before { transform: scaleX(1); background: var(--accent); }
  .ql:hover::after { transform: scaleY(1); }
  .ql:hover { color: #fff; }
  .ql:hover .ql-d { color: rgba(255, 255, 255, 0.82); }
  .ql:hover .ql-k { color: rgba(255, 255, 255, 0.85); }
  .ql:hover .ql-go { transform: translateX(4px); background: #fff; color: var(--primary); border-color: #fff; }
}
.ql:focus-visible { outline-offset: -3px; }
@media (max-width: 900px) {
  .quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ql { border-left-width: 1px; border-top-width: 0; border-radius: 0; }
  .ql:nth-child(-n+2) { border-top-width: 1px; }
  .ql:nth-child(1) { border-radius: var(--r-1) 0 0 0; } .ql:nth-child(2) { border-radius: 0 var(--r-1) 0 0; }
  .ql:nth-child(3) { border-radius: 0 0 0 var(--r-1); } .ql:nth-child(4) { border-radius: 0 0 var(--r-1) 0; }
}
@media (max-width: 520px) { .quick-links { grid-template-columns: 1fr; } .ql, .ql:nth-child(n) { border-radius: 0; border-top-width: 0; border-left-width: 1px; } .ql:first-child { border-top-width: 1px; border-radius: var(--r-1) var(--r-1) 0 0; } .ql:last-child { border-radius: 0 0 var(--r-1) var(--r-1); } }

/* ---------- Quiénes somos: misión y visión ---------- */
.proposito-sec { padding-top: clamp(56px, 8vw, 104px); }
.proposito { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.proposito-head .eyebrow { font-size: calc(11.5px * var(--fs, 1)); font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.proposito-head .eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.proposito-head h3 { font-size: calc(clamp(1.7rem, 3.4vw, 2.6rem) * var(--fs, 1)); line-height: 1.12; letter-spacing: -0.015em; color: var(--primary-ink); }
.proposito-cols { display: grid; gap: 0; }
.proposito-cols article { padding: 24px 0; border-top: 2px solid var(--primary); }
.proposito-cols article + article { border-top-width: 1px; border-top-color: var(--line); }
.proposito-cols h4 { font: 800 calc(0.72rem * var(--fs, 1))/1 'Manrope', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary-ink); margin-bottom: 12px; }
.proposito-cols p { font-size: calc(1.06rem * var(--fs, 1)); line-height: 1.75; color: var(--text-main); max-width: 62ch; }
@media (max-width: 900px) { .proposito { grid-template-columns: 1fr; } }

/* ---------- Encabezados de sección: a la izquierda, sin iconos en círculos ---------- */
.section-head { text-align: left; max-width: none; margin: 0 0 clamp(24px, 4vw, 40px); display: block; }
.section-head .eyebrow { display: flex; align-items: center; gap: 10px; color: var(--accent-ink); letter-spacing: 0.12em; }
.section-head .eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.section-head h3 { justify-content: flex-start; font-size: calc(clamp(1.6rem, 3.2vw, 2.4rem) * var(--fs, 1)); line-height: 1.12; letter-spacing: -0.015em; margin-top: 10px; }
.section-head .section-icon { display: none; }
.section { padding-top: clamp(44px, 6vw, 80px); padding-bottom: clamp(44px, 6vw, 80px); }

/* ---------- Videos ---------- */
.video-card { border-radius: var(--r-1); box-shadow: none; transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.3s ease; }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.video-play { width: 58px; height: 58px; transition: transform 0.3s var(--ease-out), background-color 0.25s ease; }
.video-thumb:hover .video-play { background: #fff; transform: translate(-50%, -50%) scale(1.08); }
.video-info h4 { font-size: calc(1rem * var(--fs, 1)); }

/* ---------- Noticias: carrusel de portada ---------- */
.noticia-slide.active { border-radius: var(--r-1); box-shadow: none; }
.noticia-slide.active:hover { box-shadow: var(--shadow-hover); }
.noticia-body h4 { font-size: calc(1.4rem * var(--fs, 1)); letter-spacing: -0.01em; }
.noticia-body .fecha { font-family: 'Manrope', sans-serif; letter-spacing: 0.12em; color: var(--accent-ink); }
.ver-todas-icon { width: 44px; height: 44px; box-shadow: none; transition: transform 0.35s var(--ease-out), background-color 0.25s ease; }
.ver-todas-icon:hover { transform: translateX(4px); box-shadow: none; }

/* ---------- Noticias: página ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: clamp(20px, 3vw, 32px); }
.news-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-1); overflow: hidden; transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out); }
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.news-card > a { display: block; background: color-mix(in srgb, var(--primary) 8%, var(--background)); }
.news-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; transition: transform 0.6s var(--ease-out); }
.news-card:hover img { transform: scale(1.03); }
.news-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.news-body .fecha { font: 800 calc(0.68rem * var(--fs, 1))/1 'Manrope', sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); }
.news-body h4 { font-size: calc(1.2rem * var(--fs, 1)); line-height: 1.3; }
.news-body p { color: var(--text-muted); font-size: calc(0.9rem * var(--fs, 1)); line-height: 1.65; font-family: 'Manrope', sans-serif; }
.news-link { align-self: flex-start; font-weight: 700; color: var(--primary-ink); text-decoration: none; font-size: calc(0.86rem * var(--fs, 1)); }

/* ---------- Sedes ---------- */
.sede-strip-card, .sede-card { border-radius: var(--r-1); box-shadow: none; }
.sede-strip-card .module-icon, .sede-card .module-icon { display: none; }
.sede-strip-card { border-left: 3px solid var(--primary); }
.sede-strip-card:hover, .sede-card:hover { transform: translateY(-4px); }
.sede-strip-card::before, .sede-card::before { display: none; }
.sede-strip-card h4, .sede-card h4 { font-size: calc(1.15rem * var(--fs, 1)); }
.sede-pill { background: transparent; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent-ink); border-radius: 3px; letter-spacing: 0.1em; }

/* ---------- Documentos institucionales: lista con flecha ---------- */
.descargables { display: block; max-width: none; margin: 0; border-bottom: 1px solid var(--line); }
.descargable-btn { display: flex; width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; padding: 20px 8px; font: 600 calc(1.05rem * var(--fs, 1))/1.3 'Lora', Georgia, serif; position: relative; overflow: hidden; isolation: isolate; transition: padding 0.4s var(--ease-out), color 0.25s ease; }
.descargable-btn::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--primary) 7%, transparent); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ease-out); z-index: -1; }
.descargable-btn::after { content: "\2197"; margin-left: auto; font: 400 1.2rem/1 'Manrope', sans-serif; color: var(--accent-ink); transition: transform 0.35s var(--ease-out); }
.descargable-btn:hover { transform: none; box-shadow: none; background: transparent; border-color: var(--line); padding-left: 18px; color: var(--primary-ink); }
.descargable-btn:hover::before { transform: scaleX(1); }
.descargable-btn:hover::after { transform: translate(3px, -3px); }
.descargable-icon { border-radius: 4px; width: 36px; height: 36px; }

/* ---------- Galería: mosaico con fotografías completas ---------- */
.gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); grid-auto-rows: 230px; grid-auto-flow: dense; gap: clamp(12px, 2vw, 20px); }
.gallery-card { margin: 0; border-radius: var(--r-1); aspect-ratio: auto; box-shadow: none; background: color-mix(in srgb, var(--primary) 30%, #0d0f0c); isolation: isolate; }
.gallery-card:nth-child(7n + 1) { grid-column: span 2; grid-row: span 2; }
.gallery-card:nth-child(7n + 4) { grid-row: span 2; }
.gallery-card .bg { position: absolute; left: -8%; top: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(20px) saturate(1.1) brightness(0.8); opacity: 0.95; z-index: -1; transform: none; }
.gallery-card .fg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 0.7s var(--ease-out); }
.gallery-card:hover .fg { transform: scale(1.035); }
.gallery-card:hover .bg { transform: none; }
.gallery-card .cap { transform: translateY(6px); opacity: 0.95; transition: transform 0.4s var(--ease-out); }
.gallery-card:hover .cap { transform: none; }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; } .gallery-card:nth-child(7n + 1) { grid-column: span 2; } }

/* ---------- Banner de páginas interiores ---------- */
.page-banner { position: relative; overflow: hidden; text-align: left; padding: clamp(44px, 6vw, 84px) max(5%, calc((100vw - 1230px) / 2 + 5%)) clamp(36px, 5vw, 64px); background: linear-gradient(150deg, var(--primary), color-mix(in srgb, var(--primary) 40%, #0d0f0c)); }
.page-banner::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1.6px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(70% 120% at 90% 0%, #000, transparent 75%); mask-image: radial-gradient(70% 120% at 90% 0%, #000, transparent 75%); }
.page-banner > * { position: relative; }
.page-banner .eyebrow { display: flex; align-items: center; gap: 10px; opacity: 0.9; letter-spacing: 0.14em; }
.page-banner .eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; opacity: 0.7; }
.page-banner h2 { font-size: calc(clamp(2rem, 4.6vw, 3.4rem) * var(--fs, 1)); line-height: 1.08; letter-spacing: -0.02em; margin-top: 12px; max-width: 18ch; }
.page-banner .eyebrow, .page-banner h2 { animation: re-rise 0.7s var(--ease-out) both; }
.page-banner h2 { animation-delay: 0.08s; }
@keyframes re-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Pie: enlaces como lista ---------- */
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.footer-links a { flex-direction: row; justify-content: flex-start; gap: 12px; width: auto; text-align: left; background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0; padding: 14px 2px; font-size: calc(0.9rem * var(--fs, 1)); position: relative; transition: padding 0.35s var(--ease-out), color 0.2s ease, border-color 0.2s ease; }
.footer-links a:hover { transform: none; background: none; border-color: var(--accent-ink); padding-left: 10px; }
.footer-link-icon { width: 30px; height: 30px; border-radius: 4px; }
.social-btn { transition: transform 0.3s var(--ease-out), background-color 0.25s ease, border-color 0.25s ease; }

/* ---------- Formularios ---------- */
.re-form { border-radius: var(--r-1); box-shadow: none; }
.re-form input, .re-form select, .re-form textarea { border-width: 1.5px; border-radius: 8px; transition: border-color 0.18s ease, box-shadow 0.18s ease; }
.re-form input:hover, .re-form select:hover, .re-form textarea:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--line)); }
.re-form input:focus, .re-form select:focus, .re-form textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.re-alert { border-left-width: 4px; border-radius: var(--r-1); animation: re-rise 0.45s var(--ease-out) both; }

/* ---------- Tarjetas con criterio ---------- */
.card, .info-tile, .coordinador-card { border-radius: var(--r-1); box-shadow: none; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.doc-row { border-radius: var(--r-1); box-shadow: none; }
.tag-pill { border-radius: 3px; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Estados vacíos ---------- */
.empty-note { text-align: left; max-width: 560px; margin: 0; padding: 22px 26px; border: 1.5px dashed var(--line); border-radius: var(--r-1); background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 30%, transparent) 14px 15px); }

/* ---------- Institucion y tramites: lectura editorial en lugar de tarjetas iguales ---------- */
.mv-grid { gap: 40px; }
.mv-grid .card { background: transparent; border: 0; border-top: 3px solid var(--accent); border-radius: 0; box-shadow: none; padding: 20px 2px 0; }
.mv-grid .card:hover { transform: none; box-shadow: none; }
.mv-grid .card p { font-family: 'Lora', Georgia, serif; font-size: calc(18px * var(--fs, 1)); line-height: 1.65; color: var(--text-main); }
.info-facts { gap: 0 28px; margin-top: 44px; border-bottom: 1px solid var(--line); }
.info-facts .info-tile { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 16px 0 18px; }
.info-facts .info-tile .v { font-size: calc(15.5px * var(--fs, 1)); }
.procedimiento-card { max-width: none; margin: 0; background: var(--surface); border: 0; border-left: 4px solid var(--accent); border-radius: 0 var(--r-1) var(--r-1) 0; padding: 24px 28px; }
.procedimiento-card:hover { transform: none; box-shadow: none; }
.procedimiento-card h3 { font-family: 'Lora', Georgia, serif; font-size: calc(22px * var(--fs, 1)); }
.procedimiento-card p { max-width: 70ch; color: var(--text-main); }

/* ---------- Galeria: enlace para ampliar + visor (lightbox) ---------- */
.gallery-open { position: absolute; inset: 0; z-index: 3; cursor: zoom-in; border-radius: inherit; }
.gallery-open:focus-visible { outline: 3px solid #fff; outline-offset: -6px; box-shadow: inset 0 0 0 6px var(--accent); }
.gallery-card .cap { pointer-events: none; z-index: 4; }
.visor { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: transparent; color: #fff; }
.visor[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: visor-in 0.28s var(--ease-out) both; }
.visor::backdrop { background: rgba(7, 11, 9, 0.93); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes visor-in { from { opacity: 0; } to { opacity: 1; } }
.visor-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font: 700 0.8rem/1 'Manrope', sans-serif; letter-spacing: 0.08em; }
.visor-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; transition: background 0.2s ease, transform 0.2s var(--ease-out); }
.visor-close:hover { background: rgba(255, 255, 255, 0.2); transform: rotate(90deg); }
.visor-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 0 64px; }
.visor-img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); opacity: 0; transform: scale(0.985); transition: opacity 0.3s ease, transform 0.4s var(--ease-out); background: rgba(255, 255, 255, 0.04); }
.visor-img.is-in { opacity: 1; transform: none; }
.visor-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transition: background 0.2s ease; }
.visor-nav:hover:not(:disabled) { background: rgba(255, 255, 255, 0.24); }
.visor-nav:disabled { opacity: 0.3; cursor: default; }
.visor-prev { left: 8px; } .visor-next { right: 8px; }
.visor-cap { margin: 0; padding: 14px 20px 20px; text-align: center; font: 600 0.95rem/1.45 'Manrope', sans-serif; color: rgba(255, 255, 255, 0.92); }
@media (max-width: 600px) { .visor-img { max-height: calc(100vh - 215px); max-height: calc(100dvh - 215px); } .visor-stage { padding: 0 8px; } .visor-nav { top: auto; bottom: -4px; transform: none; width: 52px; height: 52px; } .visor-prev { left: 12px; } .visor-next { right: 12px; } .visor-cap { padding-bottom: 72px; } }
@media (prefers-reduced-motion: reduce) { .visor[open], .visor-img, .visor-close { animation: none; transition: none; } .visor-img { opacity: 1; transform: none; } }
html[data-motion="reduced"] .visor[open], html[data-motion="reduced"] .visor-img, html[data-motion="reduced"] .visor-close { animation: none; transition: none; } html[data-motion="reduced"] .visor-img { opacity: 1; transform: none; }
body:has(dialog.visor[open]) { overflow: hidden; }

/* ---------- Videos accesibles, noticia destacada y sede central ---------- */
button.video-thumb { display: block; width: 100%; padding: 0; border: 0; font: inherit; color: inherit; text-align: left; border-radius: 0; }
.video-thumb:focus-visible { outline: 3px solid #fff; outline-offset: -6px; box-shadow: inset 0 0 0 6px var(--accent); }
.video-thumb .video-play { pointer-events: none; }
.video-thumb.is-playing { cursor: default; }
@media (min-width: 900px) {
  .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-grid > .news-card:first-child:not(:only-child) { grid-column: 1 / -1; flex-direction: row; align-items: stretch; }
  .news-grid > .news-card:first-child:not(:only-child) > a { flex: 0 0 52%; }
  .news-grid > .news-card:first-child:not(:only-child) img { height: 100%; aspect-ratio: auto; min-height: 320px; }
  .news-grid > .news-card:first-child:not(:only-child) .news-body { justify-content: center; padding: 36px 40px; gap: 14px; border-left: 4px solid var(--accent); }
  .news-grid > .news-card:first-child:not(:only-child) .news-body h4 { font-family: 'Lora', Georgia, serif; font-size: calc(1.9rem * var(--fs, 1)); line-height: 1.2; }
  .news-grid > .news-card:first-child:not(:only-child) .news-body p { font-size: calc(1.05rem * var(--fs, 1)); max-width: 56ch; }
}
@media (min-width: 900px) { .grid-auto > .sede-card:first-child:not(:only-child) { grid-column: span 2; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--primary) 6%, var(--surface)); } }
.video-thumb .platform { flex-direction: row; align-items: flex-end; justify-content: flex-start; gap: 8px; padding: 14px 16px; font-size: calc(0.72rem * var(--fs, 1)); letter-spacing: 0.1em; text-transform: uppercase; }
.video-thumb .platform svg { width: 22px; height: 22px; flex: none; }

/* ---------- Portada: la imagen manda (mas alta y ancha que el bloque de texto) ---------- */
@media (min-width: 901px) {
  .hero { max-width: 1360px; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(28px, 3.6vw, 56px); }
  .hero-content { max-width: 560px; }
  .hero-media { aspect-ratio: auto; min-height: clamp(540px, 45vw, 700px); align-self: stretch; margin-block: -22px; }
}
