/*Aquí comienza imagen de header*/

.main-header__site-title img {
    max-height: 200px;
    margin-top: 16px;
}
/*aquí termina imagen de header */
/* Vista móvil */
@media (max-width: 768px) {
  .main-header__site-title img {
    max-height: 80px !important;
    margin-top: 8px !important;
  }
}
/*fin de Vista móvil */
/* ==================================================
   FOOTER – CONTENEDOR GENERAL
   ================================================== */

.main-footer_top-container {
    display: flex;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==================================================
   COLUMNAS
   ================================================== */

/* Columna 1 – logo (estrecha y compacta) */
.main-footer__col1 {
    flex: 0 0 130px;
    display: grid;
    justify-items: center;
    align-content: center;
    row-gap: 0rem;
    text-align: center;
    padding: 0.8rem 0.5rem;
}

/* Columna 2 – navegación multilínea */
.main-footer__col2 {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.8rem 1rem;
}

/* Columna 3 – texto centrado */
  .main-footer__col3 {
    flex: 1;
    display: flex;
    justify-content: center;  /* horizontal */
    align-items: center;      /* vertical */
    padding: 0.8rem 1rem;
    text-align: center;
}

.main-footer__col3 > * {
    max-width: 320px;
    line-height: 1.5;
}
.main-footer__col3 >  {
    max-width: 320px;
    text-align: center;
    line-height: 1.5;
}

/* ==================================================
   CONTENIDO
   ================================================== */

/* Logo */
.main-footer__col1 img {
    max-width: 90px;
    filter: brightness(0) invert(1);
    margin: 0;
}

/* ==================================================
   NAVEGACIÓN FOOTER – HORIZONTAL CON WRAP
   ================================================== */

.main-footer__col2 .navigation {
    display: flex;
    flex-wrap: wrap;              /* crea nuevas filas */
    justify-content: center;
    align-items: center;
    gap: 0.6rem 1.4rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.main-footer__col2 .navigation > li {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.main-footer__col2 .navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
    padding: 0.25rem 0;
    text-align: center;
    word-break: break-word;       /* textos largos rompen */
}

/* ==================================================
   AJUSTES GENERALES EXISTENTES
   ================================================== */

.assets .asset img {
    max-width: 200%;
    height: auto;
}

.main-header {
    position: initial;
}

body {
    padding-top: 0 !important;
}

/* */

/* esto deja el menú desplegable sobre el banner */
.main-navigation .navigation > li > ul {
  position: absolute;
  z-index: 30;
  background-color: #1e3244;
  }
/* para cambiar el color del footer y user bar */
.main-footer__top {
  background-color: #1e3244;
  padding: 45px 0 20px;
}

.main-footer__bottom {
  background-color:#1e3244;
  padding: 35px 0;
}
#user-bar {
  background-color: #1e3244;
}
/* aquí termina para cambiar el color del footer */

/*tamaño de imagen del logo footer*/
.main-footer__col1 img {
    max-width: 70px;
}
/*aquí termina tamaño de imagen del logo footer*/

body nav.sub-menu {
    display: none !important;
}

/*aquí comienza búsqueda avanzada*/
.main-header__advanced-search {
  font-size: 1.200rem;
  padding-right: 10px;
  text-transform: initial;
}
/*aquí termina búsqueda avanzada*/

/*aquí comienza linea en inicio de colecciones*/
.showcase .entries
 {
   border-top: none  !important;
   border-bottom: none !important;
}

/*aquí comienza separardor en ficha*/
.browse-controls {
   border-bottom: none;
}

/* Mostrar banner solo en home */ 
body.home-page .banner { display: block; } body:not(.home-page) .banner { display: none; } 

/*aquí comienza paginado de pdf*/
#pdf-controls input {
    width: 8ch;}
/*aquí termina paginado de pdf*/

/*botón de go no se muestra*/
.pagination .pager .gotopage-btn {
    display: none;
    }

