/* Monte Madrid Custom Styles */

/* Ionicons v2.0.1 - for format icons in result list (matching bibliotecas.montemadrid.es) */
@import url('https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css');

/* Font Awesome 6 Brands Font */
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../../bootstrap5/css/vendor/font-awesome/webfonts/fa-brands-400.woff2") format("woff2"),
       url("../../bootstrap5/css/vendor/font-awesome/webfonts/fa-brands-400.ttf") format("truetype");
}

/* ==========================================================================
   GLOBAL OVERRIDES
   ========================================================================== */

/* Hide breadcrumbs globally */
.breadcrumbs,
nav.breadcrumbs {
  display: none !important;
}

/* Remove underline from all icon links */
.icon-link__label,
.icon-link .icon-link__label {
  text-decoration: none !important;
}

/* Global Typography - Matching bibliotecas.montemadrid.es */
/* Import Quicksand font */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  line-height: 20px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Quicksand', sans-serif;
}

h3 {
  font-size: 13.33px;
  font-weight: 700;
  line-height: 16px;
}

h5 {
  font-size: 20px;
  font-weight: 500;
  line-height: 24px;
}

p {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  line-height: 20px;
}

a {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  line-height: 20px;
}

button, .btn {
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
}

/* ==========================================================================
   HEADER STYLES
   ========================================================================== */

.montemadrid-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 1000;
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.header-logo {
  flex-shrink: 0;
}

.logo-img {
  height: 70px;
  width: auto;
  max-width: 350px;
  object-fit: contain;
}

/* Navigation Menu */
.header-nav {
  margin-left: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.nav-item {
  display: flex;
  align-items: center;
}

.nav-separator {
  color: #cccccc;
  padding: 0 12px;
  font-size: 13.33px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #333333;
  text-decoration: none;
  font-size: 13.33px;
  font-family: 'Quicksand', sans-serif;
  padding: 8px 12px;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-link:hover {
  color: #000000;
  text-decoration: none;
}

.nav-link i {
  font-size: 13.33px;
}

/* Botones especiales Acceso y Registro */
.nav-link-access,
.nav-link-register {
  color: #dc3545 !important;
}

.nav-link-access:hover,
.nav-link-register:hover {
  color: #c82333 !important;
}

/* Language dropdown */
.btn-language {
  font-size: 13.33px;
}

.dropdown-menu {
  font-size: 13.33px;
  min-width: 150px;
}

.dropdown-item.active {
  background-color: #f0f0f0;
  color: #333;
  font-weight: 600;
}

/* Search Container */
.search-container {
  background-color: #ffffff;
  border-top: 1px solid #e0e0e0;
  padding: 10px 0px;
  width: 100%;
  max-width: 100%;
}

.searchForm {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

.searchForm-inputs {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-wrap: nowrap;
  width: 100%;
}

/* Select: 20% */
.searchForm-inputs select,
.searchForm-inputs .form-select,
.searchForm-inputs .form-control:not([type="text"]) {
  flex: 0 0 20% !important;
  height: 40px !important;
  border: none;
  border-bottom: 1px solid #d1d1d1;
  border-radius: 0;
  font-size: 13.33px;
  padding: 8px 12px;
  margin: 0;
  background-color: transparent;
  color: #333333;
  outline: none;
  box-sizing: border-box;
  appearance: auto;
}

.searchForm-inputs select:focus,
.searchForm-inputs .form-select:focus,
.searchForm-inputs select:active,
.searchForm-inputs .form-select:active {
  outline: none;
  border-bottom: 1px solid #d1d1d1;
  box-shadow: none;
}

/* Input container: 60% */
.searchForm-query {
  flex: 0 0 60%;
  display: flex;
  align-items: stretch;
  border-bottom: none;
  height: 40px;
  position: relative;
  box-sizing: border-box;
}

#searchForm_controls {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding-right: 8px;
  pointer-events: none;
}

#searchForm_controls > * {
  pointer-events: auto;
}

/* Input takes 100% of its container (.searchForm-query which is 60%) */
.searchForm-query input[type="text"],
.searchForm-query .form-control,
.searchForm-inputs input[type="text"],
.searchForm-inputs .form-control[type="text"] {
  flex: 1 1 100% !important;
  width: 100% !important;
  min-width: 0;
  max-width: 100%;
  height: 40px !important;
  border: none;
  border-bottom: 1px solid #d1d1d1;
  border-radius: 0;
  font-size: 13.33px;
  padding: 8px 12px;
  margin: 0;
  background-color: transparent;
  outline: none;
  box-sizing: border-box;
}

.searchForm-inputs input[type="text"]:focus,
.searchForm-inputs .form-control:focus {
  outline: none;
  box-shadow: none;
}

/* Search button: 5% */
.searchForm-inputs button[type="submit"],
.searchForm-inputs .btn-primary {
  flex: 0 0 5% !important;
  height: 40px;
  border: none !important;
  border-bottom: 1px solid #d1d1d1 !important;
  background-color: transparent !important;
  color: #333333 !important;
  padding: 8px 4px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.2s ease;
  outline: none;
  margin: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Ensure icon inside button is visible */
.searchForm-inputs button[type="submit"] .icon,
.searchForm-inputs .btn-primary .icon,
.searchForm-inputs button[type="submit"] i,
.searchForm-inputs .btn-primary i {
  color: #333333 !important;
  font-size: 13.33px;
  display: inline-block;
}

.searchForm-inputs button[type="submit"]:hover,
.searchForm-inputs .btn-primary:hover {
  background-color: transparent !important;
  color: #000000 !important;
}

.searchForm-inputs button[type="submit"]:hover .icon,
.searchForm-inputs .btn-primary:hover .icon,
.searchForm-inputs button[type="submit"]:hover i,
.searchForm-inputs .btn-primary:hover i {
  color: #000000 !important;
}

.searchForm-inputs button[type="submit"]:focus,
.searchForm-inputs .btn-primary:focus,
.searchForm-inputs button[type="submit"]:active,
.searchForm-inputs .btn-primary:active {
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none;
  color: #333333 !important;
}

/* Search options: 15% (beside the search bar, aligned right) */
.search-options {
  flex: 0 0 15%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  padding-left: 10px;
  margin: 0;
  box-sizing: border-box;
}

.search-exact-phrase {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555555;
  cursor: pointer;
  margin: 0;
  font-family: 'Quicksand', sans-serif;
  white-space: nowrap;
}

.search-exact-phrase input[type="checkbox"] {
  cursor: pointer;
  width: 14px;
  height: 14px;
  margin: 0;
}

.search-advanced-link {
  font-size: 13px;
  color: #666666;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.search-advanced-link:hover {
  color: #333333;
  text-decoration: underline;
}

/* Search Form Responsive - Keep select/input/button in one row, options below */
@media (max-width: 991px) {
  .searchForm-inputs {
    flex-wrap: wrap !important;
  }

  /* Select: auto width, can shrink */
  .searchForm-inputs select,
  .searchForm-inputs .form-select,
  .searchForm-inputs .form-control:not([type="text"]) {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 90px !important;
    max-width: 150px !important;
  }

  /* Input container: fill remaining space */
  .searchForm-query {
    flex: 1 1 0% !important;
    min-width: 120px !important;
  }

  /* Search button: auto width */
  .searchForm-inputs button[type="submit"],
  .searchForm-inputs .btn-primary {
    flex: 0 0 40px !important;
    width: 40px !important;
  }

  /* Search options: full width, goes to next row */
  .search-options {
    flex: 1 0 100% !important;
    width: 100% !important;
    order: 99 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 15px !important;
    margin-top: 10px !important;
    padding-left: 0 !important;
  }
}

@media (max-width: 576px) {
  .searchForm-inputs select,
  .searchForm-inputs .form-select,
  .searchForm-inputs .form-control:not([type="text"]) {
    min-width: 70px !important;
    max-width: 100px !important;
    font-size: 11px !important;
    padding: 5px 6px !important;
  }

  .searchForm-query {
    min-width: 80px !important;
  }

  .search-exact-phrase,
  .search-advanced-link {
    font-size: 11px;
  }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */

/* Ensure html and body are full width */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Remove body padding/margin to allow full-width footer */
body {
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Restore container spacing for main content only */
.main .container {
  padding-left: 15px;
  padding-right: 15px;
}

/* Faldon Banner - Above Footer */
.faldon-banner {
  background-color: #ffffff;
  padding: 15px 0;
  text-align: center;
  width: 100%;
}

.faldon-banner .faldon-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.montemadrid-footer {
  background-color: #444444;
  color: #ffffff;
  margin-top: 0;
  font-family: 'Quicksand', sans-serif;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.footer-content {
  /* padding removed */
}

.footer-content .container-fluid {
  width: 100%;
  max-width: 100%;
  padding-left: 30px;
  padding-right: 30px;
  margin: 0;
  box-sizing: border-box;
}

.montemadrid-footer .footer-content .row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  margin-left: -15px;
  margin-right: -15px;
}

.montemadrid-footer .footer-column {
  padding: 20px 15px;
  flex: 0 0 33.333333% !important;
  max-width: 33.333333% !important;
  display: block !important;
}

.footer-title {
  font-size: 13.33px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #ffffff;
  font-family: 'Quicksand', sans-serif;
}

.footer-divider {
  height: 1px;
  background-color: #666;
  margin: 15px 0;
}

/* Contact Information */
.contact-location {
  margin-bottom: 20px;
}

.location-name {
  font-weight: 300;
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Quicksand', sans-serif;
}

.location-name a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 300;
}

.location-name a:hover {
  color: #666666;
  text-decoration: none;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 300;
  font-family: 'Quicksand', sans-serif;
}

.contact-detail i {
  margin-top: 2px;
  width: 16px;
}

.contact-detail-indent {
  margin-left: 24px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 300;
  font-family: 'Quicksand', sans-serif;
}

/* Twitter Feed */
.twitter-feed {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 10px;
  min-height: 300px;
}

.twitter-feed a {
  color: #ffffff !important;
  text-decoration: none !important;
}

.twitter-feed a:hover {
  color: #666666 !important;
  text-decoration: none !important;
}

/* Legal Links */
.footer-legal {
  text-align: right;
  margin-bottom: 25px;
  font-size: 13px;
  font-weight: 300;
  font-family: 'Quicksand', sans-serif;
}

.legal-link {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 300;
}

.legal-link:hover {
  color: #666666;
  text-decoration: underline;
}

.legal-separator {
  margin: 0 8px;
  color: #999;
}

/* Social Media */
.footer-social {
  text-align: right;
  margin-bottom: 25px;
}

.social-title {
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 10px;
  font-family: 'Quicksand', sans-serif;
}

.social-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

.social-link {
  color: #ffffff;
  font-size: 2rem;
  transition: color 0.3s ease;
  display: inline-block;
}

.social-link.facebook:hover {
  color: #1877f2;
}

.social-link.x-twitter:hover {
  color: #000000;
}

.social-link.x-twitter svg {
  vertical-align: middle;
}

.social-link.youtube:hover {
  color: #ff0000;
}

/* Powered By */
.footer-powered {
  text-align: right;
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.footer-powered a {
  text-decoration: none;
  border: none;
  outline: none;
}

.powered-text {
  font-size: 11px;
  font-weight: 300;
  color: #999;
  margin: 0;
  font-family: 'Quicksand', sans-serif;
}

.powered-logo {
  height: 20px;
  width: auto;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  filter: brightness(0) invert(1);
  display: block;
}

.powered-logo:hover {
  opacity: 0.7;
}

/* Copyright Bar */
.footer-copyright {
  background-color: #333333;
  padding: 15px 0;
  border-top: 1px solid #555;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.footer-copyright .container-fluid {
  width: 100%;
  max-width: 100%;
  padding-left: 30px;
  padding-right: 30px;
  margin: 0;
  box-sizing: border-box;
}

.copyright-text {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 300;
  color: #999;
  font-family: 'Quicksand', sans-serif;
}

/* Responsive Footer */
@media (max-width: 767px) {
  .montemadrid-footer .footer-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  .footer-legal {
    text-align: center;
  }

  .footer-social {
    text-align: center;
  }

  .footer-powered {
    align-items: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* ==========================================================================
   HOME PAGE STYLES
   ========================================================================== */

.montemadrid-home {
  background-color: #f5f5f5;
  padding-top: 40px;
  padding-bottom: 40px;
}

.home-search-container {
  background-color: #fff;
  padding: 40px 20px;
  margin-bottom: 30px;
}

/* ==========================================================================
   CAROUSEL SECTIONS
   ========================================================================== */

.home-carousels {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Carousel Loading and No Data Messages */
.carousel-loading-wrapper,
.carousel-no-data {
  text-align: center;
  padding: 60px 20px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.carousel-loading {
  font-size: 1.1rem;
  color: #666;
}

.carousel-loading i {
  margin-right: 10px;
  font-size: 1.3rem;
}

.carousel-no-data p {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

.carousel-section {
  background-color: transparent;
  margin-bottom: 40px;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.carousel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 0;
  border-bottom: none;
}

.carousel-title {
  font-size: 17.33px;
  font-weight: 500;
  color: #555555;
  margin: 0;
  text-transform: capitalize;
}

.ver-todos {
  color: #666666;
  font-size: 13.33px;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.ver-todos:hover {
  color: #000;
  text-decoration: none;
}

/* ==========================================================================
   CAROUSEL CONTAINER & NAVIGATION
   ========================================================================== */

.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align to the left */
  gap: 10px;
}

.carousel-nav {
  flex-shrink: 0;
  width: 33px;
  height: 29px;
  border: none;
  background-color: #444444;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  color: #ffffff;
}

.carousel-nav:hover {
  background-color: #333333;
  color: #ffffff;
}

.carousel-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background-color: #444444;
  color: #ffffff;
}

.carousel-nav i {
  font-size: 1rem;
}

.carousel-track-wrapper {
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  scroll-behavior: smooth;
}

.carousel-track-wrapper::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.carousel-track {
  display: flex;
  gap: 15px;
  padding: 5px 0;
  width: max-content; /* Expand to fit all items */
  justify-content: flex-start;
  align-items: flex-start;
}

/* ==========================================================================
   CAROUSEL ITEMS
   ========================================================================== */

.carousel-item {
  flex: 0 0 175px;
  width: 175px;
  min-height: 320px;
  transition: all 0.3s ease;
  display: block !important; /* Override Bootstrap's .carousel-item display: none */
  float: none !important; /* Override Bootstrap's float: left */
  margin-right: 0 !important; /* Override Bootstrap's negative margin */
  position: relative;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

.carousel-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.carousel-item-link:hover {
  text-decoration: none;
  color: inherit;
}

.carousel-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.carousel-item-cover {
  position: relative;
  width: 100%;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.carousel-item-cover img {
  width: 100%;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

.carousel-item-info {
  padding: 12px 8px 8px 8px;
  display: flex;
  flex-direction: column;
  min-height: 100px;
}

.carousel-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 auto 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  min-height: 2.6em;
}

.carousel-item-author {
  font-size: 13.33px;
  color: #666;
  margin: 4px 0 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-item-format {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.carousel-item-format i {
  font-size: 0.75rem;
  color: #666;
}

.carousel-item-type {
  font-size: 12px;
  color: #999;
  margin: 0;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-item-year {
  font-size: 0.75rem;
  color: #999;
  margin: 0;
}

/* Loading state */
.carousel-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #999;
  font-size: 1rem;
}

.carousel-loading i {
  margin-right: 10px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Large screens - 6 items */
@media (min-width: 1200px) {
  .carousel-item {
    flex: 0 0 175px;
    width: 175px;
  }
}

/* Medium-large screens - 5 items */
@media (max-width: 1199px) and (min-width: 992px) {
  .carousel-item {
    flex: 0 0 160px;
    width: 160px;
  }

  .carousel-item-cover,
  .carousel-item-cover img {
    height: 210px;
    min-height: 210px;
    max-height: 210px;
  }
}

/* Medium screens - 4 items */
@media (max-width: 991px) and (min-width: 768px) {
  .carousel-item {
    flex: 0 0 155px;
    width: 155px;
  }

  .carousel-item-cover,
  .carousel-item-cover img {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
  }

  .carousel-title {
    font-size: 1.25rem;
  }

  .search-container {
    padding: 20px 0 15px;
  }
}

/* Small screens - 3 items */
@media (max-width: 767px) {
  .home-carousels {
    padding: 0 10px;
  }

  .carousel-section {
    padding: 15px 10px;
  }

  .carousel-item {
    flex: 0 0 140px;
    width: 140px;
  }

  .carousel-item-cover,
  .carousel-item-cover img {
    height: 190px;
    min-height: 190px;
    max-height: 190px;
  }

  .carousel-nav {
    width: 35px;
    height: 35px;
  }

  .carousel-title {
    font-size: 1.1rem;
  }

  .ver-todos {
    font-size: 0.75rem;
  }

  /* Search container responsive */
  .search-container {
    padding: 15px 0 10px;
  }

  .search-box-wrapper .searchForm-inputs {
    flex-wrap: wrap;
  }

  .search-box-wrapper select,
  .search-box-wrapper .form-select {
    flex: 1 1 100%;
    margin-bottom: 10px;
    margin-right: 0;
  }
}

/* Extra small screens - 2 items */
@media (max-width: 576px) {
  .carousel-item {
    flex: 0 0 135px;
    width: 135px;
  }

  .carousel-item-cover,
  .carousel-item-cover img {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
  }

  .carousel-track {
    gap: 10px;
  }

  .carousel-nav {
    width: 30px;
    height: 30px;
  }

  .carousel-nav i {
    font-size: 0.875rem;
  }

  .carousel-item-title {
    font-size: 0.8rem;
  }

  .carousel-item-author {
    font-size: 0.65rem;
  }

  .carousel-item-type {
    font-size: 0.6rem;
  }
}

/* ==========================================================================
   HEADER & FOOTER RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 992px) {
  /* Header adjustments */
  .header-top {
    flex-wrap: wrap;
  }

  .logo-img {
    height: 60px;
  }

  .nav-menu {
    gap: 5px;
  }

  .nav-link span {
    display: none;
  }

  .nav-link {
    padding: 8px 8px;
  }

  .nav-separator {
    padding: 0 8px;
  }

  .search-box-wrapper select,
  .search-box-wrapper .form-select {
    flex: 0 0 150px;
  }

  /* Footer adjustments */
  .footer-legal,
  .footer-social,
  .footer-powered {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .footer-column {
    text-align: center;
  }

  .location-name,
  .contact-detail {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Header mobile styles */
  .logo-img {
    height: 50px;
  }

  .nav-menu {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-link {
    font-size: 0.85rem;
    padding: 6px 6px;
  }

  .nav-link i {
    font-size: 0.85rem;
  }

  .nav-separator {
    font-size: 0.85rem;
    padding: 0 6px;
  }

  .search-box-wrapper form {
    flex-wrap: wrap;
  }

  .search-box-wrapper select,
  .search-box-wrapper .form-select {
    flex: 1 1 100%;
    border-right: 1px solid #cccccc;
    margin-bottom: 10px;
  }

  .search-box-wrapper input[type="text"],
  .search-box-wrapper .form-control {
    flex: 1 1 auto;
    border-left: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
  }

  .search-container {
    padding: 15px 0;
  }

  /* Footer mobile styles */
  .footer-content {
    /* padding removed */
  }

  .footer-column {
    margin-bottom: 20px;
  }

  .footer-title {
    font-size: 18px;
  }

  .social-title {
    font-size: 13px;
  }

  .social-link {
    font-size: 1.75rem;
  }

  .twitter-feed {
    min-height: 250px;
  }

  .contact-detail,
  .contact-detail-indent,
  .legal-link,
  .copyright-text {
    font-size: 13px;
  }

  .powered-text {
    font-size: 10px;
  }

  .powered-logo {
    height: 18px;
  }
}

@media (max-width: 576px) {
  /* Extra small devices */
  .header-top {
    padding: 10px 0;
  }

  .logo-img {
    height: 40px;
  }

  .btn-language span {
    display: none;
  }

  .nav-icon {
    font-size: 1.2rem;
  }

  .footer-legal {
    font-size: 12px;
  }

  .legal-separator {
    display: block;
    margin: 5px 0;
  }

  .contact-detail,
  .contact-detail-indent {
    font-size: 12px;
  }

  .social-link {
    font-size: 1.5rem;
  }

  .social-title {
    font-size: 12px;
  }

  .footer-title {
    font-size: 16px;
  }

  .copyright-text {
    font-size: 12px;
  }

  .powered-text {
    font-size: 10px;
  }

  .powered-logo {
    height: 18px;
  }
}

/* ==========================================================================
   MODAL DE REGISTRO
   ========================================================================== */

/* Modal general styles */
#registerModal .modal-dialog {
  max-width: 900px;
}

#registerModal .modal-content {
  border-radius: 0;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

#registerModal .modal-header {
  background-color: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  padding: 20px 30px;
}

#registerModal .modal-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #333;
  font-family: 'Quicksand', sans-serif;
}

#registerModal .modal-body {
  padding: 30px;
}

/* Mensajes de alerta en el modal */
#registerModal .alert {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}

#registerModal .alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

#registerModal .alert-danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

#registerModal .form-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  font-family: 'Quicksand', sans-serif;
}

#registerModal .form-control,
#registerModal .form-select {
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #333;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#registerModal .form-control:focus,
#registerModal .form-select:focus {
  border-color: #888;
  box-shadow: 0 0 0 0.2rem rgba(68, 68, 68, 0.15);
  outline: none;
}

#registerModal .form-check {
  margin-bottom: 12px;
}

#registerModal .form-check-input {
  width: 18px;
  height: 18px;
  border: 1px solid #d0d0d0;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 0.15rem;
}

#registerModal .form-check-input:checked {
  background-color: #444444;
  border-color: #444444;
}

#registerModal .form-check-label {
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  margin-left: 8px;
  font-family: 'Quicksand', sans-serif;
}

#registerModal .form-check-label a {
  color: #444444;
  text-decoration: underline;
}

#registerModal .form-check-label a:hover {
  color: #222;
}

#registerModal .modal-footer {
  border-top: none;
  padding: 0;
  justify-content: center;
  margin-top: 25px;
}

/* Botón de cierre del modal */
#registerModal .btn-close {
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

#registerModal .btn-close:hover {
  opacity: 0.75;
}

#registerModal .btn-close:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(68, 68, 68, 0.25);
  opacity: 1;
}

