/* CHESO · hoja de estilos
   Paleta y tipografía heredadas del sitio anterior (Mobirise):
   primario #55b4d4, secundario #ff3366, tipografía Rubik. */

:root {
  --primario: #55b4d4;
  --primario-osc: #2d8fb0;
  --azul-texto: #1a7a99;      /* azul con contraste suficiente sobre blanco (≈4.9:1) */
  --hero: #149dcc;
  --secundario: #ff3366;
  --texto: #232323;
  --gris: #5f5f5f;
  --fondo-alt: #f1f6f8;
  --pie: #767676;
  --oscuro: #232323;
  --radio: .6rem;
  --sombra: 0 1px 3px rgba(0, 0, 0, .12), 0 4px 14px rgba(0, 0, 0, .06);
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--texto);
  background: #fff;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul-texto); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--secundario); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 2rem; font-weight: 500; text-align: center; margin-bottom: 1.2em; }
h3 { font-size: 1.1rem; font-weight: 500; }
p { margin: 0 0 1em; }
em { font-style: italic; }

.contenedor { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.centro { text-align: center; }
.saltar { position: absolute; left: -999px; top: 0; background: #fff; padding: .5rem 1rem; z-index: 100; }
.saltar:focus { left: 0; }

/* ---------- menú ---------- */
.menu { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.menu-interior { width: min(100% - 2rem, var(--max)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; gap: 1rem; }
.logo img { height: 3.4rem; width: auto; max-width: 68vw; object-fit: contain; }
.logo { font-weight: 700; font-size: 1.4rem; color: var(--azul-texto); }
.menu-lista { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.menu-lista > li { position: relative; }
.menu-lista a { display: flex; align-items: center; gap: .45rem; padding: .6rem .9rem; color: var(--azul-texto); font-weight: 500; border-radius: .4rem; }
.menu-lista a:hover { background: var(--fondo-alt); text-decoration: none; }
.menu-lista .activo > a { box-shadow: inset 0 -3px 0 var(--primario); }
.icono-menu { width: 1.5rem; height: 1.5rem; stroke-width: 2.6; color: var(--primario-osc); flex: none; }
.menu-lista .con-sub > a::after { content: ""; border: .28rem solid transparent; border-top-color: currentColor; border-bottom: 0; margin-left: .1rem; }
.sub { list-style: none; margin: 0; padding: .4rem; position: absolute; left: 0; top: 100%; min-width: 17rem; background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); display: none; }
.con-sub:hover > .sub, .con-sub:focus-within > .sub { display: block; }
.sub a { font-weight: 400; }
.menu-boton { display: none; background: none; border: 0; padding: .6rem; cursor: pointer; }
.menu-boton span { display: block; width: 1.6rem; height: 3px; margin: 5px 0; background: var(--azul-texto); border-radius: 2px; }

@media (max-width: 74rem) { .icono-menu { display: none; } }

@media (max-width: 62rem) {
  .icono-menu { display: block; }
  .menu-boton { display: block; }
  .js .menu-lista { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; flex-wrap: nowrap; padding: .5rem 1rem 1rem; box-shadow: 0 6px 10px rgba(0, 0, 0, .12); max-height: calc(100vh - 4.5rem); overflow: auto; }
  .js .menu-lista.abierto { display: flex; }
  .menu-lista { flex-wrap: wrap; }
  .sub { position: static; display: block; box-shadow: none; padding: 0 0 0 1rem; min-width: 0; }
}

/* ---------- banda de título ---------- */
.banda {
  --velo: rgba(20, 157, 204, .62);
  background-color: var(--hero);
  background-image: linear-gradient(var(--velo), var(--velo)), var(--img, linear-gradient(135deg, #149dcc, #55b4d4));
  background-size: cover; background-position: center;
  color: #fff; text-align: center;
  padding: clamp(3rem, 8vw, 6rem) 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .25);
}
.banda h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 700; margin: 0 0 .3em; }
.banda-sub { font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 300; margin: 0 0 .5em; }
.banda-sub strong { font-weight: 700; }
.banda-peque { font-size: .95rem; opacity: .95; margin: 0; }
.banda-simple { padding: clamp(1.6rem, 3.5vw, 2.6rem) 0; }
.banda-simple h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; }
.banda-grande { padding: clamp(5rem, 14vw, 10rem) 0; }
.banda-grande h1 { font-size: clamp(3rem, 10vw, 5.5rem); letter-spacing: .04em; }
.botones { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }

.boton { display: inline-block; padding: .65rem 1.4rem; background: var(--azul-texto); color: #fff; border-radius: 2rem; font-weight: 500; text-shadow: none; transition: background .15s; }
.boton:hover { background: #12607a; text-decoration: none; }
.banda .boton { background: #fff; color: var(--azul-texto); }
.banda .boton:hover { background: var(--fondo-alt); }
.banda .boton-primario, .banda .boton-gris, .banda .boton-rojo { color: #fff; font-weight: 700; padding: .75rem 2.2rem; }
.banda .boton-primario { background: #55b4d4; }
.banda .boton-primario:hover { background: #2d8fb0; }
.banda .boton-gris { background: #879a9f; }
.banda .boton-gris:hover { background: #6e8187; }
.banda .boton-rojo { background: #ff3366; }
.banda .boton-rojo:hover { background: #e50039; }
.boton-claro { background: transparent; color: var(--azul-texto); border: 2px solid var(--azul-texto); padding: .45rem 1.2rem; margin: .25rem; }
.boton-claro:hover { background: var(--azul-texto); color: #fff; }

/* banda con texto y foto (industrial) */
.banda-doble { text-align: left; padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.banda-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.banda-doble h1 { font-weight: 300; font-size: clamp(2.4rem, 5.5vw, 4.25rem); line-height: 1.1; margin-bottom: .5em; }
.banda-texto p { font-size: clamp(1.15rem, 2vw, 1.5rem); margin: 0; line-height: 1.45; }
.banda-figura { margin: 0; }
.banda-figura img { width: 100%; height: auto; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); }
@media (max-width: 48rem) { .banda-rejilla { grid-template-columns: 1fr; gap: 2rem; } .banda-figura { max-width: 30rem; } }

/* ---------- secciones ---------- */
.seccion { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.seccion.alt { background: var(--fondo-alt); }
.seccion.oscura { background: var(--oscuro); color: #fff; }
.subtitulo { text-align: center; max-width: 46rem; margin: -.6rem auto 2rem; color: var(--gris); font-size: 1.1rem; }
.texto-largo { max-width: 52rem; margin-inline: auto; font-size: 1.05rem; }
.texto-largo.centro { text-align: center; }

.rejilla { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.rejilla.cuatro { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.rejilla.tres { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.rejilla.personas { grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.rejilla.personas.pequenos { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1.2rem; }
.pequenos .persona h3 { font-size: 1rem; }
.rejilla.fotos { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.rejilla.fotos + .centro, .rejilla + .centro { margin-top: 2rem; }
.rejilla.galeria { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); margin-top: 1.5rem; }
.rejilla.listas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem 2rem; }   /* 3 columnas: arriba quienes han trabajado aquí, abajo los de intercambio */
@media (max-width: 62rem) { .rejilla.listas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .rejilla.listas { grid-template-columns: 1fr; } }
.rejilla.pubs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }

.tarjeta { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.5rem; border-top: 4px solid var(--primario); }
.tarjeta h3 { color: var(--azul-texto); }
.tarjeta p:last-child { margin-bottom: 0; }
.tarjeta-enlace { color: var(--texto); display: block; text-align: center; transition: transform .15s, box-shadow .15s; }
.tarjeta-enlace:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.tarjeta-enlace h2 { font-size: 1.4rem; font-weight: 700; color: var(--azul-texto); margin-bottom: .6em; }
.tarjeta-enlace p span { display: block; }
.tarjeta-enlace .mas { margin-top: 1rem; font-weight: 500; color: var(--secundario); }

/* tarjetas con imagen y figura de sección (investigación) */
.tarjeta.con-imagen { padding-top: 0; overflow: hidden; }
.tarjeta-img { margin: 0 -1.5rem 1.2rem; aspect-ratio: 16 / 10; background: var(--fondo-alt); }
.tarjeta-img img { width: 100%; height: 100%; object-fit: cover; }
.figura-seccion { margin: 2.2rem auto 0; text-align: center; }
.figura-seccion img { width: min(100%, 36rem); margin-inline: auto; border-radius: var(--radio); box-shadow: var(--sombra); }

/* iconos y composición central de investigación */
.icono { color: var(--primario-osc); flex: none; }
.tarjeta-cab { display: flex; align-items: center; gap: .8rem; margin-bottom: .6rem; }
.tarjeta-cab h3 { margin: 0; }
.tarjeta-cab .icono { width: 2.6rem; height: 2.6rem; }
.seccion-central h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 300; }
.seccion-central .subtitulo { font-weight: 300; font-size: 1.3rem; max-width: 60rem; }
.central { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 28rem) minmax(0, 1fr); gap: 2.5rem 3rem; align-items: start; margin-top: 2.5rem; }
.item-central.izq { grid-column: 1; grid-row: var(--fila); text-align: right; }
.item-central.der { grid-column: 3; grid-row: var(--fila); }
.central-img { grid-column: 2; grid-row: 1 / span var(--filas); align-self: center; margin: 0; }
.central-img img { width: 100%; height: auto; border-radius: var(--radio); box-shadow: var(--sombra); }
.item-central .icono { width: 3.6rem; height: 3.6rem; margin-bottom: .8rem; }
.item-central.izq .icono { margin-left: auto; }
.item-central h3 { font-size: 1rem; margin-bottom: .5rem; }
.item-central p { color: var(--gris); margin: 0; }
@media (max-width: 62rem) {
  .central { grid-template-columns: 1fr 1fr; }
  .central-img { grid-column: 1 / -1; grid-row: auto; order: -1; max-width: 30rem; justify-self: center; }
  .item-central.izq, .item-central.der { grid-column: auto; grid-row: auto; text-align: left; }
  .item-central.izq .icono { margin-left: 0; }
}
@media (max-width: 40rem) { .central { grid-template-columns: 1fr; } }

/* pasos numerados unidos por una línea */
.seccion-ligera h2 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 300; }
.pasos { list-style: none; margin: 2rem auto 0; padding: 0; max-width: 62rem; }
.paso { position: relative; display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1.5rem; padding-bottom: 2.2rem; }
.paso:last-child { padding-bottom: 0; }
.paso:not(:last-child)::before { content: ""; position: absolute; left: calc(2rem - 1px); top: 4.6rem; bottom: .4rem; width: 2px; background: #efefef; }
.paso-num { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: #fff; border: 2px solid #efefef; font-size: 2rem; font-weight: 700; }
.paso h3 { font-size: 1.5rem; font-weight: 500; margin: .2rem 0 .6rem; }
.paso p { margin: 0 0 .5rem; }

/* ---------- personas ---------- */
.persona { text-align: center; background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; padding-bottom: 1rem; }
.persona .foto { aspect-ratio: 3 / 4; background: var(--fondo-alt); }
.persona .foto img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.persona h3 { margin: 1rem .8rem .2rem; font-size: 1.1rem; }
.cargo { color: var(--gris); margin: 0 .8rem .6rem; font-size: .95rem; }
.contacto { margin: 0 .5rem; font-size: .85rem; }
.contacto a { display: inline-block; margin: .1rem .4rem; word-break: break-all; }

.memoria { display: grid; grid-template-columns: minmax(8rem, 15rem) 1fr; gap: 2rem; align-items: center; }
.memoria-foto img { border-radius: var(--radio); width: 100%; }
.memoria-nombre { font-size: 1.4rem; font-weight: 500; margin-bottom: .2rem; }
.memoria-nombre span { font-weight: 300; }
.lista-nombres ul { list-style: none; padding: 0; margin: 0; }
.lista-nombres li { padding: .15rem 0; border-bottom: 1px solid #e3ecef; }
.lista-nombres h3 { color: var(--azul-texto); border-bottom: 3px solid var(--primario); padding-bottom: .4rem; }
@media (max-width: 40rem) { .memoria { grid-template-columns: 1fr; text-align: center; } .memoria-foto { max-width: 12rem; margin-inline: auto; } }

/* ---------- publicaciones ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 1.2rem; }
.chips a { padding: .35rem 1rem; border-radius: 2rem; background: var(--fondo-alt); border: 1px solid #cfe3ea; font-weight: 500; }
.chips a:hover { background: var(--primario); color: #fff; text-decoration: none; }
.pub { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; display: flex; flex-direction: column; }
.pub-img { display: flex; align-items: center; justify-content: center; background: #fff; padding: .6rem; border-bottom: 1px solid #edf2f4; min-height: 9rem; }
.pub-img img { max-height: 13rem; width: auto; margin-inline: auto; }
.pub h3 { font-size: 1rem; margin: 1rem 1rem .4rem; }
.pub p { margin: 0 1rem 1rem; color: var(--gris); font-size: .92rem; }
.refs { list-style: none; max-width: 56rem; margin: 0 auto; padding: 0; }
.refs li { padding: .7rem 0; border-bottom: 1px solid #dde8ec; }

/* pestañas dentro del banner: los títulos se pulsan; sin JavaScript se ven el título de la página y las dos listas */
.pestanas-lista { display: none; }
.js .pestanas-lista { display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem clamp(.8rem, 4vw, 2.8rem); }
.js .banda-pestanas h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* queda para lectores de pantalla */
.js .titulo-panel { display: none; }
.banda-pestanas { padding-bottom: 0; }
.banda .pestanas-lista [role="tab"] { background: none; border: 0; border-bottom: 5px solid transparent; padding: 0 .2rem .55rem; font: inherit; font-size: clamp(1.1rem, 5vw, 3rem); font-weight: 700; color: rgba(255, 255, 255, .68); text-shadow: 0 1px 6px rgba(0, 0, 0, .25); cursor: pointer; transition: color .15s, border-color .15s; }
.banda .pestanas-lista [role="tab"]:hover { color: #fff; }
.banda .pestanas-lista [role="tab"][aria-selected="true"] { color: #fff; border-bottom-color: #fff; }
.panel[hidden] { display: none; }

/* ---------- noticias ---------- */
.noticia { display: grid; grid-template-columns: minmax(9rem, 18rem) 1fr; gap: 2rem; padding: 1.8rem 0; border-bottom: 1px solid #e3ecef; max-width: 56rem; margin-inline: auto; }
.noticia:last-child { border-bottom: 0; }
.noticia-img img { border-radius: var(--radio); width: auto; height: auto; max-width: 100%; max-height: 15rem; }
.noticia-fotos { display: grid; gap: .8rem; justify-items: start; }
.noticia-fotos a { display: block; }
.noticia h2 { text-align: left; font-size: 1.35rem; margin-bottom: .2em; color: var(--azul-texto); }
.fecha { color: var(--gris); font-size: .9rem; margin-bottom: .6rem; }
.foto-noticia { position: relative; display: block; border-radius: var(--radio); overflow: hidden; aspect-ratio: 4 / 3; background: var(--fondo-alt); box-shadow: var(--sombra); }
.foto-noticia img { width: 100%; height: 100%; object-fit: cover; }
.foto-noticia.enc-arriba img { object-position: center top; }
.foto-noticia.enc-izquierda img { object-position: left center; }
.foto-noticia span { position: absolute; inset: auto 0 0 0; padding: 1.4rem .8rem .6rem; color: #fff; font-size: .9rem; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.foto-noticia:hover { text-decoration: none; }
@media (max-width: 40rem) { .noticia { grid-template-columns: 1fr; } .noticia-img { max-width: 22rem; } }

/* ---------- galerías, logos, proyectos ---------- */
.galeria a { display: block; border-radius: var(--radio); overflow: hidden; aspect-ratio: 4 / 3; background: var(--fondo-alt); box-shadow: var(--sombra); }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.galeria a:hover img { transform: scale(1.05); }
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2rem 3rem; }
.logos img { height: 4.5rem; width: auto; max-width: 14rem; object-fit: contain; }
.logos img.logo-cuadrado { height: 6.5rem; }
.logos-grandes img { height: 4rem; filter: none; }
.proyecto { display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; align-items: center; max-width: 56rem; margin: 0 auto; padding: 1.2rem 0; border-bottom: 1px solid #e3ecef; }
.proyecto-logo img { max-height: 4rem; width: auto; margin-inline: auto; }
.proyecto-tipo { margin: 0 0 .15rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 500; color: var(--azul-texto); }
.proyecto h3 { margin-bottom: .2rem; }
.ref { color: var(--gris); margin: 0; font-size: .95rem; }
@media (max-width: 40rem) { .proyecto { grid-template-columns: 1fr; } }

/* evento con una sola foto: foto de tamaño medio junto al texto */
.seccion.evento { padding: clamp(2rem, 4vw, 3rem) 0; }
.seccion.evento h2 { margin-bottom: .9em; }
.evento-doble { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.evento-doble.invertido { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); }
.evento-doble.invertido .foto-evento { order: 2; }
.foto-evento { display: block; border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra); }
.foto-evento img { width: 100%; height: auto; }
.texto-evento { font-size: 1.15rem; }
.texto-evento p:last-child { margin-bottom: 0; }
@media (max-width: 48rem) { .evento-doble, .evento-doble.invertido { grid-template-columns: 1fr; gap: 1.5rem; } .evento-doble.invertido .foto-evento { order: 0; } .foto-evento { max-width: 26rem; margin-inline: auto; } }
@media (max-width: 40rem) { .rejilla.galeria { grid-template-columns: repeat(2, 1fr); gap: .8rem; } }

/* ---------- pie ---------- */
.pie { background: var(--pie); color: #fff; text-align: center; padding: 1.4rem 0; font-size: .95rem; }
.pie p { margin: 0; }

/* ---------- visor de imágenes ---------- */
.visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visor::backdrop { background: rgba(0, 0, 0, .88); }
.visor img { position: absolute; inset: 0; margin: auto; max-width: 92vw; max-height: 90vh; border-radius: .3rem; }
.visor button { position: absolute; background: rgba(0, 0, 0, .5); color: #fff; border: 0; font-size: 2.2rem; line-height: 1; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; z-index: 2; }
.visor button:hover { background: rgba(0, 0, 0, .8); }
.visor-cerrar { top: 1rem; right: 1rem; }
.visor-ant { left: 1rem; top: 50%; }
.visor-sig { right: 1rem; top: 50%; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .menu, .botones, .chips { display: none; } .banda { background: none; color: #000; text-shadow: none; padding: 1rem 0; } }