/*carrusel de página de inicio*/
@media (max-width: 768px) {

  /* Resetea el track para que no transforme */
  .slick-track {
    transform: none !important;
    width: auto !important;
    display: block !important;
  }

  /* Oculta todos los slides */
  .slick-slide {
    display: none !important;
    width: 100% !important;
  }

  /* Muestra solo el activo */
  .slick-slide.slick-current {
    display: block !important;
    width: 100% !important;
  }

  /* Imagen completa */
  .slick-slide.slick-current img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
  }

  /* Título */
  .slick-slide.slick-current .title {
    display: block !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    padding: 6px !important;
  }
}
@media (max-width: 768px) {

  /* Baja los puntos de navegación para que no tapen la imagen */
  .slick-dots {
    position: relative !important;
    bottom: auto !important;
    margin-top: 8px !important;
    display: none !important;
  }

  /* Asegura que el contenedor del carrusel tenga espacio para los puntos */
  .slick-slider {
    padding-bottom: 0 !important;
  }
}
@media (max-width: 768px) {

  .slick-slide.slick-current img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .slick-slide.slick-current > div,
  .slick-slide.slick-current > div > div {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
/*fin del carrusel*/

/*colecciones en vista movil pág. inicio*/

/* --- Contenedor principal de entradas --- */
@media (max-width: 768px) {

  .block-showcase .entries {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    width: 100%;
  }

  /* --- Cada ítem de colección --- */
  .block-showcase .entry.entry-item-set {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border-bottom: 1px solid #dde3ec;
    background: #ffffff;
    transition: background 0.2s ease;
  }

  .block-showcase .entry.entry-item-set:first-child {
    border-top: 1px solid #dde3ec;
  }

  .block-showcase .entry.entry-item-set:hover {
    background: #f4f7fc;
  }

  /* --- Imagen de portada (cuando exista) --- */
  .block-showcase .entry.entry-item-set img,
  .block-showcase .entry.entry-item-set .resource-link img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 14px;
    flex-shrink: 0;
    background: #e8edf5;
  }

  /* --- Placeholder visual cuando NO hay imagen --- */
  .block-showcase .entry.entry-item-set h3::before {
    content: "♩";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #e8edf5;
    color: #394f68;
    font-size: 22px;
    border-radius: 6px;
    margin-right: 14px;
    flex-shrink: 0;
    vertical-align: middle;
  }

  /* Si hay imagen, ocultar el placeholder */
  .block-showcase .entry.entry-item-set:has(img) h3::before {
    display: none;
  }

  /* --- Título h3 --- */
  .block-showcase .entry.entry-item-set h3 {
    margin: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    display: flex;
    align-items: center;
    flex: 1;
  }

  /* --- Enlace del título --- */
  .block-showcase .entry.entry-item-set h3 a.resource-link {
    color: #1a3a5c;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.4;
  }

  .block-showcase .entry.entry-item-set h3 a.resource-link:hover {
    color: #394f68;
    text-decoration: underline;
  }

  /* --- Flecha indicadora al final --- */
  .block-showcase .entry.entry-item-set h3 a.resource-link::after {
    content: "›";
    margin-left: 8px;
    font-size: 20px;
    color: #8fa3bc;
    font-weight: 300;
  }

  /* --- Quitar padding/márgenes extra del bloque padre si los hay --- */
  .block-showcase {
    padding: 0 !important;
    margin: 0 !important;
  }

}
/* =====================================================
   FIN DEL CSS MOBILE
   ===================================================== */

/*fin de colecciones en vista movil pág. inicio*/

/* Justificar párrafos en PC y móvil */
p {
  text-align: justify !important;
}
/* fin de Justificar párrafos en PC y móvil */

/* Justificar párrafos generales */
main * {
  text-align: justify !important;
}

/* Fichas: valores de propiedades */
.property .value,
.property .value *,
.resource-values .value,
.resource-values .value *,
.value-content,
.value-content *,
span.value,
div.value {
  text-align: justify !important;
}

/* Excepciones: títulos, nav y botones sin justificar */
main h1, main h2, main h3, main h4, main h5, main h6,
nav, nav *, button, button *, a.button,
.property-label, label {
  text-align: left !important;
}
/* fin de Justificar párrafos generales */

/* Centra verticalmente el título y separa de la imagen */
.linked-resource a.resource-link {
  display: flex;
  align-items: center;   /* centra el título a la mitad de la altura */
  gap: 20px;             /* separación entre imagen y título */
}
/* Centra verticalmente el título y separa de la imagen */

.linked-resource a.resource-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.linked-resource a.resource-link img {
  width: 300px;               /* un poco más grande */
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.linked-resource a.resource-link .resource-name {
  font-size: 0.9rem;
  text-align: left;           /* esto es clave, alinea el texto a la izquierda */
  max-width: none;            /* elimina cualquier restricción de ancho */
  word-break: normal;         /* evita que corte palabras raro */
}
/* Contenedor de cada recurso: apila imagen y título en columna */

/*no mostrar botones de ordenar, busqueda, de conjunto de fichas*/
.browse-controls {
    display: none !important;
}
/*fin de no mostrar botones de ordenar, busqueda, de conjunto de fichass*/
/*boton de explorar o ver todos centrado */
.preview-block .browse-all {
  float: none !important;
  display: inline-block !important;
  margin: 0 auto !important;
}

.preview-block {
  text-align: center;
}
/*fin de boton de explorar o ver todos centrado */


/* ── BOTONES TOGGLE ── */
.view-toggle {
  display: flex;
  gap: 6px;
  margin-top: -30px;
  margin-bottom: 30px;
  justify-content: center;
}

.view-toggle button {
  padding: 8px !important;
  width: 38px !important;
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #ccc !important;
  background: #f5f5f5 !important;
  color: #555 !important;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.view-toggle button:hover {
  border-color: #888 !important;
  background: #e8e8e8 !important;
  color: #222 !important;
}

.view-toggle button.active {
  background: #333 !important;
  color: #fff !important;
  border-color: #333 !important;
}

.view-toggle button svg {
  display: block;
  fill: currentColor;
}

/* ── VISTA LISTA ── */
ul.resource-list {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  padding: 0 !important;
  margin: 0 !important;
}

ul.resource-list li {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  border-bottom: 1px solid #ddd !important;
  padding: 12px 0 !important;
  list-style: none !important;
  box-sizing: border-box !important;
}

ul.resource-list li img {
  width: 120px !important;
  height: 80px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
  background: #f5f5f5
  order: -1 !important;
}

ul.resource-list li a {
  flex: 1 !important;
  text-align: left !important;
}

ul.resource-list li {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  border-bottom: 1px solid #ddd !important;
  padding: 12px 0 !important;
  list-style: none !important;
  box-sizing: border-box !important;
}
/*acaba el tema de los botones*/

/*header con logo delante*/
/* Reduce el logo y el espacio superior */
.main-header__site-title img {
  max-height: 70px !important;   /* antes: 200px */
  margin-top: 0 !important;
  width: auto;
}
/*fin de header con logo delante*/