/* reCAPTCHA v3 badge (aparece en la esquina inferior derecha automáticamente) */
.grecaptcha-badge {
  visibility: visible !important;
  opacity: 1 !important;
}

/* "He olvidado mi contraseña" link */
.forgot-password-link {
  color: #444444;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #222222;
  text-decoration: underline;
}

/* ==========================================================================
   ESTILOS GLOBALES DE BOTONES - Color #444444
   ========================================================================== */

/* Botón principal de registro "DARSE DE ALTA" */
.btn-register-submit {
  background-color: #444444;
  color: #ffffff;
  border: none;
  padding: 14px 50px;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Quicksand', sans-serif;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-register-submit:hover {
  background-color: #333333;
  color: #ffffff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

.btn-register-submit:active {
  background-color: #222222;
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-register-submit:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(68, 68, 68, 0.25);
}

/* Estandarizar todos los botones de Bootstrap con #444444 */
.btn-primary,
.btn.btn-primary {
  background-color: #444444 !important;
  border-color: #444444 !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn.btn-primary:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

.btn-primary:active,
.btn.btn-primary:active,
.btn-primary:focus,
.btn.btn-primary:focus {
  background-color: #222222 !important;
  border-color: #222222 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(68, 68, 68, 0.25) !important;
}

/* Botones secundarios también con #444444 */
.btn-secondary,
.btn.btn-secondary {
  background-color: #666666 !important;
  border-color: #666666 !important;
  color: #ffffff !important;
}

.btn-secondary:hover,
.btn.btn-secondary:hover {
  background-color: #555555 !important;
  border-color: #555555 !important;
  color: #ffffff !important;
}

/* Botones de submit en formularios */
button[type="submit"]:not(.search-box-wrapper button[type="submit"]),
input[type="submit"],
.btn-submit {
  background-color: #444444;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button[type="submit"]:not(.search-box-wrapper button[type="submit"]):hover,
input[type="submit"]:hover,
.btn-submit:hover {
  background-color: #333333;
  color: #ffffff;
}

button[type="submit"]:not(.search-box-wrapper button[type="submit"]):active,
input[type="submit"]:active,
.btn-submit:active {
  background-color: #222222;
}

/* Botones de enlaces que parecen botones */
.btn-link-styled {
  background-color: #444444;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 4px;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn-link-styled:hover {
  background-color: #333333;
  color: #ffffff;
  text-decoration: none;
}

/* Ajustar botones de navegación/carrusel */
.carousel-nav {
  background-color: #444444;
  color: #ffffff;
}

.carousel-nav:hover:not(:disabled) {
  background-color: #333333;
  color: #ffffff;
}

/* Links que actúan como botones en modales */
.modal .btn-close:focus {
  box-shadow: 0 0 0 0.2rem rgba(68, 68, 68, 0.25);
}

/* Responsive modal */
@media (max-width: 768px) {
  #registerModal .modal-dialog {
    margin: 10px;
  }

  #registerModal .modal-body {
    padding: 20px 15px;
  }

  #registerModal .modal-header {
    padding: 15px 20px;
  }

  #registerModal .modal-title {
    font-size: 1.25rem;
  }

  .btn-register-submit {
    padding: 12px 40px;
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   ACCOUNT MENU & PROFILE STYLES
   ========================================================================== */

/* Account Home Link (Inicio button) */
.account-home-link {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.account-home-link .btn-home {
  display: block;
  color: #666666;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.account-home-link .btn-home:hover {
  color: #333333;
  text-decoration: none;
}

/* Account Section Title (SU CUENTA) */
.account-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 15px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.account-section-title .account-icon {
  font-size: 18px;
  color: #000000;
}

/* Account Menu Items */
.myresearch-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.myresearch-menu li {
  margin-bottom: 2px;
}

.myresearch-menu a {
  display: block;
  color: #666666;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.myresearch-menu a:hover {
  color: #333333;
  background-color: #f5f5f5;
  text-decoration: none !important;
}

.myresearch-menu a.active {
  color: #ffffff;
  background-color: #444444;
  font-weight: 500;
}

/* Item de menú en negrita (Perfil / Carnet) */
.myresearch-menu a.menu-item-bold {
  font-weight: 700;
}

.myresearch-menu a.menu-item-bold.active {
  font-weight: 700;
}

/* Profile Cards */
.profile-card {
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.profile-card-title {
  font-size: 22px;
  font-weight: 600;
  color: #333333;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

/* Profile Information Rows */
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.profile-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-label {
  font-size: 14px;
  font-weight: 600;
  color: #333333;
}

.profile-value {
  font-size: 14px;
  font-weight: 400;
  color: #666666;
}

/* QR Code Section */
.profile-qr-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.btn-qr-toggle {
  background-color: #666666;
  color: #ffffff;
  border: none;
  padding: 12px 20px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 15px;
  transition: background-color 0.3s ease;
}

.btn-qr-toggle:hover {
  background-color: #555555;
}

.qr-code-container {
  margin-top: 15px;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qr-code-container.hidden {
  display: none;
}

.qr-adobe-text {
  font-size: 13px;
  font-weight: 600;
  color: #333333;
  margin-top: 15px;
  margin-bottom: 5px;
}

.qr-adobe-id {
  font-size: 13px;
  font-weight: 400;
  color: #666666;
  margin: 0;
  margin-bottom: 15px;
}

#qr-canvas {
  display: block;
  max-width: 200px;
  height: auto;
}

.btn-qr-download {
  margin-top: 15px;
  background-color: #666666;
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-qr-download:hover {
  background-color: #555555;
  color: #ffffff;
}

/* Profile Actions */
.profile-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.profile-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Responsive Adjustments for Account Area */
@media (max-width: 768px) {
  .profile-card {
    padding: 20px;
  }

  .profile-card-title {
    font-size: 18px;
  }

  .profile-row {
    flex-direction: column;
    gap: 5px;
  }

  .profile-label {
    min-width: auto;
  }

  .account-section-title {
    font-size: 14px;
  }

  .myresearch-menu a {
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* ==========================================
   SEARCH RESULTS - Montemadrid Style
   ========================================== */

/* Result Item Container */
.montemadrid-result {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}

.montemadrid-result:first-child {
  padding-top: 0;
}

/* Cover Image */
.result-cover {
  flex-shrink: 0;
  width: 80px;
  height: 120px;
}

.result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid #ddd;
}

.no-image-placeholder {
  width: 100%;
  height: 100%;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-image-icon {
  font-size: 32px;
  opacity: 0.3;
}

/* Result Content */
.result-content {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-size: 16px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.result-title .title-link {
  color: #333333;
  text-decoration: none;
}

.result-title .title-link:hover {
  color: #000000;
  text-decoration: underline;
}

/* Author */
.result-author {
  font-size: 14px;
  color: #666666;
  margin-bottom: 8px;
}

.result-author .author-label {
  font-style: normal;
  margin-right: 4px;
}

.result-author a {
  color: #666666;
  text-decoration: none;
}

.result-author a:hover {
  color: #333333;
  text-decoration: underline;
}

/* Format */
.result-format {
  font-size: 14px;
  color: #666666;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.format-icon {
  font-size: 16px;
  opacity: 0.6;
}

.result-format .format,
.result-format .badge {
  background: none;
  border: none;
  padding: 0;
  color: #666666;
  font-size: 14px;
  font-weight: normal;
  display: inline;
}

/* Publication Details */
.result-publication {
  font-size: 14px;
  color: #666666;
  margin-bottom: 8px;
}

.result-publication a {
  color: #666666;
  text-decoration: none;
}

.result-publication a:hover {
  color: #333333;
  text-decoration: underline;
}

.result-publication strong {
  font-weight: 600;
  color: #333333;
  margin-left: 8px;
}

/* Call Number and Location */
.callnumAndLocation {
  font-size: 14px;
  color: #666666;
  margin-top: 8px;
}

.callnumAndLocation strong {
  font-weight: 600;
  color: #333333;
}

/* Action Buttons */
.result-actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 0;
}

.btn-add-favorite {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  color: #333333;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-add-favorite:hover {
  background-color: #f5f5f5;
  border-color: #999999;
  text-decoration: none;
  color: #000000;
}

.favorite-icon {
  font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .montemadrid-result {
    flex-direction: column;
    gap: 12px;
  }

  .result-cover {
    width: 60px;
    height: 90px;
  }

  .result-actions {
    width: 100%;
  }

  .btn-add-favorite {
    width: 100%;
    justify-content: center;
  }
}

/* Override default VuFind result styles */
.result-body {
  padding: 0;
}

.result-body h2 {
  font-size: 16px;
  margin: 0;
}

/* Hide default format badges styling */
.result-formats .format,
.result-formats .label {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #666666 !important;
  font-weight: normal !important;
}

/* Status labels */
.status .label {
  background-color: #f0f0f0;
  color: #666666;
  border: 1px solid #d0d0d0;
  font-weight: normal;
}

/* ==========================================
   SIDEBAR FACETS - Montemadrid Style (Navigation Structure)
   ========================================== */

/* Remove "Refine Results" / "Limitar resultados" title */
#search-sidebar > h2:first-child {
  display: none;
}

/* Nav base styles - matching bibliotecas.montemadrid.es */
.nav {
  --bs-nav-link-padding-x: 1rem;
  --bs-nav-link-padding-y: 1rem;
  --bs-nav-link-font-weight: ;
  --bs-nav-link-color: var(--bs-link-color);
  --bs-nav-link-hover-color: var(--bs-link-hover-color);
  --bs-nav-link-disabled-color: var(--bs-secondary-color);
  display: block;
  /* flex-wrap: wrap; */
  /* padding-left: 0; */
  /* margin-bottom: 0; */
  /* list-style: none; */
  padding-right: 15px;
  width: 100%;
}

/* Main facet navigation container - matching bibliotecas.montemadrid.es */
.nav .nav-filters {
  font-family: 'Quicksand', sans-serif;
  width: 100%;
}

.nav-filters ul#nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Facet group (has_sub) - matching bibliotecas.montemadrid.es */
.nav-filters ul#nav > li.has_sub {
  /* margin-bottom: 15px; */
  /* padding-bottom: 15px; */
  border-bottom: 1px solid #e0e0e0;
}

.nav-filters ul#nav > li.has_sub:last-child {
  border-bottom: none;
}

/* Facet title (wrapper-has-sub) - matching bibliotecas.montemadrid.es */
.nav-filters .wrapper-has-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #555555;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-filters .wrapper-has-sub:hover {
  color: #333333;
}

.nav-filters .wrapper-has-sub span {
  flex: 1;
}

/* Chevron icons - matching bibliotecas.montemadrid.es */
.nav-filters .wrapper-has-sub i.icon {
  font-style: normal;
  font-size: 16px;
  transition: transform 0.2s ease;
  color: #999999;
  margin-left: 8px;
}

/* Unicode chevron characters */
.nav-filters .wrapper-has-sub i.ion-chevron-right::before {
  content: '›';
  font-size: 20px;
  line-height: 1;
}

.nav-filters .wrapper-has-sub i.ion-chevron-down::before {
  content: '⌄';
  font-size: 18px;
  line-height: 1;
}

/* Show right chevron when closed, down chevron when open */
.nav-filters li.has_sub .wrapper-has-sub i.ion-chevron-down {
  display: none;
}

.nav-filters li.has_sub.open .wrapper-has-sub i.ion-chevron-right {
  display: none;
}

.nav-filters li.has_sub.open .wrapper-has-sub i.ion-chevron-down {
  display: inline;
}

/* Submenu - matching bibliotecas.montemadrid.es */
.nav-filters li.has_sub > ul {
  list-style: none;
  padding: 0;
  /* margin: 10px 0 0 0; */
}

/* Facet items (its_item) - matching bibliotecas.montemadrid.es */
.nav-filters .its_item {
  list-style: none;
  /* margin-bottom: 8px; */
}

.nav-filters .its_item a {
  font-size: 13.33px;
  color: #555555;
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1.4;
  display: flex;
}

.nav-filters .its_item a:hover {
  color: #333333;
  text-decoration: underline;
}

/* More/Less links - matching bibliotecas.montemadrid.es */
.nav-filters li > a {
  font-size: 13.33px;
  color: #555555;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  margin-top: 5px;
}

.nav-filters li > a:hover {
  color: #333333;
}

.nav-filters li > a i.fa-plus,
.nav-filters li > a i.fa-minus {
  font-size: 11px;
  margin-right: 3px;
}

/* Hidden items container */
.nav-filters .narrowList.offscreen {
  display: none;
}

.nav-filters .narrowList {
  margin-top: 8px;
}

/* ==========================================================================
   DATE RANGE SLIDER STYLES
   ========================================================================== */

/* Container for date range facet */
.facet-range-container {
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 4px;
  margin-top: 5px;
}

/* Date range form */
.facet-range-form {
  width: 100%;
}

/* Date fields container - inline with button */
.date-fields {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.date-from,
.date-to {
  flex: 1;
}

.date-from label,
.date-to label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #666666;
  margin-bottom: 3px;
}

.date-from input,
.date-to input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'Quicksand', sans-serif;
}

.date-from input:focus,
.date-to input:focus {
  border-color: #444444;
  outline: none;
  box-shadow: 0 0 0 2px rgba(68, 68, 68, 0.1);
}

/* Slider container */
.slider-container {
  padding: 10px 5px;
  margin-bottom: 10px;
}

.slider-container .slider.slider-horizontal {
  width: 100%;
}

.slider-container .slider-track {
  background: #e0e0e0;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
  height: 8px;
  border-radius: 4px;
}

.slider-container .slider-handle {
  background: #444444;
  background-image: none;
  border: 2px solid #444444;
  box-shadow: none;
  opacity: 1;
  width: 18px;
  height: 18px;
  top: -5px;
}

.slider-container .slider-handle:hover,
.slider-container .slider-handle:active,
.slider-container .slider-handle:focus {
  background: #333333;
  border-color: #333333;
}

.slider-container .slider-selection {
  background: #666666;
  box-shadow: none;
  border-radius: 4px;
}

.slider-container input {
  display: none;
}

/* Submit button for date range - inline with inputs */
.facet-range-form .btn {
  padding: 6px 12px;
  background-color: #444444;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  font-family: 'Quicksand', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.facet-range-form .btn:hover {
  background-color: #333333;
}

.facet-range-form .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(68, 68, 68, 0.25);
}

/* Montemadrid: Inline facet items (one line) */
.montemadrid-facets .facet-inline-container {
  list-style: none;
  margin: 0;
  padding: 0;
}

.montemadrid-facets .facet-inline-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
  margin-bottom: 8px;
}

