/* ====== EDITA AQUÍ: colores y fuentes ====== */
:root {
  --azul-900: #061a3d;
  --azul-800: #0a2a5e;
  --azul-600: #1550c8;
  --azul-400: #4a9bff;
  --azul-100: #e8f1ff;
  --texto: #10213f;
  --suave: #3d4d6a;
  --blanco: #fff;
  --f-titulo: 'Sora', system-ui, sans-serif;
  --f-texto: 'Source Sans 3', system-ui, sans-serif;
  --nav-h: 72px;
}

.desing-by {
  color: white !important;
  transition: .1s;
}

.desing-by:hover {
  color: #9fbcf7 !important;
  transition: .2s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h)
}

body {
  font-family: var(--f-texto);
  color: var(--texto);
  background: var(--blanco);
  line-height: 1.65;
  font-size: 1.05rem
}

img {
  max-width: 100%;
  display: block
}

a {
  color: inherit;
  text-decoration: none
}

h1,
h2,
h3,
h4 {
  font-family: var(--f-titulo);
  line-height: 1.2
}

:focus-visible {
  outline: 3px solid var(--azul-400);
  outline-offset: 3px
}

.wrap {
  width: min(1120px, 92%);
  margin-inline: auto
}

section {
  padding: 96px 0
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  color: var(--azul-800);
  margin-bottom: 14px
}

.sub {
  color: var(--suave);
  max-width: 60ch;
  margin-bottom: 44px
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--azul-600);
  color: #fff;
  font-weight: 600;
  border: 2px solid var(--azul-600);
  transition: transform .25s, background .25s, box-shadow .25s
}

.btn:hover {
  background: var(--azul-400);
  border-color: var(--azul-400);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(21, 80, 200, .3)
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .7)
}

.btn.ghost:hover {
  background: #fff;
  color: var(--azul-800)
}

.btn.sm {
  padding: 8px 18px;
  font-size: .92rem
}

/* ====== LOADER (minimalista) ====== */
#loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, #0b2a5c, var(--azul-900) 70%);
  transition: opacity .7s, visibility .7s
}

#loader.fuera {
  opacity: 0;
  visibility: hidden
}

#loader.fuera .lo {
  transform: scale(.8);
  opacity: 0
}

.lo {
  position: relative;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  transition: transform .6s, opacity .6s
}

.lo::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(74, 155, 255, .4);
  animation: onda 2.4s ease-out infinite
}

.lo img {
  width: 38px;
  animation: resp 2.4s ease-in-out infinite
}

.lo svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%
}

.lo circle {
  fill: none;
  stroke-linecap: round;
  transform-origin: 50% 50%;
  transform-box: fill-box
}

.a1 {
  stroke: var(--azul-400);
  stroke-width: 1.5;
  stroke-dasharray: 80 210;
  animation: giro 1.5s cubic-bezier(.6, .1, .4, .9) infinite
}

.a2 {
  stroke: rgba(255, 255, 255, .4);
  stroke-width: 1;
  stroke-dasharray: 24 190;
  animation: giro 2.6s linear infinite reverse
}

@keyframes giro {
  to {
    transform: rotate(360deg)
  }
}

@keyframes resp {

  0%,
  100% {
    opacity: .55;
    transform: scale(.92)
  }

  50% {
    opacity: 1;
    transform: scale(1)
  }
}

@keyframes onda {
  0% {
    transform: scale(.7);
    opacity: .7
  }

  100% {
    transform: scale(1.5);
    opacity: 0
  }
}

