/* ========== RESETEO GENERAL ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #fff;
}

/* ========== CABECERA ========== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  padding: 48px 30px 28px 30px;
  position: relative;
  z-index: 1000;
  min-height: 140px;
}

/* Franja superior e inferior */
header::before,
header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  z-index: 1001;
}
header::before {
  top: 0;
  background: linear-gradient(to bottom, #9b0b0b 0%, #9b0b0b 50%, #0b3b5a 50%, #0b3b5a 100%);
}
header::after {
  bottom: 0;
  background: linear-gradient(to bottom, #0b3b5a 0%, #0b3b5a 50%, #9b0b0b 50%, #9b0b0b 100%);
}

/* Logo izquierda */
header .logo {
  height: 72px;
  width: auto;
  margin-right: 12px;
}

/* Título central */
header .titulo {
  flex: 1;
  text-align: center;
}

header h1 {
  color: #9b0b0b;
  font-size: 45px;
  margin-bottom: 8px;
  letter-spacing: 1.2px;
}

header .titulo p {
  color: #0b3b5a;
  font-size: 24px;
  font-style: italic;
  margin-top: 6px;
}

/* Zona derecha */
header .derecha {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

header .lechuza {
  height: 130px;
  width: auto;
}

/* Buscador */
.search-bar {
  display: flex;
  flex-direction: column; /* Coloca elementos uno debajo de otro */
  align-items: center; /* Centra horizontalmente */
  gap: 8px; /* Espaciado entre input y botones */
}

.search-bar input[type="text"] {
  width: 260px;
  padding: 6px 10px;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-family: 'Cardo', serif;
  font-size: 1.2em;     /* tamaño del texto */
  font-weight: 700;    /* 👈 esto hace que la letra sea más gruesa */
  padding: 10px;        /* altura del cuadro */
}

.botones-busqueda {
  display: flex;
  gap: 8px; /* Espacio entre los botones */
}

.botones-busqueda button {
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  background-color: #003366;
  color: white;
  font-family: 'Cardo', serif;
  cursor: pointer;
  transition: background-color 0.3s;
}

.botones-busqueda button:hover {
  background-color: #0055aa;
}
.botones-busqueda button {
  font-size: 1em; /* 👈 Aumenta este valor */
}
/* Adaptación responsive */
@media (max-width: 820px) {
  header {
    padding: 12px 14px;
    min-height: 84px;
    flex-direction: column;
    text-align: center;
  }
  header .logo,
  header .lechuza {
    height: 56px;
  }
  header .titulo h1 {
    font-size: 20px;
  }
  .search-bar input {
    width: 120px;
  }
  header .derecha {
    flex-direction: column;
  }
}

/* ========== MENÚ LATERAL ========== */
nav.side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.menu {
  display: flex;
  flex-direction: column;
}

.menu-item {
  position: relative;
  width: 139px;
  height: 21px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom, #fefefe, #dcdcdc);
  border: 1px solid #666;
  border-radius: 4px;
  margin-bottom: 4px;
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 3px 3px 0px #bbb;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #666;
  border-right: 2px solid #666;
  transition: all 0.15s ease-in-out;
}

.menu-item:hover {
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  box-shadow: 2px 2px 0px #aaa inset;
  border-top: 2px solid #666;
  border-left: 2px solid #666;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* Submenú */
.submenu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  background: #fff;
  padding-left: 4px;
  max-height: 80vh;     /* ocupa como máximo el 80% del alto visible */
  overflow-y: auto;     /* activa el scroll si se pasa de ese tamaño */
}
.submenu a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px;
  height: 30px; /* 🔹 Un poco más alto para permitir centrado real */
  background: linear-gradient(to bottom, #fefefe, #dcdcdc);
  border: 1px solid #666;
  border-radius: 4px;
  margin-bottom: 4px;
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  text-decoration: none;
  color: #000;
  box-shadow: 3px 3px 0px #bbb;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #666;
  border-right: 2px solid #666;
  transition: all 0.15s ease-in-out;
  line-height: normal; /* 🔹 Evita que el texto se “suba” */
  padding-top: 4px; /* 🔹 Fino ajuste óptico */
}

.submenu a:hover {
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  box-shadow: 2px 2px 0px #aaa inset;
  border-top: 2px solid #666;
  border-left: 2px solid #666;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
}
.menu-item:hover .submenu {
  display: block;
}

/* ========== CONTENIDO CENTRAL ========== */
/* ========== LAYOUT PRINCIPAL ========== */
.container {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  align-items: start;
  padding: 20px;
}
main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 40px;
}

.columna {
  width: 122px;
  height: auto;
  align-self: flex-start;
}

.citas {
  flex: 1;
  text-align: center;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
  font-family: 'Cardo', serif;
  font-size: 18px;
  color: #073763;
}
.citas em {
  color: #9b0b0b;
  font-style: normal;
  font-weight: bold;
}

.citas hr {
  width: 80%;
  margin: 20px auto;
  border: 0;
  border-top: 1px solid #ccc;
}

.platon {
  align-self: flex-start;
  margin-left: auto;
  width: 565px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* ========== ESTILO DE ARTÍCULOS ========== */
/* ======== AJUSTES DE PRESENTACIÓN DEL ARTÍCULO ======== */

/* Marco general del artículo */
.art-body {
  width: 100%;
  max-width: 1200px;
  margin: 4px auto 0;       /* 🔹 casi pegado al encabezado */
  box-sizing: border-box;
  padding: 0 12px;          /* 🔹 margen lateral muy reducido */
}

/* Banda azul del título */
/* 🔹 Banda azul del título con logo */
.titulo-articulo {
  position: relative;
  background-color: #0b3b5a;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  border-bottom: 12px solid #9b0b0b;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  width: 100%;
  margin: -20px auto 25px;
  border-radius: 5px;
  display: flex;
  justify-content: center;   /* centra el texto */
  align-items: center;       /* centra verticalmente */
}

/* 🔹 Logo dentro de la banda azul */
.logo-titulo {
  position: absolute;
  right: 25px;               /* separación del borde derecho */
  height: 95px;              /* ajusta el tamaño del logo */
  width: auto;
  border-radius: 5px;        /* opcional, suaviza bordes */
}


.titulo-articulo h2 {
  margin: 0;
  font-size: 1.7em;
  font-weight: bold;
}

/* Contenido principal del artículo */
.contenido-articulo {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  background: #fff;
  font-size: 1em;
  line-height: 1.6;
  color: #073763 !important;   /* 🔹 Forzamos el color azul */
  text-align: justify;
  box-sizing: border-box;
  padding: 0 4px 16px;      /* 🔹 aún menos aire lateral y abajo */
}

/* Imagen a la derecha */
.imagen-articulo {
  float: right;
  width: 44%;
  margin: 0 0 6px 14px;     /* 🔹 ajustado: menos margen entre texto e imagen */
  text-align: center;
}

.imagen-articulo img {
  width: 100%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.titulo-imagen {
  font-weight: bold;
  font-size: 1.05em;
  margin-bottom: 3px;
  color: #073763;
}

.pie-foto {
  font-size: 0.9em;
  color: #9b0b0b;
  margin-top: 3px;
  text-align: justify;
}

.fuente-foto {
  font-size: 0.8em;         /* un poco más pequeña */
  color: #555;              /* gris oscuro */
  margin-top: 2px;
  font-style: italic;       /* opcional, queda bien para fuentes */
  text-align: justify;
}


/* Asegura que el texto no se monte sobre la imagen */
.contenido-articulo::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive */
@media (max-width: 980px) {
  .art-body { padding: 0 10px; margin: 6px auto; }
  .imagen-articulo { float: none; width: 100%; margin: 0 0 10px 0; }
  .titulo-articulo h2 { font-size: 1.4rem; }
}
/* Scrollbar personalizado para submenús */
.submenu {
  max-height: 700px;       /* Ajusta según lo largo que quieras permitir */
  overflow-y: auto;
  scrollbar-width: thin;   /* Firefox */
  scrollbar-color: #0b3b5a #f0f0f0;  /* Azul sobre gris claro */
}

/* Scrollbar para Chrome, Edge y Safari */
.submenu::-webkit-scrollbar {
  width: 8px;
}

.submenu::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.submenu::-webkit-scrollbar-thumb {
  background-color: #0b3b5a;
  border-radius: 4px;
  border: 1px solid #f0f0f0;
}

.submenu::-webkit-scrollbar-thumb:hover {
  background-color: #9b0b0b;  /* Rojo al pasar el ratón */
}
/* Bloque de información final del index (centrado como las citas) */
.info-diccionario {
  background: #fafafa;
  padding: 30px 40px;
  margin: 0 auto 60px;
  width: 100%;
  max-width: 1000px;        /* 🔹 límite de ancho para legibilidad */
  text-align: center;
  line-height: 1.7;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.08);
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  font-size: 1em;
  color: #9b0b0b;
}

/* Citas dentro del bloque */
.info-diccionario blockquote {
  font-style: italic;
  margin: 25px auto;
  padding-left: 20px;
  color: #073763;
  width: 85%;
}

/* Firma final */
.info-diccionario .firma {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9em;
  color: #9b0b0b;
}
/* ==== Separador doble rojo y azul ==== */
.separador-doble {
  width: 80%;
  margin: 30px auto;
  border: none;
  height: 8px; /* grosor total */
  background: linear-gradient(to bottom,
                              #9b0b0b 0%,
                              #9b0b0b 50%,
                              #0b3b5a 50%,
                              #0b3b5a 100%);
  border-radius: 2px;
}
.separador-actualizacion {
  border: 0;
  height: 2px;
  background: linear-gradient(to right, #9b0b0b, #0b3b5a);
  width: 30%;
  margin: 40px 0 10px auto;
  display: block
}
.ultima-actualizacion {
  text-align: right;
  margin-top: 30px;
  font-size: 0.9em;
  color: #b30000; /* rojo suave */
  font-weight: bold;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  width: 100%; /* asegúrate de que ocupa todo el ancho del texto */
}
/* ==========================
   🔍 ESTILOS DEL BUSCADOR
========================== */
.resultados-busqueda {
  margin-top: 8px;
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  max-height: 250px;
  overflow-y: auto;
  font-family: 'Palatino Linotype', serif;
  font-size: 0.95em;
}

.resultados-busqueda ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.resultados-busqueda li {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.resultados-busqueda li:last-child {
  border-bottom: none;
}

.resultados-busqueda a {
  text-decoration: none;
  color: #0b3b5a;
}

.resultados-busqueda a:hover {
  text-decoration: underline;
  color: #9b0b0b;
}
/* ==== Bloque de cita automática ==== */
#cita {
  display: block;
  width: 100%;
  clear: both;               /* separa de imágenes flotadas */
  margin: 2em 0;
}

.bloque-cita {
  background-color: #f9f9f9;
  border-left: 4px solid #900;
  padding: 1.2em 1.5em;
  border-radius: 8px;
  max-width: 800px;
  margin: 0 auto;            /* centra horizontalmente */
  text-align: justify;
  font-size: 0.9em;
  color: #333;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

.bloque-cita strong {
  font-weight: bold;
}

.bloque-cita a {
  color: #600;
  text-decoration: none;
}

.bloque-cita a:hover {
  text-decoration: underline;
}
.menu-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}
/* ==========================================================
   🔹 PIE DE PÁGINA NUEVO (Azul con ribete rojo)
========================================================== */
/* =========================
   PIE DE PÁGINA UNIFICADO
   (Sustituir cualquier regla anterior de footer/site-footer)
   ========================= */

footer {
  width: 100%;
  background-color: #0b3b5a;               /* banda azul */
  border-bottom: 15px solid #9b0b0b;        /* ribete rojo fino */
  color: #ffffff;
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  box-sizing: border-box;
  padding: 20px 16px;                      /* controla la "altura" de la banda azul */
}

/* área interna centrada y con máximo ancho */
.footer-contenido {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;                     /* centra verticalmente todos los elementos */
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

/* texto central (alineado al centro en pantallas grandes) */
.footer-texto {
  flex: 1;
  text-align: center;
  color: #fff;
}

/* textos y enlaces */
.footer-texto p {
  margin: 2px 0;
  font-size: 0.98rem;
}
.footer-texto a {
  color: #ffffff;
  text-decoration: none;
}
.footer-texto a:hover {
  text-decoration: underline;
}

/* fila de iconos (pequeños) */
.footer-iconos {
  margin-top: 8px;
}
.footer-iconos img {
  width: 25px;       /* tamaño pequeño y uniforme */
  height: auto;
  margin: 0 6px;
  vertical-align: middle;
  display: inline-block;
  filter: none;      /* si quieres que sean blancos, ver más abajo */
  transition: transform .18s ease;
}
.footer-iconos img:hover {
  transform: scale(1.15);
}

/* logo a la derecha, tamaño contenido y sin empujar al resto */
.footer-right {
  position: relative; /* 🔹 permite posicionar el logo dentro sin afectar la altura */
  text-align: right;
  min-width: 200px;
}

.footer-logo {
  position: absolute;   /* 🔹 sale del flujo normal */
  bottom: -18px;        /* 🔹 ajusta verticalmente: más o menos hacia abajo */
  right: 0;             /* 🔹 pegado al borde derecho */
  height: 110px;        /* 🔹 cambia solo el tamaño del logo */
  width: auto;
  object-fit: contain;
  z-index: 2;           /* 🔹 asegura que quede por encima de la banda */
}


/* ------------- Responsive ------------- */
@media (max-width: 880px) {
  .footer-contenido {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .footer-logo {
    margin: 8px 0 0 0;
    height: 62px;
  }
  .footer-texto { order: 1; }
  .footer-iconos { order: 2; }
}
.citas em {
  font-weight: normal; /* mantiene en normal las partes en cursiva */
  font-style: italic;
}
.citas {
  font-weight: bold;
}
/* =========================================================
   🌐 ESTILOS RESPONSIVE — AJUSTE MENÚ EN MÓVILES
   ========================================================= */
@media (max-width: 768px) {

  /* --- Estructura general --- */
  body {
    overflow-x: hidden;
  }

  header, .container, footer {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* --- Menú lateral (columna única) --- */
  #menu-container {
    width: 100%;
    float: none;
    position: relative;
    z-index: 1000;
    background: #f9f9f9;
    padding: 0;
  }

  #menu-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #menu-container li {
    display: block;
    width: 100%;
    position: relative;
    text-align: center;
    border-bottom: 1px solid #ccc;
  }

  #menu-container li a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    font-size: 18px;
    color: #000;
  }

  /* --- Submenús desplegables --- */
  #menu-container li ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 9999; /* 🔥 Asegura que se muestre por encima */
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }

  #menu-container li ul li {
    border-bottom: 1px solid #eee;
  }

  #menu-container li ul li a {
    display: block;
    padding: 10px;
    color: #333;
    font-size: 16px;
  }

  /* --- Asegura que los submenús no queden ocultos --- */
  main, header, footer {
    overflow: visible !important;
  }

  /* --- Correcciones visuales --- */
  .side {
    float: none;
  }

  .platon, .columna {
    width: 100%;
    height: auto;
  }

  .titulo h1 {
    font-size: 1.4em;
    text-align: center;
  }

  .titulo p {
    text-align: center;
    font-size: 1em;
  }

  .search-bar {
    width: 90%;
    margin: 0 auto;
    display: block;
  }

  .botones-busqueda {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
  }

  .botones-busqueda button {
    width: 45%;
  }

  footer {
    text-align: center;
  }

  .footer-logo {
    display: none;
  }

  .footer-texto p {
    font-size: 0.9em;
  }
}
/* =========================================================
   🌐 ESTILOS RESPONSIVE — VERSIÓN FINAL 13/11/2025
   ========================================================= */
@media (max-width: 768px) {

  /* --- Estructura general --- */
  body {
    overflow-x: hidden;
  }

  header, .container, footer {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  /* --- CABECERA --- */
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

header .logo {
    margin-top: 25px !important;   /* ← Ajusta la separación superior */
    margin-bottom: 10px;           /* Opcional, por estética */
}


header .lechuza {
    display: none !important;
}


  .titulo h1 {
    font-size: 1.4em;
    text-align: center;
  }

  .titulo p {
    font-size: 1em;
    text-align: center;
  }

  /* --- Barra de búsqueda centrada --- */
  .search-bar {
    width: 90%;
    margin: 10px auto;
  }

  .botones-busqueda {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
  }

  .botones-busqueda button {
    width: 45%;
  }

  /* --- MENÚ LATERAL --- */
  #menu-container {
    width: 100%;
    float: none;
    position: relative;
    z-index: 1000;
    background: #f9f9f9;
    padding: 0;
  }

  #menu-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  #menu-container li {
    display: block;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #ccc;
  }

  #menu-container li a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    font-size: 18px;
    color: #000;
  }

  /* --- Submenús --- */
  #menu-container li ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }

  #menu-container li ul li {
    border-bottom: 1px solid #eee;
  }

  #menu-container li ul li a {
    padding: 10px;
    font-size: 16px;
    color: #333;
  }

  main, header, footer {
    overflow: visible !important;
  }

  /* --- IMAGEN DE PLATÓN (arriba) Y CITAS (debajo) --- */
  main {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    padding: 10px;
  }

  .platon {
    width: 95%;
    height: auto;
    margin-bottom: 15px;
    order: -1 !important;   /* ← ESTA LÍNEA ES LA CLAVE */
}


  /* Ocultar la columna clásica en móvil */
  .columna {
    display: none !important;
  }

  /* --- Mostrar solo una cita (segunda) --- */
  .citas {
    width: 95%;
    margin: 0 auto;
  }

  .citas p:not(:nth-of-type(2)) {
    display: none !important;
  }

  .citas hr {
    display: none !important;
  }

  /* --- Pie --- */
  footer {
    text-align: center;
  }

  .footer-logo {
    display: none;
  }

  .footer-texto p {
    font-size: 0.9em;
  }
}
/* =========================================================
   📱 REPARACIÓN DEFINITIVA DEL DISEÑO EN MÓVILES
   ========================================================= */