.montemadrid-facets .facet-inline-item {
  display: inline;
}

.montemadrid-facets .facet-inline-item::after {
  content: ", ";
  color: #999999;
}

.montemadrid-facets .facet-inline-item:last-of-type::after {
  content: "";
}

.montemadrid-facets .facet-inline-item a {
  color: #999999;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.montemadrid-facets .facet-inline-item a:hover {
  color: #666666;
}

.montemadrid-facets .facet-inline-item .badge {
  background-color: transparent;
  color: #999999;
  font-size: 13px;
  font-weight: 400;
  font-family: 'Quicksand', sans-serif;
  padding: 0;
  margin-left: 0;
  display: inline;
  border-radius: 0;
  border: none;
}

.montemadrid-facets .facet-inline-item a:hover .badge {
  color: #666666;
}

/* Badge inline (count) - same style as text */
.montemadrid-facets .badge-inline {
  background-color: transparent;
  color: #999999;
  font-size: 13px;
  font-weight: 400;
  font-family: 'Quicksand', sans-serif;
  padding: 0;
  margin-left: 2px;
  border: none;
}

/* Expanded list (vertical, shown after clicking "más") */
.montemadrid-facets .facet-expanded-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

/* Remove default styling from list items */
.montemadrid-facets .facet-expanded-list li.facet {
  margin: 0;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.5;
  border: none;
  background: none;
}