/* ====== NAVBAR ====== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(6, 26, 61, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px
}

.nav .logo img {
  height: 46px
}

.menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none
}

.menu a {
  display: block;
  padding: 8px 14px;
  color: #dbe8ff;
  border-radius: 999px;
  font-size: .96rem;
  transition: background .2s, color .2s
}

.menu a:hover,
.menu a.activo {
  background: rgba(74, 155, 255, .2);
  color: #fff
}

.menu .campus {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--azul-600);
  color: #fff;
  font-weight: 600
}

.menu .campus img {
  height: 20px;
  filter: brightness(0) invert(1)
}

.menu .campus:hover {
  background: var(--azul-400)
}

.burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  width: 42px;
  height: 42px
}

.burger span {
  display: block;
  height: 2px;
  width: 24px;
  margin: 6px auto;
  background: #fff;
  transition: .3s
}

.burger.abierto span:nth-child(1) {
  transform: translateY(8px) rotate(45deg)
}

.burger.abierto span:nth-child(2) {
  opacity: 0
}

.burger.abierto span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg)
}

/* ====== HERO ====== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: center;
  color: #fff;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden;
  background: var(--azul-900)
}

.hero .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s;
  transform: scale(1.04)
}

.hero .slide.on {
  opacity: 1
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(6, 26, 61, .94) 10%, rgba(10, 42, 94, .7) 55%, rgba(21, 80, 200, .35))
}

.hero .wrap {
  position: relative;
  z-index: 2
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4.4rem);
  max-width: 15ch;
  margin-bottom: 20px;
  animation: entra 1s .9s both
}

.hero p {
  max-width: 52ch;
  color: #cfe0ff;
  font-size: 1.2rem;
  margin-bottom: 34px;
  animation: entra 1s 1.1s both
}

.hero .acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: entra 1s 1.3s both
}

@keyframes entra {
  from {
    opacity: 0;
    transform: translateY(28px)
  }
}

/* ====== CURSOS ====== */
.cursos {
  background: var(--azul-100)
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px
}

.curso {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 28px rgba(10, 42, 94, .08);
  transition: transform .35s, box-shadow .35s
}

.curso:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(10, 42, 94, .18)
}

.curso .foto {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--azul-800)
}

.curso .foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s
}

.curso:hover .foto img {
  transform: scale(1.08)
}

.curso .info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1
}

.curso h3 {
  font-size: 1.2rem;
  color: var(--azul-800)
}

.curso p {
  color: var(--suave);
  font-size: .98rem;
  flex: 1
}

.horario {
  font-size: .9rem;
  color: var(--azul-600);
  font-weight: 600
}

.curso .btn {
  align-self: flex-start;
  margin-top: 6px
}

.otros {
  margin-top: 40px
}

.otros h3 {
  color: var(--azul-800);
  font-size: 1.15rem;
  margin-bottom: 14px
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px
}

.chip {
  background: #fff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  padding: 10px 20px;
  color: var(--azul-800);
  font-weight: 600
}

.chip small {
  color: var(--azul-600);
  font-weight: 400;
  margin-left: 8px
}

/* ====== QUIÉNES SOMOS ====== */
.acerca .caja {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 56px;
  align-items: center
}

.acerca .emblema {
  background: linear-gradient(145deg, var(--azul-800), var(--azul-600));
  border-radius: 28px;
  padding: 56px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden
}

.acerca .emblema::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .14);
  right: -80px;
  bottom: -80px
}

.acerca .emblema img {
  width: 100%;
  max-width: 240px;
  position: relative;
  z-index: 1
}

.acerca p {
  color: var(--suave);
  margin-bottom: 26px;
  text-align: left
}

.acerca .tag {
  color: var(--azul-600);
  font-weight: 600;
  margin-bottom: 6px
}

/* ====== CAMPUS ====== */
.campus-sec {
  background: linear-gradient(160deg, var(--azul-900), var(--azul-800));
  color: #fff
}

.campus-sec h2 {
  color: #fff
}

.campus-sec .sub {
  color: #b9cff5
}

.evals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px
}

.eval {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  transition: background .25s, transform .25s
}

.eval:hover {
  background: rgba(74, 155, 255, .22);
  transform: translateX(4px)
}

.eval span {
  font-family: var(--f-titulo);
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.35
}

.eval b {
  flex: none;
  background: var(--azul-400);
  color: var(--azul-900);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: .88rem
}

