:root {
  --guinda: #5e1224;
  --guinda-oscuro: #310013;
  --oro: #ffd477;
  --tinta: #181615;
  --blanco: #fff;
  --margen: min(78vw, 1160px);
  color: var(--tinta);
  background: var(--blanco);
  font-family: Montserrat, "Avenir Next", "Century Gothic", system-ui, sans-serif;
  line-height: 1.5;
}
*, *::before, *::after { box-sizing: border-box; }
body, figure, ol, ul, h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; object-fit: contain; }
button, input, textarea, select { font: inherit; }
button, a, input[type=checkbox] { cursor: pointer; }
button { color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #bc7900; outline-offset: 5px; }
[hidden] { display: none !important; }
.skip { position: absolute; z-index: 3; top: .8rem; left: 1rem; background: #fff; color: #000; padding: .65rem 1rem; transform: translateY(-160%); }
.skip:focus { transform: none; }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.marco { width: var(--margen); margin-inline: auto; }
h2 { font-size: clamp(2rem, 3.05vw, 3.35rem); line-height: 1.1; font-weight: 800; letter-spacing: -.035em; color: var(--guinda); }
.hero {
  min-height: clamp(555px, 49.7vw, 990px);
  color: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  background: linear-gradient(180deg,#3100139e,transparent 48%), linear-gradient(90deg,#4f0c1e 2%,#5e1224e8 32%,#822333bf 64%,#4f0c1e50 100%), url("assets/biblioteca-color.webp") center 49% / cover;
}
.cabecera { padding: 1.75rem 0 0; }
.menu-shell { width: min(88vw, 1600px); margin-inline: auto; }
.menu { display: flex; gap: .85rem 1.25rem; justify-content: space-between; align-items: center; }
.menu a { font-size: clamp(.9rem, 1.26vw, 1.35rem); color: #ffedf0; text-decoration: none; border-bottom: 1px solid transparent; padding-block: .35rem; }
.menu a:hover, .menu a:focus-visible { border-color: var(--oro); color: #fff; }
.menu-control, .marca-movil { display: none; }
.hero-contenido { width: min(74.5vw, 1450px); margin-inline: auto; align-self: center; padding: 2.5rem 0 3.5rem; }
.hero h1 { color: var(--oro); font-size: clamp(3.35rem, 5vw, 6rem); font-weight: 850; letter-spacing: -.045em; line-height: .99; text-shadow: 0 1px 22px #ffd36e55; }
.hero h1 span { display: block; color: #fff; text-shadow: none; font-size: .75em; font-weight: 400; letter-spacing: -.04em; margin-bottom: .26em; }
.hero p { margin-top: .46em; font-size: clamp(2.1rem, 3.6vw, 4.05rem); line-height: .99; letter-spacing: -.036em; font-weight: 400; }
.hero strong { font-weight: 830; }
.firma-hero { width: clamp(210px, 24.5vw, 440px); height: auto; margin-top: clamp(1.75rem, 3.3vw, 3.7rem); }
.presentacion { position: relative; isolation: isolate; overflow: hidden; }
.presentacion-grid { min-height: clamp(510px, 53vw, 900px); display: grid; grid-template-columns: 1fr 1fr; align-items: center; column-gap: 2rem; }
.presentacion-texto { position: relative; z-index: 1; padding: 4rem 0 5rem; }
.presentacion-texto h2 { margin-bottom: 1.5rem; }
.presentacion-texto p { font-size: clamp(1rem, 1.27vw, 1.28rem); line-height: 1.6; }
.presentacion-texto p + p { margin-top: .65rem; }
.marca-agua { position: absolute; z-index: -1; color: #f4f4f3; white-space: nowrap; font-size: 17vw; font-weight: 900; line-height: .77; letter-spacing: -.075em; left: 50%; bottom: -.24em; transform: translateX(-50%); user-select: none; }
.presentacion-figura { height: 100%; position: relative; overflow: visible; align-self: end; }
.escudo-presentacion { position: absolute; width: 55%; height: auto; top: 15%; right: 0; }
.retrato-presentacion { position: absolute; width: min(85%, 520px); height: min(86%, 760px); object-fit: cover; object-position: top; bottom: 0; left: 0; }
.fondo-biblioteca {
  background-color: #5e1224;
  background-image: linear-gradient(153deg,#822333ed 0%,#5e1224e6 55%,#310013f2 100%), url("assets/biblioteca-gris.webp");
  background-size: cover;
  background-position: center;
}
.biblioteca { padding: clamp(4rem, 10vw, 11rem) 0; text-align: center; }
.libros-marco { width: min(69vw, 1040px); }
.biblioteca h2, .prensa h2, .noticias h2 { color: white; }
.libros { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(1rem, 2.2vw, 2.5rem); margin: clamp(2.2rem, 5vw, 5.6rem) 0 clamp(1.8rem, 4vw, 4.3rem); }
.libro { display: flex; flex-direction: column; align-items: flex-start; text-align: left; background: #fff; border-radius: 13px; padding: clamp(1.4rem, 3vw, 3.4rem) clamp(1.4rem, 4vw, 4.1rem); box-shadow: 0 6px 24px #31001325; }
.libro img { align-self: center; width: auto; height: clamp(175px, 23vw, 345px); margin-bottom: clamp(1rem, 2.3vw, 2.4rem); }
.libro h3 { font-size: clamp(1.12rem, 1.7vw, 1.7rem); line-height: 1.18; margin-bottom: .45rem; }
.libro p { font-size: clamp(.95rem, 1.13vw, 1.15rem); line-height: 1.46; margin-bottom: .65rem; }
.libro .libro-opciones { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: .5rem; margin-top: auto; }
.tema-libro { color: #654651; font-size: .84rem; font-weight: 650; }
.enlace { background: none; border: 0; padding: .35rem 0; font-weight: 750; text-decoration: underline; text-underline-offset: .2em; }
.enlace:hover { color: var(--guinda); }
.boton { border: 1px solid transparent; border-radius: 5px; padding: .52rem 1rem; background: var(--guinda); color: #fff; font-weight: 720; line-height: 1.32; text-decoration: none; display: inline-block; }
.boton:hover { background: var(--guinda-oscuro); }
.libro .boton { align-self: center; margin-top: 1.1rem; }
.boton-claro { color: var(--guinda); background: #fff; }
.boton-claro:hover { background: #fff1dc; }
.explorar { padding: .66rem 1.7rem; font-size: clamp(1.2rem, 2.05vw, 2rem); }
.articulos { padding: clamp(3rem, 6.5vw, 7rem) 0 clamp(3.5rem, 8vw, 9rem); }
.articulos-intro { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; }
.articulos-texto { padding: 2rem 0; position: relative; z-index: 1; }
.cifra { color: var(--guinda); font-size: clamp(2.35rem, 4.9vw, 6.1rem); line-height: .93; letter-spacing: -.052em; margin-top: .35em; }
.cifra span { display: flex; align-items: baseline; white-space: nowrap; gap: .18em; font-size: .82em; }
.cifra span strong { font-size: 3.15em; font-weight: 900; line-height: .98; letter-spacing: -.097em; }
.cifra b { color: var(--tinta); display: block; font-weight: 850; }
.cifra-bajada { color: var(--guinda); padding-left: .55rem; border-left: 3px solid var(--guinda); font-size: clamp(1.42rem, 3.25vw, 3.65rem); line-height: .97; letter-spacing: -.03em; margin-top: .5em; }
.articulos-figura { display: grid; position: relative; isolation: isolate; min-width: 0; align-self: stretch; place-items: end center; padding-top: 2.2rem; }
.articulos-figura::before { content: ""; position: absolute; z-index: -1; inset: 0 11% 9%; background: var(--guinda); border-radius: 50% 50% 0 0 / 39% 39% 0 0; }
.articulos-figura img { width: 100%; height: clamp(300px, 37vw, 550px); object-fit: contain; object-position: center bottom; }
.funciones { width: min(88vw, 1510px); position: relative; z-index: 1; color: #fff; border-radius: 20px; padding: clamp(2.2rem, 6vw, 6rem) clamp(1.5rem, 10vw, 10rem); }
.funciones-titulo { display: inline-block; border-radius: 7px; background: #fff; color: var(--tinta); padding: .65em .9em; font-size: clamp(1.3rem, 2.7vw, 2.9rem); line-height: 1.13; letter-spacing: -.025em; }
.funciones-titulo h3 { color: var(--guinda); font-size: 1em; font-weight: 800; }
.funciones-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(.6rem, 2.6vw, 2.5rem); margin-top: clamp(1.8rem, 4.4vw, 4.3rem); }
.funcion { display: flex; flex-direction: column; align-items: center; gap: 1.15rem; background: none; border: 0; padding: 0; color: #fff; text-align: center; }
.icono-funcion { width: clamp(55px, 14vw, 200px); aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--guinda); font-size: clamp(1.05rem, 3.3vw, 3.1rem); font-weight: 820; line-height: 1; }
.icono-funcion.dibujo { font-size: clamp(2rem, 6.3vw, 6.25rem); }
.funcion > span:last-child { border: 1px solid #ffffffb0; border-radius: 4px; padding: .5em .55em; min-width: 60%; font-size: clamp(.86rem, 1.9vw, 1.65rem); line-height: 1.12; }
.funcion strong { color: var(--oro); }
.funcion:hover .icono-funcion { background: #fff0dc; }
.catalogo { margin-top: 2.2rem; background: #fff; color: var(--tinta); padding: clamp(1.1rem, 3vw, 2.5rem); border-radius: 10px; }
.catalogo h3 { color: var(--guinda); font-size: 1.35rem; }
.filtros { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: .7rem; margin-block: 1rem; }
.filtros label { display: grid; gap: .35rem; font-weight: 630; font-size: .92rem; }
.filtros input, .filtros select { min-width: 0; width: 100%; padding: .5rem; border: 1px solid #a29491; border-radius: 5px; color: var(--tinta); background: white; }
.catalogo-estado { color: #654651; font-size: .9rem; }
.resultados-libros { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; padding: 0; margin-top: .85rem; list-style: none; }
.resultado-libro { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: start; gap: .75rem; padding: .8rem; background: #fcf8f6; border: 1px solid #eee2de; border-radius: 8px; }
.resultado-libro img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; object-position: top center; }
.resultado-libro h4 { margin: 0 0 .28rem; font-size: 1rem; line-height: 1.25; overflow-wrap: anywhere; }
.resultado-libro p, .resultado-libro small { font-size: .86rem; color: #645552; display: block; line-height: 1.35; }
.resultado-libro small { margin-top: .2rem; }
.resultado-acciones { display: flex; flex-wrap: wrap; gap: .25rem .65rem; align-items: center; margin-top: .55rem; font-size: .87rem; }
.resultado-acciones .boton { padding: .34rem .54rem; }
.paginacion { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem; margin-top: 1.1rem; }
.paginacion .boton { border-color: #d2a9b3; }
.paginacion [aria-disabled="true"] { opacity: .55; cursor: default; }
.detalle-descarga { margin-top: 1.15rem; }
@media (max-width: 740px) {
  .resultados-libros { grid-template-columns: 1fr; }
}
.prensa { color: #fff; background: linear-gradient(90deg,#4f0c1e 2%,#5e1224ec 34%,#822333b5 63%,#4f0c1e55), url("assets/auditorio.webp") center 50% / cover; padding: clamp(4rem, 10vw, 10rem) 0; }
.lista-medios { list-style: none; padding: 0; display: grid; gap: clamp(1rem, 2.5vw, 2.45rem); margin-top: clamp(1.9rem, 4.5vw, 5rem); }
.lista-medios button { border: 0; border-radius: 7px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: clamp(.75rem, 1.8vw, 1.7rem); text-align: left; padding: .3rem 0; background: transparent; line-height: 1.16; font-size: clamp(1rem, 1.9vw, 1.9rem); }
.prensa .lista-medios { max-width: min(52%, 545px); }
.prensa strong { color: var(--oro); }
.lista-medios button:hover > span:last-child { text-decoration: underline; text-underline-offset: .15em; }
.medio-imagen, .medio-imagen img { display: block; }
.medio-imagen { width: clamp(60px, 8vw, 140px); aspect-ratio: 1; padding: .33rem; display: grid; place-items: center; border-radius: 7px; background: #fff; }
.videos { padding: clamp(4rem, 10vw, 11rem) 0; }
.video-grid { display: grid; grid-template-columns: .94fr 1fr; align-items: start; gap: clamp(1.5rem, 5vw, 5.5rem); }
.video-lista button > img { width: clamp(62px, 10vw, 150px); aspect-ratio: 1; border-radius: 9px; object-fit: cover; }
.video-lista strong { color: var(--guinda); }
.video-lista button[aria-pressed="true"] > img { outline: 2px solid var(--guinda); outline-offset: 3px; }
.video-boton { display: block; overflow: hidden; border: 0; width: 100%; aspect-ratio: 9 / 15; max-height: 860px; padding: 0; position: relative; background: #261512; color: white; }
.video-boton img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.video-boton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#210e1038,#240f1063 55%,#20110de0); }
.play { position: absolute; z-index: 1; width: clamp(66px, 12vw, 145px); aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; opacity: .78; top: 50%; left: 50%; transform: translate(-50%,-50%); background: #17110e20; display: grid; place-items: center; }
.play::before { content: ""; display: block; width: 0; height: 0; border-block: .9rem solid transparent; border-left: 1.45rem solid #fff; margin-left: .35rem; }
.video-boton:hover .play { opacity: 1; }
.video-pie { position: absolute; z-index: 1; left: .85rem; right: .85rem; bottom: .9rem; text-align: left; font-size: .94rem; padding-top: .55rem; border-top: 3px solid #ffffff9c; }
.noticias { padding: clamp(3.7rem, 7.3vw, 8rem) 0; }
.noticias h2 { text-align: center; }
.noticias-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: clamp(.85rem, 1.75vw, 1.8rem); margin-top: clamp(1.8rem, 4vw, 4rem); }
.noticia { display: flex; flex-direction: column; background: white; }
.noticia img { width: 100%; aspect-ratio: 1.4; object-fit: cover; }
.noticia-cuerpo { flex: 1; padding: clamp(1rem, 2vw, 2rem); display: flex; flex-direction: column; align-items: flex-start; }
.noticia h3 { font-weight: 650; font-size: clamp(1.08rem, 1.6vw, 1.65rem); line-height: 1.2; }
.noticia h3 strong { color: var(--guinda); }
.noticia p { font-size: .95rem; margin: .65rem 0 1.2rem; }
.noticia .enlace { margin-top: auto; align-self: flex-end; }
.contacto { background: linear-gradient(#ffe292d9,#ffdc80d9), url("assets/collage.webp") center / cover; }
.contacto-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 4.5rem);
  row-gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  padding-top: clamp(2.8rem, 5vw, 5.5rem);
}
.contacto-grid > h2 { grid-column: 1 / -1; text-align: center; }
.contacto-figura { align-self: end; display: grid; justify-items: center; }
.contacto-figura img { width: min(100%, 30rem); height: auto; }
.formulario {
  width: min(100%, 32rem);
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 12px 36px #3100131a;
  margin: 0 auto clamp(2rem, 4vw, 4.5rem);
  padding: clamp(1.25rem, 2.8vw, 3rem);
  text-align: center;
}
.contacto-nombre { color: var(--guinda); font-size: clamp(.97rem, 1.5vw, 1.6rem); text-transform: uppercase; line-height: 1.19; }
.contacto-nombre strong, .contacto-nombre span { display: block; }
.contacto-nombre span { margin-top: .28em; }
.formulario h3 { text-transform: uppercase; margin: 1.25rem 0 1.5rem; font-size: clamp(1.16rem, 1.85vw, 1.9rem); }
.formulario > label { display: block; margin-bottom: .42rem; }
.formulario input:not([type=checkbox]), .formulario textarea { width: 100%; display: block; min-width: 0; padding: .54rem .65rem; border: 1px solid #b97a8a; border-radius: 0; background: white; color: var(--tinta); }
.formulario textarea { resize: vertical; min-height: 3.35rem; }
.consentimientos { margin: .8rem 0 1.2rem; text-align: left; font-size: .83rem; }
.consentimiento { display: block; padding-left: 1.4rem; margin-top: .45rem; position: relative; }
.consentimiento input { position: absolute; left: 0; margin: .32rem 0 0; accent-color: var(--guinda); }
.consentimiento button { border: 0; background: none; text-decoration: underline; padding: 0; font-size: inherit; color: var(--guinda-oscuro); }
.formulario .boton { text-transform: uppercase; border-radius: 12px; padding-inline: 1.55rem; font-size: .95rem; }
.form-nota { font-size: .82rem; color: #5e514c; margin-top: .8rem; }
.footer { background: #1b1b1b; color: #fff; }
.footer-contenido { padding-block: clamp(3rem, 7vw, 7.2rem); }
.footer-contenido a { display: inline-grid; justify-items: start; gap: .35rem; }
.footer-contenido img { height: auto; }
.footer-contenido img + img { width: clamp(94px, 12vw, 174px); }
.footer p { color: #111; background: #fff; text-align: center; padding: .6rem; font-weight: 750; }
dialog { border: 0; border-radius: 14px; width: min(92vw, 540px); max-height: 90vh; padding: 2.4rem 2rem 2rem; box-shadow: 0 15px 65px #16080066; color: var(--tinta); }
dialog::backdrop { background: #310013b0; }
dialog .cerrar { background: #f6e9ed; border: 0; width: 2.6rem; height: 2.6rem; border-radius: 50%; position: absolute; right: .7rem; top: .7rem; font-size: 1.75rem; line-height: 1; }
dialog img { max-height: 240px; margin: 0 auto 1rem; width: auto; }
dialog h2 { margin-bottom: .6rem; font-size: clamp(1.55rem, 3.5vw, 2.15rem); }
dialog p + p { margin-top: .8rem; }
.detalle-nota { color: #713043; border-left: 3px solid var(--guinda); padding-left: .65rem; }
@media (max-width: 820px) {
  :root { --margen: 87vw; }
  .menu { gap: .5rem; }
  .menu a { font-size: .81rem; }
  .libros-marco { width: 83vw; }
  .presentacion-grid { column-gap: .9rem; }
  .presentacion-figura .escudo-presentacion { top: 21%; }
  .presentacion-figura .retrato-presentacion { width: 100%; height: 80%; }
  .prensa .lista-medios { max-width: 60%; }
}
@media (max-width: 640px) {
  :root { --margen: 88vw; }
  .hero { min-height: 560px; background-position: 62% center; }
  .cabecera { padding-top: 1rem; position: relative; z-index: 2; }
  .menu-shell { display: flex; align-items: center; justify-content: space-between; }
  .marca-movil { display: inline; color: white; text-decoration: none; font-weight: 740; }
  .menu-control { display: inline-flex; align-items: center; gap: .4rem; background: #4f0c1e; border: 1px solid #ffffff77; color: #fff; border-radius: 4px; padding: .42rem .62rem; }
  .menu { display: none; flex-direction: column; align-items: stretch; position: absolute; top: 3.9rem; left: 6vw; right: 6vw; padding: .6rem 1rem; background: #5e1224; border: 1px solid #ffffff55; border-radius: 7px; }
  .menu.is-open { display: flex; }
  .menu a { font-size: 1rem; padding: .45rem 0; }
  .hero-contenido { width: var(--margen); padding-top: 2rem; }
  .hero h1 { font-size: clamp(2.65rem, 9vw, 3.6rem); }
  .hero p { font-size: clamp(1.8rem, 6.3vw, 2.55rem); }
  .presentacion-grid, .articulos-intro, .video-grid { grid-template-columns: 1fr; }
  .presentacion-grid { min-height: auto; }
  .presentacion-texto { padding: 3.6rem 0 1.3rem; }
  .presentacion-texto h2 { margin-bottom: 1rem; }
  .presentacion-figura { height: 325px; width: min(100%, 390px); margin-inline: auto; }
  .presentacion-figura .retrato-presentacion { height: 100%; width: 67%; left: 10%; }
  .presentacion-figura .escudo-presentacion { width: 42%; top: 5%; right: 2%; }
  .marca-agua { font-size: 20vw; }
  .libros-marco { width: var(--margen); }
  .libros { grid-template-columns: 1fr; }
  .libro { padding: 1.45rem; }
  .libro img { height: 215px; }
  .articulos-texto { padding: 0 0 1.45rem; }
  .articulos-figura { width: min(92%, 360px); margin-inline: auto; padding-top: 1.3rem; }
  .articulos-figura img { height: 295px; }
  .articulos-figura::before { inset: 0 15% 7%; }
  .funciones { padding: 1.6rem .95rem; }
  .funcion { gap: .65rem; }
  .funcion > span:last-child { font-size: .82rem; }
  .filtros { grid-template-columns: 1fr; }
  .prensa { background-position: 66% center; }
  .prensa .lista-medios { max-width: 90%; }
  .video-grid { gap: 2.2rem; }
  .video-vista { width: min(100%, 360px); margin-inline: auto; }
  .noticias-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}
@media (max-width: 740px) {
  .contacto-grid { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .contacto-grid > h2 { margin-bottom: 1.25rem; }
  .contacto-figura img { width: min(58%, 12rem); }
  .formulario { z-index: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