.montemadrid-facets .facet-expanded-list .top-facet-inner {
  background: none;
  border: none;
  padding: 0;
}

/* Links in expanded list - same gray style as inline */
.montemadrid-facets .facet-expanded-list a {
  color: #999999;
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
}

.montemadrid-facets .facet-expanded-list a:hover {
  color: #666666;
  text-decoration: none;
}

/* Badges in expanded list - same style as text */
.montemadrid-facets .facet-expanded-list .badge {
  background-color: transparent !important;
  color: #999999 !important;
  font-size: 13px;
  font-weight: 400;
  font-family: 'Quicksand', sans-serif;
  padding: 0 !important;
  margin-left: 4px;
  display: inline;
  border-radius: 0;
  border: none;
}

/* "más ..." and "menos ..." buttons - inline style */
.montemadrid-facets .show_more_inline,
.montemadrid-facets .show_less_inline {
  display: inline;
  padding: 0 4px;
  font-size: 12px;
  color: #999999;
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  font-style: italic;
}

.montemadrid-facets .show_more_inline:hover,
.montemadrid-facets .show_less_inline:hover {
  color: #666666;
}

/* Hidden facet items (.narrowList.offscreen) */
.montemadrid-facets .narrowList.offscreen {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Active/Selected facet items */
.montemadrid-facets .its_item a.active,
.montemadrid-facets .its_item a[data-selected="true"] {
  color: #333333;
  font-weight: 600;
}

/* Exclude button styling */
.montemadrid-facets .exclude {
  color: #dc3545;
  font-size: 12px;
  margin-left: 8px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.montemadrid-facets .exclude:hover {
  opacity: 1;
}

/* ==========================================
   TOP FACETS - Horizontal Display (Montemadrid)
   Matching bibliotecas.montemadrid.es style
   ========================================== */

.well.well-small {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.well .authorbox {
  /* margin-bottom: 15px; */
}

.well .authorbox:last-child {
  margin-bottom: 0;
}

.well .d-inline-flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.well h5 {
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  white-space: nowrap;
}

.well .wrapper-eformat {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.well .wrapper-eformat li {
  display: inline-block;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.well .wrapper-eformat li::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background-color: #d0d0d0;
  margin: 0 8px;
  vertical-align: middle;
}

.well .wrapper-eformat li:last-child::after {
  display: none;
}

.well .wrapper-eformat a {
  color: #666666;
  text-decoration: none;
  font-size: 13.33px;
  transition: color 0.2s ease;
}

.well .wrapper-eformat a:hover {
  color: #333333;
  text-decoration: underline;
}

/* Modal styling for top facets - matching bibliotecas.montemadrid.es */
.well .modal-header h4 {
  font-size: 18px;
  font-weight: 600;
  color: #333333;
  margin: 0;
}

.well .modal-header .btn-close {
  background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.25rem;
  width: 1em;
  height: 1em;
  opacity: 0.5;
  padding: 0.25rem;
}

.well .modal-header .btn-close:hover {
  opacity: 0.75;
}

.well .modal-header .btn-close:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(68, 68, 68, 0.25);
  opacity: 1;
}

.well .modal-body {
  padding: 20px;
}

.well .modal-body .row > div {
  padding: 8px 15px;
}

.well .modal-body a {
  color: #666666;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.well .modal-body a:hover {
  color: #333333;
  text-decoration: underline;
}

/* Modal grid - 3 columns on medium+ screens */
@media (min-width: 992px) {
    .col-md-3 {
        flex: 0 0 auto;
        width: 33%;
    }
}

/* ==========================================
   SEARCH HEADER FULLWIDTH - Montemadrid
   ========================================== */

.search-header-fullwidth {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.search-header-fullwidth .search-stats {
  font-size: 14px;
  color: #666666;
  flex: 0 0 auto;
  text-align: left;
}

.search-header-fullwidth .search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.search-header-fullwidth .search-controls > * {
  margin: 0;
}

.search-header-fullwidth .search-controls select,
.search-header-fullwidth .search-controls .btn {
  font-size: 13px;
  padding: 6px 12px;
}

.search-header-fullwidth .search-controls label {
  font-size: 13px;
  color: #666666;
  margin-right: 5px;
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-header-fullwidth {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .search-header-fullwidth .search-controls {
    width: 100%;
    justify-content: flex-start;
  }
}

.facet-group .list-group-item a:hover {
  color: #333333;
  text-decoration: underline;
}

/* Facet Count - same style as text */
.facet-group .badge {
  background: none !important;
  color: #999999 !important;
  font-weight: 400 !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 13px !important;
  padding: 0 !important;
  margin-left: 8px !important;
  border: none !important;
}

.facet-group .list-group-item:hover .badge {
  color: #666666;
}

/* "more..." button */
.facet-group .more-facets,
.facet-group .show-all {
  background: none;
  border: none;
  color: #666666;
  font-size: 14px;
  padding: 6px 0;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
  transition: color 0.2s ease;
}

.facet-group .more-facets:hover,
.facet-group .show-all:hover {
  color: #333333;
  text-decoration: underline;
}

/* Applied Filters */
.active-filters {
  margin-bottom: 20px;
}

.active-filters .filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background-color: #f0f0f0;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 14px;
  color: #333333;
  margin: 4px 4px 4px 0;
}

.active-filters .filter a {
  color: #666666;
  text-decoration: none;
  font-size: 16px;
  line-height: 1;
}

.active-filters .filter a:hover {
  color: #333333;
}

/* Checkbox Filters */
.checkbox-filters {
  margin-bottom: 20px;
}

.checkbox-filters .checkbox {
  margin: 8px 0;
}

.checkbox-filters label {
  font-size: 14px;
  color: #666666;
  font-weight: normal;
  cursor: pointer;
}

.checkbox-filters input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

/* Hierarchical Facets */
.facet-group .jstree {
  font-size: 14px;
}

.facet-group .jstree a {
  color: #666666 !important;
}

.facet-group .jstree a:hover {
  color: #333333 !important;
  text-decoration: underline;
}

/* Remove Bootstrap styling overrides */
.facet-group .list-group-item.active {
  background-color: #f0f0f0;
  border-color: #d0d0d0;
  color: #333333;
}

.facet-group .list-group-item.active a {
  color: #333333;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .facet-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }

  .facet-group .facet-title button {
    font-size: 15px;
  }

  .facet-group .list-group-item {
    font-size: 13px;
    padding: 5px 0;
  }
}

/* ========================================
   Montemadrid Search Results - Item Styling
   EXACT match to bibliotecas.montemadrid.es
   ======================================== */

/* Main result item container - NO borders, just divider lines between items */
.item#result,
.item#result.alt {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  color: #333333;
  line-height: 20px;
  background: #ffffff;
  border: none !important;
  border-bottom: 1px solid #e5e5e5 !important;
  border-radius: 0 !important;
  padding: 20px 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: auto !important;
  overflow: visible;
  box-sizing: border-box !important;
  display: block !important;
}

.item#result:first-child {
  border-top: 1px solid #e5e5e5 !important;
}

.item#result:hover,
.item#result.alt:hover {
  box-shadow: none !important;
  background: #fafafa;
}

/* Row container */
.item#result .row {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
}

/* Image column - exact width like reference */
.item#result .media-object {
  flex: 0 0 auto;
  width: 120px;
  max-width: 120px;
  padding-right: 20px;
  padding-left: 0;
}

.item#result .media-object a {
  display: block;
}

.item#result .wrapper-book-img {
  position: relative;
  width: 100%;
}

.item#result .wrapper-book-img img,
.item#result .img-book,
.item#result .media-object img {
  width: 100%;
  max-width: 113px;
  height: auto;
  border: none;
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Details column - takes remaining space */
.item#result .media-body.item-details {
  flex: 1;
  min-width: 0;
  padding-right: 20px;
}

/* Title line - EXACT match: Quicksand, 17.33px, weight 500, #444444 */
.item#result .resultItemLine1 {
  margin-bottom: 2px;
}

.item#result .resultItemLine1 h5 {
  font-family: 'Quicksand', sans-serif;
  font-size: 17.33px;
  font-weight: 500;
  color: #444444;
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

.item#result .resultItemLine1 h5 a.title {
  font-family: 'Quicksand', sans-serif;
  font-size: 17.33px;
  font-weight: 500;
  color: #444444;
  text-decoration: none;
}

.item#result .resultItemLine1 h5 a.title:hover {
  color: #666666;
  text-decoration: underline;
}

.item#result .title-alt {
  font-size: 14px;
  color: #666666;
  font-weight: 400;
  margin-top: 2px;
}

/* Author line - EXACT match: "por" + author link */
.item#result .resultItemLine2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 14.67px;
  font-weight: 400;
  color: #212529;
  line-height: 1.5;
  margin-bottom: 5px;
}

.item#result .resultItemLine2 a {
  color: #212529;
  text-decoration: none;
}

.item#result .resultItemLine2 a:hover {
  color: #666666;
  text-decoration: underline;
}

/* Format line - icon + text like "LIBRO" or "VIDEO" */
.item#result .resultItemLine3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  color: #333333;
  line-height: 1.5;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}

.item#result .resultItemLine3 .format-badge {
  display: inline-flex;
  align-items: center;
}

.item#result .resultItemLine3 .icono-ebook {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
}

/* Ionicons base styling - ensure font family is applied */
.icono-ebook i[class*="ion-"] {
  font-family: "Ionicons" !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  text-rendering: auto;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
}

.item#result .resultItemLine3 .icono-ebook i,
.item#result .resultItemLine3 .icono-ebook .icon {
  font-size: 18px;
  color: #666666;
  line-height: 1;
}

/* Editorial line - publisher + year */
.item#result .book-editorial {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  color: #333333;
  line-height: 1.5;
  margin-bottom: 0;
}

.item#result .book-editorial .editorial {
  display: inline;
}

.item#result .book-editorial .editorial a {
  color: #333333;
  text-decoration: none;
}

.item#result .book-editorial .editorial a:hover {
  color: #666666;
  text-decoration: underline;
}

.item#result .book-editorial .book-year {
  color: #333333;
  margin-left: 0;
}

/* ISBN line - bold label + number */
.item#result .book-isbn {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  color: #333333;
  line-height: 1.5;
  margin-bottom: 0;
}

.item#result .book-isbn strong {
  font-weight: 700;
  margin-right: 3px;
}