/* ====== BIBLIOTECA ====== */
.lista {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px
}

.lista a {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid #d6e4ff;
  border-radius: 12px;
  transition: border-color .25s, background .25s, transform .25s
}

.lista a::before {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--azul-400)
}

.lista a:hover {
  background: var(--azul-100);
  border-color: var(--azul-600);
  transform: translateX(4px)
}

/* ====== POLÍTICAS ====== */
.politicas {
  background: var(--azul-100)
}

.mv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px
}

.mv article {
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  border-top: 5px solid var(--azul-600);
  box-shadow: 0 8px 28px rgba(10, 42, 94, .08)
}

.mv h3 {
  font-size: 1.5rem;
  color: var(--azul-800);
  margin-bottom: 12px
}

.mv p {
  color: #1a2b4a;
  font-size: 1.08rem
}

.firma {
  margin-top: 36px;
  text-align: center;
  color: var(--azul-800);
  font-family: var(--f-titulo);
  font-weight: 600;
  font-size: .95rem
}

/* ====== FOOTER ====== */
footer {
  position: relative;
  overflow: hidden;
  color: #c4d6f6;
  padding: 84px 0 28px;
  background: radial-gradient(circle at 85% 0, rgba(21, 80, 200, .55), transparent 55%), radial-gradient(circle at 0 100%, rgba(74, 155, 255, .18), transparent 50%), var(--azul-900)
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--azul-400), var(--azul-600), transparent)
}

.f-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 36px;
  align-items: stretch
}

.f-marca {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px
}

.f-marca .lg {
  height: 84px;
  width: fit-content
}

.f-marca p {
  font-family: var(--f-titulo);
  font-weight: 600;
  color: #fff;
  font-size: 1.05rem;
  max-width: 26ch;
  line-height: 1.4
}

.redes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px
}

.redes a {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  display: grid;
  place-items: center;
  transition: background .25s, transform .25s, border-color .25s
}

.redes a:hover {
  background: var(--azul-600);
  border-color: var(--azul-400);
  transform: translateY(-4px) rotate(-4deg)
}

.redes img {
  width: 22px;
  height: 22px;
  object-fit: contain
}

.f-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  padding: 34px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px)
}

.f-card h4 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 22px
}

.fila {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, .08)
}

.fila i {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--azul-600), var(--azul-400));
  display: grid;
  place-items: center;
  color: #fff
}

.fila svg {
  width: 20px;
  height: 20px
}

.tels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding-top: 9px
}

.tels a {
  color: #e4eeff;
  transition: color .2s
}

.tels a:hover {
  color: var(--azul-400)
}

.copy {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  text-align: center;
  font-size: .9rem;
  color: #9db6e3
}

/* ====== REVEAL ====== */
.js .rev {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s, transform .8s
}

.js .rev.vis {
  opacity: 1;
  transform: none
}

@media (max-width:900px) {
  section {
    padding: 72px 0
  }
}

@media (prefers-reduced-motion:reduce) {
  * {
    animation: none !important;
    transition: none !important
  }

  .js .rev {
    opacity: 1;
    transform: none
  }
}

.prog {
  display: none
}

