/* ==========================================
   MDV · Biblioteca · Catálogos
   ========================================== */

@scope (html:has(
  link[rel="canonical"][href*="/biblioteca/catalogos"]
)) {

  /* ENCABEZADO */

  .view-taxonomy-term > .view-header {
    margin-bottom: 26px;
    padding: 0;
    border: 0;
    color: #627066;
    font-size: 14px;
  }

  .mdv-titulo-catalogo {
    margin: 0 0 20px;
    padding: 0 0 14px;
    background: transparent !important;
    color: #27382e;
    border: 0;
    border-bottom: 2px solid #054b81;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
  }

  .mdv-titulo-catalogo::before,
  .mdv-titulo-catalogo::after {
    content: none;
  }

  .mdv-encabezado-publicadora,
  .mdv-encabezado-desarrolladora {
    display: none !important;
  }

  /* TARJETAS */

  .view-taxonomy-term > .view-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
  }

  .view-taxonomy-term > .view-content::before,
  .view-taxonomy-term > .view-content::after {
    display: none;
  }

  .view-taxonomy-term > .view-content > .views-row {
    float: none;
    box-sizing: border-box;
    width: auto !important;
    min-width: 0;
    margin: 0;
    padding: 22px;
    background: #fff;
    border: 1px solid #dce5eb;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(25, 45, 59, 0.04);
  }

  .views-row > article {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .views-row .node-title {
    margin: 0 0 18px;
    padding: 0 0 13px;
    background: transparent !important;
    border: 0;
    border-bottom: 1px solid #e6ecef;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.45;
  }

  .views-row .node-title a,
  .views-row .node-title span {
    background: transparent !important;
    color: #054b81 !important;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  .views-row .node-title a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  /* DATOS */

  .views-row .node-content {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 28px;
    margin: 0;
    padding: 0;
    color: #27382e;
  }

  .views-row .node-content > * {
    min-width: 0;
    margin: 0;
  }

  .views-row .node-content h4,
  .views-row .node-content .field__label {
    margin: 0 0 7px;
    padding: 0;
    color: #627066;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
  }

  .views-row .node-content h4 i {
    display: none;
  }

  .views-row .taxonomy-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .views-row .taxonomy-terms li {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .views-row .taxonomy-terms a {
    color: #054b81;
    font-size: 14px;
    text-decoration: none;
  }

  .views-row .taxonomy-terms a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* PAGINACIÓN */

  .pager {
    margin-top: 30px;
  }

  .pager__items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .pager__item {
    margin: 0;
    padding: 0;
  }

  .pager__item a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 13px;
    background: #fff;
    color: #054b81;
    border: 1px solid #dce5eb;
    border-radius: 8px;
    text-decoration: none;
  }

  .pager__item.is-active a,
  .pager__item a:hover {
    background: #054b81;
    color: #fff;
    border-color: #054b81;
  }

  .view-taxonomy-term a:focus-visible {
    outline: 3px solid #277da8;
    outline-offset: 4px;
  }

  /* MÓVIL */

  @media (max-width: 760px) {
    .view-taxonomy-term > .view-content {
      grid-template-columns: 1fr;
    }

    .view-taxonomy-term > .view-content > .views-row {
      padding: 18px;
    }
  }
}