/* Versions link */
.item#result .ajax_versions {
  font-size: 13px;
  color: #999999;
  margin-top: 5px;
}

/* AJAX availability */
.item#result .callnumAndLocation {
  font-size: 13px;
  color: #666666;
  margin-top: 8px;
}

/* Actions column - "AGREGAR A FAVORITOS" on the right */
.item#result .media-options {
  flex: 0 0 auto;
  width: auto;
  min-width: 180px;
  text-align: right;
  padding-left: 15px;
}

.item#result .wrapper-actions-search {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.item#result .actionListRecord a.fav {
  display: inline-flex !important;
  align-items: center !important;
  font-family: 'Quicksand', sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #333333 !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap;
  background: transparent !important;
  border: none !important;
  padding: 5px 0 !important;
}

.item#result .actionListRecord a.fav:hover {
  color: #666666 !important;
  text-decoration: none !important;
}

.item#result .actionListRecord a.fav i,
.item#result .actionListRecord a.fav svg {
  margin-right: 6px !important;
  font-size: 14px !important;
  width: auto !important;
  height: auto !important;
}

.item#result .actionListRecord a.fav span {
  display: inline !important;
}

/* Loading indicator */
.item#result .ajax_content img {
  width: 16px;
  height: 16px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .item#result .media-options {
    min-width: 150px;
  }
}

@media (max-width: 767px) {
  .item#result .row {
    flex-wrap: wrap;
  }

  .item#result .media-object {
    width: 80px;
    max-width: 80px;
    padding-right: 15px;
  }

  .item#result .media-body.item-details {
    flex: 1;
    min-width: 0;
  }

  .item#result .media-options {
    width: 100%;
    min-width: auto;
    text-align: left;
    margin-top: 10px;
    padding-left: 0;
  }

  .item#result .wrapper-actions-search {
    align-items: flex-start;
  }
}

@media (max-width: 575px) {
  .item#result .media-object {
    width: 70px;
    max-width: 70px;
  }

  .item#result .resultItemLine1 h5,
  .item#result .resultItemLine1 h5 a.title {
    font-size: 15px;
  }

  .item#result .resultItemLine2 {
    font-size: 13px;
  }
}

/* ========================================
   Sidebar Accordion Facets - Gray Style
   Match TopFacets inline style for consistency
   ======================================== */

/* All sidebar facets (not top facets) */
.sidebar .facet__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .facet__list__item {
  margin: 0;
  padding: 4px 0;
  border: none;
  background: none;
}