/* ====== CARRUSELES (móvil y tablet) ====== */
@media (max-width:900px) {

  .grid,
  .evals,
  .lista {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4vw;
    gap: 14px;
    margin-inline: -4vw;
    padding: 6px 4vw 18px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain
  }

  .grid::-webkit-scrollbar,
  .evals::-webkit-scrollbar,
  .lista::-webkit-scrollbar {
    display: none
  }

  .prog {
    display: block;
    width: 110px;
    height: 3px;
    border-radius: 3px;
    margin: 4px auto 0;
    background: rgba(21, 80, 200, .18);
    overflow: hidden
  }

  .prog i {
    display: block;
    height: 100%;
    width: 30%;
    border-radius: 3px;
    background: var(--azul-600)
  }

  .campus-sec .prog {
    background: rgba(255, 255, 255, .18)
  }

  .campus-sec .prog i {
    background: var(--azul-400)
  }

  /* Cursos: tarjetas compactas */
  .curso {
    flex: 0 0 64%;
    max-width: 280px;
    scroll-snap-align: start
  }

  .curso .foto {
    aspect-ratio: 16/10
  }

  .curso .info {
    padding: 16px;
    gap: 8px
  }

  .curso h3 {
    font-size: 1.05rem
  }

  .curso p {
    font-size: .92rem
  }

  /* Campus: dos filas de tarjetas verticales */
  .evals {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: 72%
  }

  .eval {
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 124px;
    padding: 18px;
    scroll-snap-align: start;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(74, 155, 255, .18), rgba(255, 255, 255, .04))
  }

  .eval:hover {
    transform: none
  }

  /* Biblioteca: tomos con lomo y ícono */
  .lista a {
    flex: 0 0 62%;
    max-width: 260px;
    min-height: 176px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    scroll-snap-align: start;
    position: relative;
    padding: 20px;
    border: 0;
    border-left: 6px solid var(--azul-600);
    border-radius: 6px 18px 18px 6px;
    background: linear-gradient(160deg, var(--azul-100), #fff);
    box-shadow: 0 10px 26px rgba(10, 42, 94, .12);
    font-family: var(--f-titulo);
    font-size: .92rem;
    line-height: 1.4;
    color: var(--azul-800)
  }

  .lista a::before {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--azul-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M4 19V5M9 7h6'/%3E%3C/svg%3E") center/22px no-repeat
  }

  .lista a::after {
    content: "\2197";
    position: absolute;
    top: 18px;
    right: 18px;
    color: var(--azul-600);
    font-size: 1.2rem
  }

  .lista a:hover {
    transform: none
  }

  .f-grid {
    grid-template-columns: 1fr
  }

  .f-card {
    padding: 24px
  }
}

@media (min-width:600px) and (max-width:900px) {
  .curso {
    flex-basis: 40%
  }

  .evals {
    grid-auto-columns: 46%
  }

  .lista a {
    flex-basis: 34%
  }
}

/* ====== MENÚ DESPLEGABLE (lateral izquierdo / pantalla completa) ====== */
.nav {
  position: relative;
  z-index: 1
}

@media (max-width:1100px) {
  .burger {
    display: block;
    position: relative;
    z-index: 3
  }

  .nav .logo {
    position: relative;
    z-index: 3
  }

  .menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(360px, 88vw);
    height: 100vh;
    height: 100dvh;
    z-index: 2;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    padding: calc(var(--nav-h) + 16px) 28px 32px;
    background: linear-gradient(160deg, #0a2a5e, #061a3d 70%);
    box-shadow: 20px 0 60px rgba(0, 0, 0, .45);
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform .45s cubic-bezier(.7, 0, .2, 1), visibility .45s
  }

  .menu.abierto {
    transform: none;
    visibility: visible
  }

  .menu a {
    padding: 14px 18px;
    font-size: 1.15rem;
    border-radius: 14px
  }

  .menu .campus {
    justify-content: center;
    margin-top: 12px
  }

  .menu.abierto li {
    animation: liEntra .5s both;
    animation-delay: calc(var(--i, 0)*55ms + .15s)
  }

  body.menu-open {
    overflow: hidden
  }

  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(2, 10, 28, .55);
    z-index: 99
  }
}

@keyframes liEntra {
  from {
    opacity: 0;
    transform: translateX(-18px)
  }
}

@media (max-width:900px) {
  .menu {
    width: 100vw;
    padding-inline: 9vw
  }

  .menu a {
    font-size: 1.3rem
  }

  body.menu-open::after {
    display: none
  }
}

/* ====== INICIO: fondo difuminado ====== */
.hero .slide {
  filter: blur(5px);
  transform: scale(1.08)
}