@media (max-width: 768px) {

  /* --- Todo apilado en columna --- */
  body, html {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  /* --- Menú ocupa 100% y NO flota --- */
  #menu-container {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  /* --- Cabecera centrada y fluidificada --- */
  header {
    width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 10px 0 !important;
    text-align: center !important;
    display: block !important;
  }

  /* --- Contenido principal: APILADO --- */
  .container, main, section, article {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
    display: block !important;
  }

  /* --- COLUMNA LATERAL DESACTIVADA EN MOVIL --- */
  .side, .columna, .left {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* --- Todas las imágenes se adaptan --- */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 10px auto !important;
  }

  /* --- Footer centrado --- */
  footer {
    width: 100% !important;
    margin: 0 auto !important;
    padding: 20px 10px !important;
    text-align: center !important;
    float: none !important;
    display: block !important;
  }
}
/* --- Reducir tamaño del logo_lechuza_tras en móviles --- */
@media (max-width: 768px) {
  img[src$="logo_lechuza_tras.png"] {
    width: 70px !important;   /* tamaño fijo, pequeño y proporcionado */
    height: auto !important;
    max-width: 70px !important;
    display: block !important;
    margin: 0 auto !important; /* centrar por si acaso */
  }
}
/* --- GALERÍA DE LIBROS --- */
.galeria-libros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    padding: 20px;
}

.item-libro {
    text-align: center;
    text-decoration: none;
    color: inherit;
}

.item-libro img {
    width: 100%;
    height: 210px;          /* Esto fuerza que todas tengan la misma altura */
    object-fit: cover;      /* Recorta para que todas mantengan proporción */
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.item-libro:hover img {
    transform: scale(1.05);
}

.item-libro span {
    display: block;
    margin-top: 8px;
    font-size: 0.9em;
}
@media (max-width: 768px) {
    .galeria-libros {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .item-libro img {
        height: 180px;
    }
}