.sidebar .facet__list__item .facet {
  color: #999999;
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar .facet__list__item .facet a {
  color: #999999;
  text-decoration: none;
  transition: color 0.2s ease;
  flex: 1;
}

.sidebar .facet__list__item .facet a:hover {
  color: #666666;
  text-decoration: none;
}

/* Badge/count in sidebar facets - same style as text */
.sidebar .facet__list__item .facet .badge,
.sidebar .facet__list__item .facet .facet__count {
  background-color: transparent !important;
  color: #999999 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  font-family: 'Quicksand', sans-serif !important;
  padding: 0 !important;
  margin-left: 5px !important;
  border-radius: 0 !important;
  border: none !important;
  display: inline !important;
}

.sidebar .facet__list__item .facet a:hover + .badge,
.sidebar .facet__list__item .facet a:hover ~ .facet__count {
  color: #666666 !important;
}

/* Remove any default Bootstrap styling */
.sidebar .facet__list__item .facet {
  border: none !important;
  background: none !important;
  padding: 0 !important;
}

/* ========================================
   Result List Container - Full Width
   ======================================== */

/* Container for all results */
.record-list {
  width: 100%;
  max-width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Individual result container */
.result-container {
  width: 100%;
  margin-bottom: 0; /* Remove gap, let item handle it */
}

/* Hide record numbers if any CSS adds them */
.record-number {
  display: none !important;
}

/* Override any ol/li numbering that might appear */
ol.record-list {
  list-style: none;
  counter-reset: none;
}

ol.record-list > li::before {
  display: none !important;
  content: none !important;
}

/* Ensure items are full width */
.record-list .item#result,
.record-list .item#result.alt {
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
}

/* Consistent border for all items */
.item#result,
.item#result.alt,
.result-container .item {
  border: 1px solid #e0e0e0 !important;
}

/* ========================================
   Three Column Layout for Result Items
   Column 1: Image (2 cols)
   Column 2: Title and data (8 cols)
   Column 3: Favorites button (2 cols)
   ======================================== */

/* Row alignment */
.item .row.align-items-center {
  align-items: center;
  display: flex;
}

/* Column 1: Image - keep compact */
.item .media-object {
  padding-right: 10px;
}

/* Column 2: Title and data - expanded */
.item .media-body.item-details {
  padding-right: 15px;
  padding-left: 10px;
}

/* Column 3: Actions - compact and centered */
.item .media-options {
  padding-left: 10px;
  padding-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item .wrapper-actions-search {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Favorites button - REMOVED DUPLICATE STYLES (conflicting with main definition at line 2805) */
/* These styles were causing inconsistencies between cards */
/* All button styles are now unified in the main definition above */

/* Responsive: on mobile stack normally */
@media (max-width: 767px) {
  .item .media-object {
    order: 1;
  }
  
  .item .media-body.item-details {
    order: 2;
    padding-top: 10px;
  }
  
  .item .media-options {
    order: 3;
    padding-top: 10px;
    justify-content: flex-start;
  }
  
  .item .actionListRecord a.fav {
    flex-direction: row !important;
    justify-content: flex-start !important;
  }

  .item .actionListRecord a.fav svg,
  .item .actionListRecord a.fav .icon {
    margin-right: 8px !important;
    margin-bottom: 0 !important;
  }

  .item .actionListRecord a.fav span {
    font-size: 14px !important;
  }
}

/* ========================================
   Force Single Row Layout - No Wrapping
   ======================================== */

/* Force row to stay in one line */
.item .row.align-items-center {
  flex-wrap: nowrap !important;
  display: flex;
  align-items: center;
}

/* Ensure columns don't stack on any screen size */
.item .media-object,
.item .media-body.item-details,
.item .media-options {
  flex-shrink: 0; /* Don't shrink columns */
}

/* Override responsive stacking on mobile */
@media (max-width: 767px) {
  .item .row.align-items-center {
    flex-wrap: nowrap !important;
  }
  
  .item .media-object {
    order: 1;
    max-width: 80px; /* Smaller image on mobile */
  }
  
  .item .media-body.item-details {
    order: 2;
    flex: 1; /* Take remaining space */
    padding-top: 0;
  }
  
  .item .media-options {
    order: 3;
    max-width: 60px; /* Compact button on mobile */
    padding-top: 0;
  }
  
  /* Simplify button on mobile - icon only */
  .item .actionListRecord a.fav span.d-none.d-sm-inline {
    display: none !important;
  }

  .item .actionListRecord a.fav {
    padding: 0 !important;
    background-color: transparent !important;
  }

  .item .actionListRecord a.fav svg,
  .item .actionListRecord a.fav .icon {
    margin: 0;
    width: 20px;
    height: 20px;
  }
}

/* Extra small screens - even more compact */
@media (max-width: 575px) {
  .item .media-object {
    max-width: 60px;
  }
  
  .item .media-options {
    max-width: 50px;
  }
  
  .item .resultItemLine1 h5 {
    font-size: 16px;
  }

  .item .resultItemLine2,
  .item .resultItemLine3,
  .item .book-editorial,
  .item .book-isbn {
    font-size: 12px;
  }
}

/* ========================================
   Force Fixed Height - Override All
   ======================================== */

/* Ensure all item variations have fixed height */
.result-container .item,
.result-container .item#result,
.result-container .item#result.alt,
div.item#result,
div.item#result.alt {
  height: auto !important;
  min-height: 200px !important;
  margin-bottom: 15px !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* Inner containers must respect height */
.item .recordId {
  height: 100%;
  overflow: hidden;
}

.item .recordId > .row {
  height: 100%;
  max-height: 100%;
}

/* Ensure consistent spacing between result containers */
.result-container {
  margin-bottom: 0 !important;
}

/* ========================================
   Fix Favorites Button Visibility
   ======================================== */

/* Ensure actions column is visible and centered */
.item .media-options {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100%;
}

.item .wrapper-actions-search {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 100%;
}

/* Compact favorites button */
.item .actionListRecord {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ========================================
   Fixed Width for Cover Image Column
   ======================================== */

/* Force fixed width for image column */
.item .media-object {
  width: 120px !important;
  min-width: 120px !important;
  max-width: 120px !important;
  flex: 0 0 120px !important;
  padding-right: 15px;
}

/* Image container - no size limits */
.item .wrapper-book-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.item .img-book,
.item .wrapper-book-img img {
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Adjust other columns to compensate */
.item .media-body.item-details {
  flex: 1 !important;
  min-width: 0; /* Allow text truncation */
  padding-left: 10px;
  padding-right: 15px;
}

.item .media-options {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  flex: 0 0 100px !important;
  padding-left: 10px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .item .media-object {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    flex: 0 0 80px !important;
  }
  
  .item .wrapper-book-img {
    height: 100px;
  }
  
  .item .img-book,
  .item .wrapper-book-img img {
    max-height: 100px;
  }
  
  .item .media-options {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    flex: 0 0 60px !important;
  }
}

@media (max-width: 575px) {
  .item .media-object {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    flex: 0 0 60px !important;
  }
  
  .item .wrapper-book-img {
    height: 80px;
  }
  
  .item .img-book,
  .item .wrapper-book-img img {
    max-height: 80px;
  }
  
  .item .media-options {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    flex: 0 0 50px !important;
  }
}
/* ========================================
   Column Proportions: 25% - 50% - 25%
   ======================================== */

/* Override previous fixed widths */
.item .media-object {
  width: 25% !important;
  min-width: 25% !important;
  max-width: 25% !important;
  flex: 0 0 25% !important;
  padding-right: 15px;
}

.item .media-body.item-details {
  width: 50% !important;
  min-width: 50% !important;
  max-width: 50% !important;
  flex: 0 0 50% !important;
  padding-left: 10px;
  padding-right: 15px;
}

.item .media-options {
  width: 25% !important;
  min-width: 25% !important;
  max-width: 25% !important;
  flex: 0 0 25% !important;
  padding-left: 10px;
}

/* Keep image sizing proportional - no limits */
.item .wrapper-book-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.item .img-book,
.item .wrapper-book-img img {
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Responsive: maintain proportions on smaller screens */
@media (max-width: 767px) {
  .item .media-object {
    width: 25% !important;
    flex: 0 0 25% !important;
  }
  
  .item .media-body.item-details {
    width: 50% !important;
    flex: 0 0 50% !important;
  }
  
  .item .media-options {
    width: 25% !important;
    flex: 0 0 25% !important;
  }
  
  .item .wrapper-book-img {
    height: 120px;
  }

  .item .img-book,
  .item .wrapper-book-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

@media (max-width: 575px) {
  .item .wrapper-book-img {
    height: 100px;
  }

  .item .img-book,
  .item .wrapper-book-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* ========================================
   Fixed Alignment - All Images and Buttons Same Position
   ======================================== */

/* Force exact alignment for all rows */
.item .row.align-items-center {
  align-items: flex-start !important;
}

/* Image column - centered both vertically and horizontally */
.item .media-object {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important; /* Override row's flex-start */
}

.item .media-object a {
  display: block;
  width: 100%;
  height: auto;
}

.item .wrapper-book-img {
  width: 100% !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible;
}

.item .img-book,
.item .wrapper-book-img img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain;
  display: block;
}

/* Details column - consistent padding */
.item .media-body.item-details {
  padding-left: 15px !important;
  padding-right: 15px !important;
}

/* Actions column - centered both vertically and horizontally */
.item .media-options {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important; /* Override row's flex-start */
}

.item .wrapper-actions-search {
  width: 100%; /* Full width of column */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.item .actionListRecord {
  width: 100%;
  display: flex !important;
  justify-content: center !important;
}

/* Button styles moved to main definition at line 2805 to avoid conflicts */

/* Remove any variable spacing */
.item .media-object,
.item .media-body.item-details,
.item .media-options {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Responsive: maintain fixed sizes on mobile */
@media (max-width: 767px) {
  .item .media-object a {
    width: 70px;
    height: 100px;
  }
  
  .item .wrapper-book-img {
    width: 70px !important;
    height: 100px !important;
  }
  
  .item .img-book,
  .item .wrapper-book-img img {
    max-width: 70px !important;
    max-height: 100px !important;
  }
  
  .item .actionListRecord a.fav {
    width: 100px !important;
  }
}

@media (max-width: 575px) {
  .item .media-object a {
    width: 50px;
    height: 80px;
  }
  
  .item .wrapper-book-img {
    width: 50px !important;
    height: 80px !important;
  }
  
  .item .img-book,
  .item .wrapper-book-img img {
    max-width: 50px !important;
    max-height: 80px !important;
  }
  
  .item .actionListRecord a.fav {
    width: 40px !important;
  }
}

/* ========================================
   Fix Image Structure - No Nested Links
   ======================================== */

/* Wrapper contains the link directly */
.item .media-object .wrapper-book-img {
  width: 100px !important;
  height: 150px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
  margin: 0 auto;
}

/* Links inside wrapper */
.item .media-object .wrapper-book-img a,
.item .media-object > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Images inside wrapper or link */
.item .media-object .wrapper-book-img img,
.item .media-object .wrapper-book-img a img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* recordcover class (VuFind default) - no size limits */
.item .media-object .recordcover {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain;
}

/* Remove old a styles that caused issues */
.item .media-object a.title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Responsive adjustments - no size limits */
@media (max-width: 767px) {
  .item .media-object .wrapper-book-img {
    width: auto !important;
    height: auto !important;
    max-width: 70px !important;
  }

  .item .media-object .wrapper-book-img img,
  .item .media-object .wrapper-book-img a img,
  .item .media-object .recordcover {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain;
  }
}

@media (max-width: 575px) {
  .item .media-object .wrapper-book-img {
    width: auto !important;
    height: auto !important;
    max-width: 50px !important;
  }

  .item .media-object .wrapper-book-img img,
  .item .media-object .wrapper-book-img a img,
  .item .media-object .recordcover {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain;
  }
}

/* ========================================
   Pagination Styles - Gray Theme
   ======================================== */

/* Pager container - override parent theme */
.pager {
  display: flex;
  flex-wrap: wrap;
  column-gap: .25rem;
  row-gap: 10px;
  align-items: center;
  justify-content: left;
}

/* Bottom pagination - centered */
.pagination-bottom-wrapper .pager {
  justify-content: center;
}

/* Pagination container */
.pagination {
  margin: 20px 0;
}

/* Page links */
.pagination .page-link {
  background-color: #444444 !important;
  color: #ffffff !important;
  border: 1px solid #444444 !important;
  padding: 8px 12px;
  font-size: 14px;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.pagination .page-link:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

.pagination .page-link:focus {
  box-shadow: 0 0 0 0.2rem rgba(68, 68, 68, 0.25) !important;
  outline: none;
}

/* Active page */
.pagination .page-item.active .page-link {
  background-color: #222222 !important;
  border-color: #222222 !important;
  color: #ffffff !important;
  font-weight: 600;
}

/* Disabled page */
.pagination .page-item.disabled .page-link {
  background-color: #666666 !important;
  border-color: #666666 !important;
  color: #999999 !important;
  cursor: not-allowed;
}

/* First, previous, next, last buttons */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
  background-color: #444444 !important;
  border-color: #444444 !important;
}

.pagination .page-item:first-child .page-link:hover,
.pagination .page-item:last-child .page-link:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
}

/* Search tools - aligned with pagination */
.searchtools {
  margin: 10px 0 0 0 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  clear: both;
}

.searchtools h2 {
  display: none !important;
}

.searchtools ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 15px !important;
}

.searchtools ul li {
  display: inline-block !important;
  margin: 0 !important;
}

.searchtools .icon-link,
.searchtools a {
  color: #666666 !important;
  text-decoration: none !important;
  font-size: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: color 0.2s ease !important;
}

.searchtools .icon-link:hover,
.searchtools a:hover {
  color: #333333 !important;
  text-decoration: underline !important;
}

.searchtools .icon-link__icon,
.searchtools i {
  font-size: 16px !important;
}

.searchtools .icon-link__label {
  display: inline !important;
}

/* ========================================
   Individual Record Page Styles
   ======================================== */

/* Record page container - ensure sidebar on right */
.record {
  display: flex;
  flex-direction: row;
  gap: 30px;
}

.record > div[class*="mainbody"] {
  flex: 1;
  order: 1;
}

.record > aside[class*="sidebar"] {
  flex: 0 0 300px;
  order: 2;
}

/* Record core layout - Bootstrap grid */
.record-core.row {
  margin-bottom: 30px;
  padding: 20px 0;
}

/* Left column: Cover image and extras - responsive with Bootstrap grid */
.record-image-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.record-cover-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.record-cover-wrapper img {
  width: 189px;
  max-width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Rating stars */
.info-single-book .contenedor-stars {
  width: 100%;
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 10px;
}

.info-single-book .star-rating {
  display: inline-flex;
  gap: 3px;
  font-size: 18px;
}

.info-single-book .star-rating a {
  color: #ffa500;
  text-decoration: none;
}

.info-single-book .star-rating a:hover {
  color: #ff8c00;
}

/* Social sharing */
.info-single-book .rrss {
  width: 100%;
  text-align: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 10px;
}

.info-single-book .addthis_sharing_toolbox {
  display: flex;
  justify-content: center;
  gap: 8px;
}

/* Record navigation */
.result-navigation {
  width: 100%;
  padding: 15px;
  background-color: #f8f8f8;
  border-radius: 4px;
  margin-top: 10px;
}

.navigation-position {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #555555;
  margin-bottom: 12px;
}

.navigation-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.navigation-controls-left,
.navigation-controls-right {
  flex: 1;
}

.navigation-controls-left {
  text-align: left;
}

.navigation-controls-right {
  text-align: right;
}

.navigation-controls a {
  font-size: 13px;
  color: #444444;
  text-decoration: none;
  transition: color 0.2s ease;
}

.navigation-controls a:not(.disabled-anchor):hover {
  color: #222222;
  text-decoration: underline;
}

.navigation-controls a.disabled-anchor {
  color: #cccccc;
  cursor: not-allowed;
}

.navigation-controls span {
  display: inline;
}

.clearfix {
  clear: both;
}

/* Right column: Metadata */
.record-info-column {
  flex: 1;
  min-width: 0;
}

/* Wrapper book content */
.wrapper-book-content {
  padding: 0;
}

.wrapper-book-content header {
  margin-bottom: 20px;
}

/* Book title - EXACT match to bibliotecas.montemadrid.es */
.book-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 26.67px;
  font-weight: 500;
  color: #333333;
  margin: 0 0 8px 0;
  line-height: 45.33px;
}

/* Book author - EXACT match */
.book-author {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  color: #333333;
  margin: 0 0 8px 0;
}

.book-author a {
  font-family: 'Quicksand', sans-serif;
  color: #444444;
  text-decoration: none;
}

.book-author a:hover {
  color: #666666;
  text-decoration: underline;
}

/* Title format with icon - EXACT match */
.title-format {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  color: #333333;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: none;
}

.title-format .icono-ebook {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.title-format .icono-ebook i,
.title-format .icono-ebook .icon {
  font-size: 18px;
  color: #333333;
  line-height: 1;
}

/* Book detail rows - EXACT match */
.book-detail-div {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 400;
  color: #333333;
  margin-bottom: 6px;
  line-height: 1.5;
}

.book-detail-label {
  font-weight: 400;
  color: #333333;
}

.book-detail-div a {
  color: #444444;
  text-decoration: none;
}

.book-detail-div a:hover {
  color: #666666;
  text-decoration: underline;
}

.book-detail-div .isbn {
  color: #333333;
  font-weight: 600;
}

.biblio-data-oclc a {
  color: #0066cc;
}

.biblio-data-oclc a:hover {
  color: #004499;
  text-decoration: underline;
}

.title-alt {
  font-size: 16px;
  color: #666666;
  margin-bottom: 10px;
  font-style: italic;
}

/* ========================================
   Record Tabs Styles - EXACT match to bibliotecas.montemadrid.es
   ======================================== */

.record-tabs {
  margin-top: 20px;
}

.record-tabs .nav-tabs {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
}

.record-tabs .nav-tabs li,
.record-tabs .nav-tabs .record-tab {
  margin-bottom: 0;
}

.record-tabs .nav-tabs a,
.record-tabs .nav-tabs .nav-link {
  font-family: 'Quicksand', sans-serif;
  color: #333333;
  font-size: 13.33px;
  font-weight: 400;
  padding: 8px 16px;
  border: none;
  border-radius: 4px 4px 0 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.record-tabs .nav-tabs a:hover,
.record-tabs .nav-tabs .nav-link:hover {
  color: #333333;
  border-bottom-color: #d1d1d1;
  background: transparent;
}

.record-tabs .nav-tabs .active a,
.record-tabs .nav-tabs a.active,
.record-tabs .nav-tabs .nav-link.active,
.record-tabs .nav-tabs .initiallyActive a,
.record-tabs .nav-tabs .initiallyActive .nav-link {
  color: #333333;
  font-weight: 400;
  border-bottom: 2px solid #a9a9a9;
  background: transparent;
}

.record-tabs .tab-content {
  padding: 0;
  background-color: #ffffff;
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
}

/* Holdings table in tabs */
.record-tabs table {
  width: 100%;
  margin-bottom: 20px;
}

.record-tabs table th {
  background-color: #f5f5f5;
  color: #444444;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 15px;
  border-bottom: 2px solid #e0e0e0;
}

.record-tabs table td {
  color: #555555;
  font-size: 14px;
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
}

.record-tabs table tr:last-child td {
  border-bottom: none;
}

/* Online Resources Button */
.btn-online-resource {
  display: inline-block;
  padding: 8px 16px;
  background-color: #444444;
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 4px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
}

.btn-online-resource:hover {
  background-color: #333333;
  color: #ffffff !important;
  text-decoration: none !important;
}

.btn-online-resource:active {
  background-color: #222222;
}

/* ========================================
   Record Sidebar Styles - EXACT match to bibliotecas.montemadrid.es
   ======================================== */

.wrapper-extra-info {
  padding-left: 20px;
}

.wrapper-extra-info .book-subject,
.wrapper-extra-info .book-languages {
  margin-bottom: 25px;
}

/* Sidebar headings - EXACT match: uppercase, 13.33px, weight 600 */
.wrapper-extra-info h5 {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 600;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: normal;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}

.wrapper-extra-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wrapper-extra-info ul li {
  margin-bottom: 8px;
  padding-left: 0;
}

/* Subjects list - one per row, full width */
.wrapper-extra-info .book-subject ul {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

/* Subject badge pill - full width, one per row */
.wrapper-extra-info .book-subject ul li {
  display: block !important;
  width: 100% !important;
  margin-bottom: 0 !important;
  padding: 5px 12px !important;
  border: 1px solid #909cad !important;
  border-radius: 30px !important;
  background: transparent !important;
  text-align: center !important;
}

/* Subject link - EXACT match: 10.67px, weight 500, color #909cad */
.wrapper-extra-info .subjectHeading {
  font-family: 'Quicksand', sans-serif;
  font-size: 10.67px;
  font-weight: 500;
  color: #909cad;
  text-decoration: none;
  display: block;
  padding: 0;
  transition: color 0.2s ease;
}

.wrapper-extra-info .subjectHeading:hover {
  color: #666666;
  text-decoration: none;
}

/* Language list - EXACT match */
.wrapper-extra-info .book-languages li {
  font-family: 'Quicksand', sans-serif;
  color: #333333;
  font-size: 13.33px;
  font-weight: 400;
}

/* ========================================
   Similar Items Grid (No Carousel)
   ======================================== */

.similar-items-section {
  margin: 30px 0;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  width: 100%;
}

.similar-items-header {
  margin-bottom: 20px;
}

.similar-items-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 21.33px;
  font-weight: 500;
  color: #555555;
  margin: 0;
}

/* Grid layout for 5 items */
.similar-items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
}

/* Similar item card */
.similar-item {
  flex: 0 0 calc(20% - 16px);
  max-width: calc(20% - 16px);
  min-width: 160px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.similar-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.similar-item-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.similar-item-link:hover {
  text-decoration: none;
  color: inherit;
}

/* Cover image - LARGER than carousel version */
.similar-item-cover {
  position: relative;
  width: 100%;
  height: 280px;
  background-color: #f5f5f5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.similar-item-cover img {
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

/* Item info section */
.similar-item-info {
  padding: 12px;
  background: #ffffff;
}

.similar-item-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #333333;
  margin: 0 0 6px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.similar-item-author {
  font-family: 'Quicksand', sans-serif;
  font-size: 12px;
  color: #666666;
  margin: 0 0 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-item-format {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Quicksand', sans-serif;
  font-size: 11px;
  color: #888888;
}

.similar-item-format i {
  font-size: 14px;
  color: #666666;
}

.similar-item-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-items-empty {
  padding: 40px 20px;
  text-align: center;
  color: #999999;
  border-top: 1px solid #e0e0e0;
  margin-top: 30px;
}

/* Responsive adjustments for similar items grid */
@media (max-width: 1200px) {
  .similar-item {
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
  }

  .similar-item-cover,
  .similar-item-cover img {
    height: 260px;
    min-height: 260px;
    max-height: 260px;
  }
}

@media (max-width: 991px) {
  .similar-item {
    flex: 0 0 calc(33.33% - 14px);
    max-width: calc(33.33% - 14px);
  }

  .similar-item-cover,
  .similar-item-cover img {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }
}

@media (max-width: 767px) {
  .similar-items-grid {
    gap: 15px;
  }

  .similar-item {
    flex: 0 0 calc(50% - 8px);
    max-width: calc(50% - 8px);
    min-width: 140px;
  }

  .similar-item-cover,
  .similar-item-cover img {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }

  .similar-item-title {
    font-size: 13px;
    min-height: 34px;
  }
}

@media (max-width: 480px) {
  .similar-item {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .similar-item-cover,
  .similar-item-cover img {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }
}

/* ========================================
   Responsive: Mobile adjustments
   ======================================== */

@media (max-width: 991px) {
  /* Stack mainbody and sidebar vertically on tablets and mobile */
  .record {
    flex-direction: column;
  }

  .record > aside[class*="sidebar"] {
    flex: 0 0 auto;
    width: 100%;
    order: 2; /* Sidebar below content */
  }
}

@media (max-width: 767px) {
  .record-core.row {
    margin-bottom: 20px;
  }

  .record-image-column {
    max-width: 100%;
    align-items: center;
  }

  .book-title {
    font-size: 22px;
  }

  .book-author {
    font-size: 15px;
  }

  .title-format {
    font-size: 14px;
  }

  .book-detail-div {
    font-size: 13px;
  }

  .book-detail-label {
    display: block;
    margin-bottom: 2px;
  }

  .wrapper-extra-info {
    padding-left: 0;
    margin-top: 30px;
  }

  .similar-item {
    flex: 0 0 140px;
    min-width: 140px;
  }
}

/* ========================================
   Holdings Tabs (Monte Madrid Style)
   ======================================== */

.book-content {
  margin-top: 20px;
}

/* Holdings Tabs Navigation */
.holdings-tabs {
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 0;
}

.holdings-tabs .nav-item {
  margin-bottom: 0;
}

.holdings-tabs .nav-link {
  color: #666666;
  background-color: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0;
}

.holdings-tabs .nav-link:hover {
  color: #444444;
  background-color: #f8f8f8;
  border-bottom-color: #d1d1d1;
}

.holdings-tabs .nav-link.active {
  color: #333333;
  background-color: #ffffff;
  border-bottom-color: #444444;
  font-weight: 600;
}

/* Tab Content */
.holdings-tab-content {
  background-color: #ffffff;
  padding: 0;
}

.holdings-tab-content .tab-pane {
  padding: 0;
}

/* Holdings Table */
.tcart {
  margin-bottom: 0;
  border-collapse: collapse;
  width: 100%;
}

.tcart thead {
  background-color: #f5f5f5;
  border-bottom: 2px solid #e0e0e0;
}

.tcart thead th {
  padding: 12px 15px;
  font-size: 13px;
  font-weight: 600;
  color: #444444;
  text-align: left;
  border: none;
}

.tcart tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.tcart tbody tr:hover {
  background-color: #fafafa;
}

.tcart tbody td {
  padding: 15px;
  font-size: 13px;
  color: #555555;
  vertical-align: middle;
  border: none;
}

/* Checkbox column */
.tcart tbody td:first-child {
  text-align: center;
}

.holding-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Call number links */
.tcart a {
  color: #666666;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tcart a:hover {
  color: #333333;
  text-decoration: underline;
}

/* Status indicators */
.tcart .status-available,
.tcart .text-success {
  color: #28a745 !important;
  font-weight: 500;
}

.tcart .status-unavailable,
.tcart .text-danger {
  color: #dc3545 !important;
  font-weight: 500;
}

.tcart .status-unknown,
.tcart .text-warning {
  color: #ffc107 !important;
  font-weight: 500;
}

/* Reserve status */
.reserve-status {
  color: #ff6b6b;
  font-weight: 500;
  font-size: 12px;
}

/* Enumchron (volume/issue) */
.enumchron {
  color: #999999;
  font-size: 12px;
  margin-left: 4px;
}

/* Place hold link in table */
.placehold-link {
  color: #444444;
  font-size: 12px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.placehold-link:hover {
  color: #222222;
  text-decoration: underline;
}

/* Empty state */
.tcart .text-muted {
  color: #999999 !important;
  font-style: italic;
}

/* ============================================================================
   HOLDINGS TABLE - Exact match to bibliotecas.montemadrid.es
   ============================================================================ */

.holdings-table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.holdings-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  margin-bottom: 0;
}

.holdings-table thead {
  background-color: transparent;
}

.holdings-table thead tr {
  border-bottom: 1px solid #e0e0e0;
}

.holdings-table thead th {
  padding: 12px;
  font-weight: 700;
  color: #333333;
  text-align: left;
  border: none;
  vertical-align: middle;
}

.holdings-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
}

.holdings-table tbody tr:nth-child(odd) {
  background-color: transparent;
}

.holdings-table tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.05);
}

.holdings-table tbody td {
  padding: 12px;
  font-weight: 400;
  color: #333333;
  vertical-align: middle;
  border: none;
}

.holdings-table a {
  color: #444444;
  text-decoration: none;
}

.holdings-table a:hover {
  color: #333333;
  text-decoration: underline;
}

/* Empty state message */
.holdings-table .text-muted {
  color: #999999 !important;
  font-style: italic;
}

/* Holdings Status Cell - Status badges and Hold/Recall buttons */
.holding-status-cell {
  white-space: nowrap;
  vertical-align: middle;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 8px;
}

.status-badge.status-available {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.status-unavailable {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Due date info */
.due-date-info {
  display: block;
  font-size: 11px;
  color: #666666;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Hold and Recall buttons */
.btn-hold,
.btn-recall {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  margin-top: 5px;
}

.btn-hold {
  background-color: #444444;
  color: #ffffff !important;
  border: 1px solid #444444;
}

.btn-hold:hover {
  background-color: #333333;
  border-color: #333333;
  color: #ffffff !important;
}

.btn-recall {
  background-color: #6c757d;
  color: #ffffff !important;
  border: 1px solid #6c757d;
}

.btn-recall:hover {
  background-color: #5a6268;
  border-color: #545b62;
  color: #ffffff !important;
}

.btn-hold i,
.btn-recall i {
  font-size: 11px;
}

/* Responsive adjustments for status cell */
@media (max-width: 767px) {
  .holding-status-cell {
    white-space: normal;
  }

  .status-badge {
    display: block;
    text-align: center;
    margin-right: 0;
    margin-bottom: 5px;
  }

  .btn-hold,
  .btn-recall {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5px;
  }
}

/* Holdings Table Pagination */
.holdings-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  padding: 15px 0;
  border-top: 1px solid #e0e0e0;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background-color: #444444;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #333333;
}

.pagination-btn:disabled {
  background-color: #cccccc;
  color: #888888;
  cursor: not-allowed;
}

.pagination-btn i {
  font-size: 12px;
}

.pagination-info {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  color: #666666;
  min-width: 80px;
  text-align: center;
}

/* Responsive adjustments for holdings table */
@media (max-width: 767px) {
  .holdings-table-wrapper {
    margin: 0 -15px;
    padding: 0 15px;
  }

  .holdings-pagination {
    gap: 10px;
    padding: 12px 0;
  }

  .pagination-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .pagination-info {
    font-size: 12px;
    min-width: 60px;
  }

  .holdings-table thead th,
  .holdings-table tbody td {
    padding: 10px 8px;
    font-size: 12px;
  }
}

/* Responsive adjustments for holdings table */
@media (max-width: 991px) {
  .book-content.d-none.d-lg-block {
    display: block !important;
  }

  .holdings-tabs .nav-link {
    padding: 10px 15px;
    font-size: 13px;
  }

  .tcart thead th,
  .tcart tbody td {
    padding: 10px 12px;
    font-size: 12px;
  }

  .holding-checkbox {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 767px) {
  .holdings-tabs {
    overflow-x: auto;
    white-space: nowrap;
  }

  .holdings-tabs .nav-link {
    padding: 8px 12px;
    font-size: 12px;
  }

  .tcart {
    font-size: 11px;
  }

  .tcart thead th,
  .tcart tbody td {
    padding: 8px 10px;
  }

  /* Stack table on very small screens */
  .tcart thead {
    display: none;
  }

  .tcart tbody tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
  }

  .tcart tbody td {
    display: block;
    text-align: left;
    padding: 5px 0;
    border: none;
  }

  .tcart tbody td:before {
    content: attr(data-label);
    font-weight: 600;
    color: #444444;
    margin-right: 10px;
  }

  .tcart tbody td:first-child:before {
    content: "";
    margin: 0;
  }
}

/* ========================================
   Book Actions Toolbar - EXACT match to bibliotecas.montemadrid.es
   ======================================== */

.book-actions {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e5e5e5;
}

.wrapper-bar-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.wrapper-bar-tools .bar-tool-export,
.wrapper-bar-tools .recordBarTools {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 300;
}

.wrapper-bar-tools a {
  font-family: 'Quicksand', sans-serif;
  font-size: 13.33px;
  font-weight: 300;
  color: #666666;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wrapper-bar-tools a:hover {
  color: #444444;
  text-decoration: none;
}

.wrapper-bar-tools i,
.wrapper-bar-tools svg {
  font-size: 14px;
  width: 14px;
  height: 14px;
}

/* Export dropdown */
.bar-tool-export .dropdown-toggle {
  cursor: pointer;
  text-transform: uppercase;
}

.bar-tool-export .dropdown-toggle::after {
  margin-left: 4px;
}

.bar-tool-export .dropdown-menu {
  min-width: 200px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.bar-tool-export .dropdown-item {
  font-family: 'Quicksand', sans-serif;
  padding: 8px 15px;
  color: #666666;
  font-size: 14.67px;
  text-transform: uppercase;
}

.bar-tool-export .dropdown-item:hover {
  background-color: #f5f5f5;
  color: #444444;
}

/* Responsive */
@media (max-width: 767px) {
  .wrapper-bar-tools {
    gap: 12px;
  }

  .wrapper-bar-tools a {
    font-size: 11px;
  }

  .wrapper-bar-tools i,
  .wrapper-bar-tools svg {
    font-size: 12px;
    width: 12px;
    height: 12px;
  }
}

/* ========================================
   Cookie Consent Banner Customization
   Montemadrid Theme
   ======================================== */

/* Main consent modal container */
#cc-main {
  font-family: Quicksand, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Cookie consent modal */
.cc_div #cm {
  background: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
  max-width: 600px !important;
}

/* Modal header */
.cc_div #cm .cm__header {
  padding: 24px 24px 16px !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.cc_div #cm .cm__title {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #333333 !important;
  font-family: Quicksand, sans-serif !important;
}

/* Modal body */
.cc_div #cm .cm__body {
  padding: 20px 24px !important;
  color: #555555 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

.cc_div #cm .cm__desc {
  color: #555555 !important;
  font-size: 14px !important;
}

/* Buttons */
.cc_div #cm .cm__btn {
  padding: 10px 24px !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-family: Quicksand, sans-serif !important;
  transition: all 0.2s ease !important;
  border: none !important;
  cursor: pointer !important;
}

/* Accept button */
.cc_div #cm .cm__btn.cm__btn--primary {
  background-color: #444444 !important;
  color: #ffffff !important;
}

.cc_div #cm .cm__btn.cm__btn--primary:hover {
  background-color: #333333 !important;
}

/* Secondary button */
.cc_div #cm .cm__btn.cm__btn--secondary {
  background-color: #666666 !important;
  color: #ffffff !important;
}

.cc_div #cm .cm__btn.cm__btn--secondary:hover {
  background-color: #555555 !important;
}

/* Settings button */
.cc_div #cm .cm__footer .cm__btn {
  background-color: transparent !important;
  color: #666666 !important;
  text-decoration: underline !important;
}

.cc_div #cm .cm__footer .cm__btn:hover {
  color: #444444 !important;
}

/* Consent modal footer */
.cc_div #cm .cm__footer {
  padding: 16px 24px !important;
  border-top: 1px solid #e0e0e0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

/* Settings panel (preferences modal) */
.cc_div #s-inr {
  background: #ffffff !important;
}

.cc_div #s-hdr {
  background: #f5f5f5 !important;
  padding: 20px 24px !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.cc_div #s-ttl {
  font-size: 20px !important;
  font-weight: 600 !important;
  color: #333333 !important;
  font-family: Quicksand, sans-serif !important;
}