/* ====== ACERCA: tablet y celular ====== */
@media (max-width:900px) {
  .acerca .caja {
    grid-template-columns: 1fr;
    gap: 26px
  }

  .acerca .emblema {
    justify-self: start;
    padding: 18px 24px;
    border-radius: 20px
  }

  .acerca .emblema::after {
    width: 110px;
    height: 110px;
    right: -34px;
    bottom: -34px
  }

  .acerca .emblema img {
    max-width: 96px
  }
}

/* ====== BIBLIOTECA: buscador ====== */
#bibliotecavirtual .sub {
  margin-bottom: 22px
}

.buscador {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 460px;
  height: 52px;
  margin-bottom: 28px;
  padding: 0 12px 0 18px;
  background: #fff;
  border: 1px solid #c9dcff;
  border-radius: 999px;
  transition: border-color .25s, box-shadow .25s
}

.buscador:focus-within {
  border-color: var(--azul-600);
  box-shadow: 0 0 0 4px rgba(21, 80, 200, .12)
}

.buscador svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--azul-600)
}

.buscador input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--texto)
}

.buscador input::-webkit-search-cancel-button {
  display: none
}

.cuenta {
  font-size: .82rem;
  color: var(--suave);
  white-space: nowrap
}

.limpia {
  display: none;
  flex: none;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--azul-100);
  color: var(--azul-800);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s
}

.limpia:hover {
  background: #cfe0ff
}

.buscador.tiene .limpia {
  display: block
}

.lista a[hidden],
.vacio[hidden] {
  display: none
}

.vacio {
  grid-column: 1/-1;
  align-self: start;
  color: var(--suave);
  padding: 14px 4px
}

@media (max-width:900px) {
  .buscador {
    max-width: none;
    margin-bottom: 20px
  }

  .vacio {
    flex: 0 0 100%
  }
}

/* ====== AJUSTES FINALES ====== */
/* Menú: más aire bajo la barra, centrado seguro y con scroll si la pantalla es baja */
@media (max-width:1100px) {
  .menu {
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: calc(var(--nav-h) + 28px)
  }

  .menu li:first-child {
    margin-top: auto
  }

  .menu li:last-child {
    margin-bottom: auto
  }
}

@media (max-width:900px) {
  .menu a {
    padding: 12px 16px;
    font-size: 1.2rem
  }
}

/* Acerca (tablet y celular): sin logo, tarjeta azul con el texto */
@media (max-width:900px) {
  .acerca .emblema {
    display: none
  }

  .acerca .caja {
    display: block
  }

  .acerca .caja>div:last-child {
    position: relative;
    overflow: hidden;
    max-width: 680px;
    margin-inline: auto;
    padding: 34px 26px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(150deg, var(--azul-800), var(--azul-600));
    box-shadow: 0 18px 40px rgba(10, 42, 94, .22)
  }

  .acerca .caja>div:last-child::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .12);
    right: -90px;
    top: -90px;
    pointer-events: none
  }

  .acerca .caja>div:last-child h2 {
    color: #fff;
    font-size: 1.6rem
  }

  .acerca .caja>div:last-child p {
    color: #e1ecff
  }

  .acerca .caja>div:last-child .tag {
    color: #9cc7ff
  }

  .acerca .caja>div:last-child .btn {
    background: #fff;
    border-color: #fff;
    color: var(--azul-800)
  }

  .acerca .caja>div:last-child .btn:hover {
    background: var(--azul-100);
    border-color: var(--azul-100)
  }
}

/* Biblioteca (PC): tarjetas de tamaño fijo, la lista no se estira al buscar */
@media (min-width:901px) {
  .lista {
    align-content: start;
    grid-auto-rows: minmax(96px, auto)
  }

  .lista a {
    font-size: 1rem;
    line-height: 1.4;
    padding: 14px 18px
  }
}