.cc_div #s-bl td {
  padding: 16px !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.cc_div #s-bl .b-tl {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #444444 !important;
}

.cc_div #s-bl .b-desc {
  font-size: 13px !important;
  color: #666666 !important;
  line-height: 1.5 !important;
}

/* Toggle switches */
.cc_div .c-tgl {
  width: 48px !important;
  height: 24px !important;
}

.cc_div .c-tgl:checked {
  background-color: #444444 !important;
}

.cc_div .c-tgl::before {
  width: 20px !important;
  height: 20px !important;
}

/* Cookie table */
.cc_div #s-cnt .cookie-table {
  margin-top: 12px !important;
}

.cc_div #s-cnt .cookie-table td {
  padding: 8px !important;
  font-size: 13px !important;
  color: #555555 !important;
}

/* Links in consent */
.cc_div a {
  color: #444444 !important;
  text-decoration: underline !important;
}

.cc_div a:hover {
  color: #666666 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .cc_div #cm {
    max-width: 95% !important;
    margin: 10px !important;
  }

  .cc_div #cm .cm__header,
  .cc_div #cm .cm__body,
  .cc_div #cm .cm__footer {
    padding: 16px !important;
  }

  .cc_div #cm .cm__title {
    font-size: 18px !important;
  }

  .cc_div #cm .cm__btn {
    padding: 8px 16px !important;
    font-size: 13px !important;
  }
}

/* ========================================
   GLOBAL FACET BADGE OVERRIDE - MAXIMUM PRIORITY
   Apply to ALL badges in facet contexts
   ======================================== */

/* Catch all facet badges - most specific selectors */
.sidebar .facet .badge,
.sidebar .badge,
.facet .badge,
.facet__list .badge,
.facet__list__item .badge,
.list-group-item .badge,
span.facet .badge,
a.facet .badge,
.nav-filters .badge,
[class*="facet"] .badge {
  background-color: transparent !important;
  background: none !important;
  color: #999999 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  font-family: 'Quicksand', sans-serif !important;
  padding: 0 !important;
  margin-left: 5px !important;
  border-radius: 0 !important;
  border: none !important;
  display: inline !important;
  line-height: normal !important;
}

/* Hover states */
.sidebar .facet:hover .badge,
.facet:hover .badge,
.facet__list__item:hover .badge,
.list-group-item:hover .badge,
a:hover .badge {
  color: #666666 !important;
}

/* ==========================================================================
   SEARCH RESULTS LIST - Matching bibliotecas.montemadrid.es Style
   ========================================================================== */

/* Result item container */
.item#result {
  padding: 15px 0;
  border-bottom: 1px solid #e5e5e5;
}

.item#result:first-child {
  padding-top: 0;
}

.item#result.alt {
  background-color: transparent;
}

/* Record ID container */
.item .recordId {
  width: 100%;
}

.item .recordId > .row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

/* Cover image column */
.item .media-object {
  flex: 0 0 auto;
  padding: 0 15px;
}

.item .media-object .wrapper-book-img {
  width: 100px;
  height: auto;
  overflow: hidden;
}

.item .media-object .wrapper-book-img img,
.item .media-object img.img-book {
  width: 100%;
  height: auto;
  max-width: 100px;
  object-fit: contain;
  border: 1px solid #ddd;
  transition: transform 0.2s ease;
}

.item .media-object:hover img {
  transform: scale(1.02);
}

/* Content body column */
.item .media-body.item-details {
  flex: 1;
  min-width: 0;
  padding: 0 15px;
}

/* Title - Line 1 */
.item .resultItemLine1 {
  margin-bottom: 6px;
}

.item .resultItemLine1 h5 {
  font-family: 'Quicksand', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
  color: #333333;
}

.item .resultItemLine1 h5 a.title {
  color: #333333;
  text-decoration: none;
  transition: color 0.2s ease;
}

.item .resultItemLine1 h5 a.title:hover {
  color: #000000;
  text-decoration: underline;
}

/* Alt title */
.item .resultItemLine1 .title-alt {
  font-size: 13px;
  color: #666666;
  font-style: italic;
  margin-top: 4px;
}

/* Author - Line 2 */
.item .resultItemLine2 {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  color: #666666;
  margin-bottom: 6px;
}

.item .resultItemLine2 a {
  color: #333333;
  text-decoration: none;
}

.item .resultItemLine2 a:hover {
  color: #000000;
  text-decoration: underline;
}

/* Format - Line 3 with ionicons */
.item .resultItemLine3 {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  color: #666666;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.item .resultItemLine3 .format-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.item .resultItemLine3 .icono-ebook {
  display: inline-flex;
  align-items: center;
}

.item .resultItemLine3 .icono-ebook .icon {
  font-size: 16px;
  color: #999999;
}

/* Editorial and year */
.item .book-editorial {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  color: #666666;
  margin-bottom: 6px;
  line-height: 1.6;
}

.item .book-editorial .editorial {
  margin-right: 4px;
}

.item .book-editorial .editorial a {
  color: #666666;
  text-decoration: none;
}

.item .book-editorial .editorial a:hover {
  color: #333333;
  text-decoration: underline;
}

.item .book-editorial .book-year {
  color: #666666;
  margin-right: 8px;
}

/* ISBN */
.item .book-isbn {
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  color: #666666;
  margin-bottom: 6px;
}

.item .book-isbn strong {
  font-weight: 600;
  color: #333333;
}

/* Versions link */
.item .ajax_versions {
  font-size: 12px;
  color: #999999;
  margin-top: 8px;
}

/* Availability */
.item .callnumAndLocation {
  font-size: 13px;
  color: #666666;
  margin-top: 8px;
}

.item .callnumAndLocation .locationDetails {
  font-size: 13px;
}

/* Actions column */
.item .media-options {
  flex: 0 0 auto;
  padding: 0 15px;
}

.item .wrapper-actions-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.item .actionListRecord {
  display: inline-block;
}

.item .actionListRecord a.fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  color: #333333;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.item .actionListRecord a.fav:hover {
  background-color: #f5f5f5;
  border-color: #999999;
  color: #000000;
}

.item .actionListRecord a.fav i {
  font-size: 14px;
}

/* Cart buttons styling */
.item .actionListRecord .checkbox-select-item {
  margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .item .recordId > .row {
    flex-direction: column;
  }

  .item .media-object {
    margin-bottom: 10px;
  }

  .item .media-object .wrapper-book-img {
    width: 80px;
  }

  .item .media-options {
    width: 100%;
    margin-top: 10px;
  }

  .item .wrapper-actions-search {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }
}

/* ==========================================================================
   SEARCH RESULTS - VuFind Default Structure Override
   ========================================================================== */

/* Override for VuFind's default result structure */
.search-results .result {
  padding: 15px 0;
  border-bottom: 1px solid #e5e5e5;
}

.search-results .result:first-child {
  padding-top: 0;
}

/* Ensure consistent font across all result elements */
.search-results .result,
.search-results .result * {
  font-family: 'Quicksand', sans-serif;
}

/* Title styling for default VuFind structure */
.search-results .result h2,
.search-results .result .title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 6px 0;
}

.search-results .result h2 a,
.search-results .result .title a {
  color: #333333;
  text-decoration: none;
}

.search-results .result h2 a:hover,
.search-results .result .title a:hover {
  color: #000000;
  text-decoration: underline;
}

/* Author styling */
.search-results .result .author,
.search-results .result .result-author {
  font-size: 13px;
  color: #666666;
  margin-bottom: 6px;
}

/* Format badges - remove default styling */
.search-results .result .format,
.search-results .result .badge,
.search-results .result .label-info {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #666666 !important;
  font-weight: normal !important;
  font-size: 13px !important;
}

/* Cover images */
.search-results .result .recordcover,
.search-results .result img[src*="cover"] {
  max-width: 100px;
  height: auto;
  border: 1px solid #ddd;
}

/* ==========================================================================
   PASSWORD RECOVERY PAGE
   ========================================================================== */

.password-recovery-page {
  display: flex;
  justify-content: center;
  padding: 40px 15px;
  min-height: 60vh;
}

.password-recovery-container {
  max-width: 480px;
  width: 100%;
}

.password-recovery-container h2 {
  color: #333;
  font-family: 'Quicksand', Arial, sans-serif;
  font-weight: 500;
  font-size: 22px;
  margin-bottom: 8px;
}

.recovery-subtitle {
  color: #666;
  font-size: 14px;
  margin-bottom: 30px;
}

.recovery-step .form-group {
  margin-bottom: 20px;
}

.recovery-step label {
  display: block;
  font-weight: 500;
  color: #444;
  margin-bottom: 6px;
  font-size: 14px;
}

.recovery-step .form-control {
  border: 1px solid #d1d1d1;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.recovery-step .form-control:focus {
  border-color: #444;
  box-shadow: 0 0 0 2px rgba(68, 68, 68, 0.15);
  outline: none;
}

.recovery-step .code-input {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 8px;
  font-family: 'Courier New', monospace;
}

.recovery-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 6px;
  margin-top: 5px;
}

.recovery-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #666;
  font-size: 13px;
}

.recovery-link:hover {
  color: #333;
}

.step-info {
  color: #555;
  font-size: 14px;
  margin-bottom: 20px;
  padding: 12px 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #444;
}

/* Progress indicator */
.recovery-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 35px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.progress-step {
  font-size: 12px;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 5px;
}

.progress-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #999;
  font-weight: 600;
  font-size: 11px;
}

.progress-step.active {
  color: #444;
  font-weight: 500;
}

.progress-step.active span {
  background: #444;
  color: #fff;
}

.progress-step.completed span {
  background: #28a745;
  color: #fff;
}

.progress-step.completed {
  color: #28a745;
}

/* Success state */
.recovery-success {
  text-align: center;
  padding: 30px 0;
}

.recovery-success svg {
  margin-bottom: 15px;
}

.recovery-success p {
  font-size: 16px;
  color: #333;
  margin-bottom: 25px;
}

.recovery-success .redirect-notice {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

/* Messages */
.password-recovery-container .alert {
  margin-top: 15px;
  border-radius: 6px;
  font-size: 14px;
}

/* Back link */
.recovery-back-link {
  text-align: center;
  margin-top: 15px;
}

.recovery-back-link a {
  color: #666;
  font-size: 13px;
}

.recovery-back-link a:hover {
  color: #333;
}

/* Mobile */
@media (max-width: 576px) {
  .password-recovery-page {
    padding: 20px 10px;
  }

  .password-recovery-container h2 {
    font-size: 18px;
  }

  .recovery-step .code-input {
    font-size: 20px;
    letter-spacing: 5px;
  }

  .recovery-progress {
    gap: 4px;
    font-size: 11px;
  }
}