/* ====== VER TODOS LOS CURSOS: etiquetas con enlace ====== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 14px
}

.chips .chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 26px;
  background: #fff;
  border: 1px solid #cfe0ff;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(10, 42, 94, .07);
  color: var(--azul-800);
  font-weight: 600;
  transition: transform .25s, background .25s, color .25s, border-color .25s, box-shadow .25s
}

.chips .chip::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--azul-600), var(--azul-400));
  transition: background .25s
}

.chips .chip:hover {
  background: var(--azul-600);
  border-color: var(--azul-600);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(21, 80, 200, .28)
}

.chips .chip:hover small {
  color: #cfe0ff
}

.chips .chip:hover::before {
  background: #fff
}

/* ====== CAMPUS: buscador (mismo diseño que Biblioteca) ====== */
#campus .sub {
  margin-bottom: 22px
}

.evals .eval[hidden] {
  display: none
}

.campus-sec .vacio {
  color: #b9cff5
}

@media (min-width:901px) {
  .evals {
    align-content: start;
    grid-auto-rows: minmax(72px, auto)
  }
}

@media (max-width:900px) {
  .evals {
    align-content: start
  }

  .evals .vacio {
    grid-column: auto;
    grid-row: 1
  }
}

/* ====== BOTÓN VOLVER ARRIBA ====== */
.subir {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, var(--azul-600), var(--azul-400));
  box-shadow: 0 10px 26px rgba(10, 42, 94, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .35s, transform .35s, visibility .35s, box-shadow .25s
}

.subir.ver {
  opacity: 1;
  visibility: visible;
  transform: none
}

.subir:hover {
  box-shadow: 0 14px 32px rgba(21, 80, 200, .5)
}

.subir svg {
  width: 22px;
  height: 22px
}

/* Íconos de redes minimalistas (línea fina) */
.redes a {
  color: #dbe8ff
}

.redes a:hover {
  color: #fff
}

.redes svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round
}

/* Buscador: borde con más contraste */
.buscador {
  border: 1.5px solid #7fa2e0;
  box-shadow: 0 2px 10px rgba(10, 42, 94, .08)
}

.buscador:focus-within {
  border-color: var(--azul-600);
  box-shadow: 0 0 0 4px rgba(21, 80, 200, .14)
}

/* Biblioteca (PC): borde de las tarjetas con un poco más de contraste */
@media (min-width:901px) {
  .lista a {
    border: 1.5px solid #a3bfec;
    box-shadow: 0 2px 8px rgba(10, 42, 94, .06)
  }

  .lista a:hover {
    border-color: var(--azul-600)
  }
}

/* Respaldo si el JavaScript no corre (vista previa de WhatsApp, Archivos del iPhone, etc.) */
html:not(.js) #loader {
  display: none
}

#loader {
  animation: autoOcultar .6s 6s forwards
}

@keyframes autoOcultar {
  to {
    opacity: 0;
    visibility: hidden
  }
}

/* ===== Balanza en las tarjetas de la Biblioteca ===== */

/* PC: insignia azul claro con la balanza en azul */
@media (min-width:901px) {
  .lista a::before {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex: none;
    background: var(--azul-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231550c8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='4' r='1'/%3E%3Cpath d='M12 5v15M8 21h8M5 7h14'/%3E%3Cpath d='M5 7l-3 7M5 7l3 7M19 7l-3 7M19 7l3 7'/%3E%3Cpath d='M2 14h6a3 3 0 0 1-6 0zM16 14h6a3 3 0 0 1-6 0z'/%3E%3C/svg%3E") center/24px no-repeat;
  }

  .lista a:hover::before {
    background-color: #d3e4ff
  }
}

/* Tablet y celular: insignia azul fuerte con la balanza en blanco (reemplaza el libro) */
@media (max-width:900px) {
  .lista a::before {
    background: var(--azul-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='4' r='1'/%3E%3Cpath d='M12 5v15M8 21h8M5 7h14'/%3E%3Cpath d='M5 7l-3 7M5 7l3 7M19 7l-3 7M19 7l3 7'/%3E%3Cpath d='M2 14h6a3 3 0 0 1-6 0zM16 14h6a3 3 0 0 1-6 0z'/%3E%3C/svg%3E") center/24px no-repeat;
  }
}