/* =========================================================
   ARCHIVAS Y DOCUMENTAS — FICHA INDIVIDUAL DE DOCUMENTO
   Ruta:
   /var/www/html/themes/default/asset/css/ay-document-show.css

   Diseño:
   - Header equivalente a la ficha individual de Artista.
   - Documento principal con navegación anterior/siguiente.
   - Barra inferior sin descarga, con zoom para imágenes.
   - PDF completo y documentos multipágina.
   - Protección disuasoria contra copia, arrastre e impresión.
   - Metadatos y cita.
   - Documentos relacionados de la misma artista.
   - Footer institucional.
   ========================================================= */

/* =========================================================
   0) FUENTES Y VARIABLES
   ========================================================= */
@font-face {
  font-family: "Bitstream Vera Sans";
  src: url("../fonts/Vera.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bitstream Vera Sans";
  src: url("../fonts/VeraBd.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Bitstream Vera Sans";
  src: url("../fonts/VeraIt.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Bitstream Vera Sans";
  src: url("../fonts/VeraBI.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ay-document-dark: #22061d;
  --ay-document-purple: #571447;
  --ay-document-magenta: #a51d75;
  --ay-document-magenta-hover: #c23893;
  --ay-document-lavender: #9f9dff;
  --ay-document-lavender-2: #bd9bf9;
  --ay-document-pink: #f3dde7;
  --ay-document-line: #a51d75;

  --ay-document-header-width:
    min(1340px, calc(100vw - 170px));

  --ay-document-content-width:
    min(1100px, calc(100vw - 140px));

  --ay-document-viewer-width:
    min(760px, calc(100vw - 260px));

  --ay-document-dark-filter:
    brightness(0) saturate(100%) invert(8%) sepia(37%)
    saturate(1120%) hue-rotate(282deg) brightness(82%)
    contrast(108%);

  --ay-document-hover-filter:
    brightness(0) saturate(100%) invert(19%) sepia(76%)
    saturate(2046%) hue-rotate(296deg) brightness(91%)
    contrast(89%);

  --ay-document-lavender-filter:
    brightness(0) saturate(100%) invert(73%) sepia(34%)
    saturate(1964%) hue-rotate(203deg) brightness(103%)
    contrast(105%);
}

/* =========================================================
   1) AISLAMIENTO DEL TEMA DEFAULT
   ========================================================= */
html:has(.ay-document-show-page),
body.ay-document-show-body,
body:has(.ay-document-show-page) {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  background: var(--ay-document-lavender) !important;
  color: var(--ay-document-dark) !important;
  font-family:
    "Bitstream Vera Sans",
    Arial,
    Helvetica,
    sans-serif !important;
}

body.ay-document-show-body #user-bar,
body.ay-document-show-body .user-bar,
body.ay-document-show-body .admin-bar,
body.ay-document-show-body .omeka-admin-bar,
body:has(.ay-document-show-page) #user-bar,
body:has(.ay-document-show-page) .user-bar,
body:has(.ay-document-show-page) .admin-bar,
body:has(.ay-document-show-page) .omeka-admin-bar {
  display: none !important;
}

body.ay-document-show-body > header,
body.ay-document-show-body > nav,
body.ay-document-show-body > footer,
body.ay-document-show-body .site-header,
body.ay-document-show-body .site-navigation,
body.ay-document-show-body .site-footer,
body.ay-document-show-body .breadcrumbs,
body:has(.ay-document-show-page) > header,
body:has(.ay-document-show-page) > nav,
body:has(.ay-document-show-page) > footer,
body:has(.ay-document-show-page) .site-header,
body:has(.ay-document-show-page) .site-navigation,
body:has(.ay-document-show-page) .site-footer,
body:has(.ay-document-show-page) .breadcrumbs {
  display: none !important;
}

body.ay-document-show-body #content,
body:has(.ay-document-show-page) #content {
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.ay-document-show-body #content > .ay-document-show-page,
body:has(.ay-document-show-page) #content > .ay-document-show-page {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.ay-document-show-body #page,
body.ay-document-show-body #wrap,
body.ay-document-show-body .site,
body.ay-document-show-body .site-container,
body.ay-document-show-body .site-page,
body:has(.ay-document-show-page) #page,
body:has(.ay-document-show-page) #wrap,
body:has(.ay-document-show-page) .site,
body:has(.ay-document-show-page) .site-container,
body:has(.ay-document-show-page) .site-page {
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ay-document-show-page,
.ay-document-show-page *,
.ay-document-show-page *::before,
.ay-document-show-page *::after {
  box-sizing: border-box;
}

.ay-document-show-page {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ay-document-dark);
  font-family:
    "Bitstream Vera Sans",
    Arial,
    Helvetica,
    sans-serif;
  background:
    linear-gradient(
      180deg,
      var(--ay-document-lavender) 0%,
      #d9caef 6%,
      var(--ay-document-pink) 17%,
      var(--ay-document-pink) 82%,
      #d8c8ef 91%,
      var(--ay-document-lavender) 100%
    );
}

.ay-document-show-page a {
  color: inherit;
  text-decoration: none;
}

.ay-document-show-page img {
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

.ay-document-show-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================================================
   2) MENÚ MÓVIL
   ========================================================= */
.ay-document-show-menu {
  display: none;
}

/* =========================================================
   3) HEADER
   ========================================================= */
.ay-document-show-header {
  display: block !important;
  position: relative !important;
  width: var(--ay-document-header-width) !important;
  max-width: var(--ay-document-header-width) !important;
  height: 390px !important;
  min-height: 390px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
  color: var(--ay-document-dark) !important;
  background: transparent !important;
  border: 0 !important;
}

.ay-document-show-header-top {
  display: block !important;
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ay-document-show-logo-area {
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  top: 76px !important;
  width: 445px !important;
  max-width: 445px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ay-document-show-logo-link {
  display: inline-block !important;
  width: 315px !important;
  max-width: 315px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.ay-document-show-logo {
  display: block !important;
  width: 315px !important;
  max-width: 315px !important;
  height: auto !important;
  margin: 0 !important;
  filter: var(--ay-document-dark-filter) !important;
  transition: filter 180ms ease !important;
}

.ay-document-show-logo-link:hover .ay-document-show-logo,
.ay-document-show-logo-link:focus-visible .ay-document-show-logo {
  filter: var(--ay-document-hover-filter) !important;
}

.ay-document-show-hero-caption {
  display: block !important;
  width: 445px !important;
  max-width: 100% !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
  background: transparent !important;
  font-size: 14px !important;
  line-height: 1.36 !important;
  font-weight: 400 !important;
  text-align: left !important;
}

.ay-document-show-search-area {
  display: block !important;
  position: static !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

.ay-document-show-search-area > label {
  position: absolute !important;
  top: 84px !important;
  right: 520px !important;
  display: flex !important;
  align-items: center !important;
  width: 90px !important;
  height: 25px !important;
  min-height: 25px !important;
  margin: 0 !important;
  padding: 0 0 0 8px !important;
  border: 2px solid var(--ay-document-dark) !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  color: var(--ay-document-dark) !important;
  background: transparent !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

.ay-document-show-search-area > input {
  position: absolute !important;
  top: 84px !important;
  right: 150px !important;
  width: 370px !important;
  height: 25px !important;
  min-height: 25px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border-top: 2px solid var(--ay-document-dark) !important;
  border-bottom: 2px solid var(--ay-document-dark) !important;
  border-left: 0 !important;
  border-right: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  color: var(--ay-document-dark) !important;
  background: transparent !important;
  font: inherit !important;
  font-size: 11px !important;
}

.ay-document-show-search-area > button {
  position: absolute !important;
  top: 84px !important;
  right: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 150px !important;
  height: 25px !important;
  min-height: 25px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--ay-document-lavender) !important;
  background: var(--ay-document-dark) !important;
  font: inherit !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: background 180ms ease !important;
}

.ay-document-show-search-area > button:hover,
.ay-document-show-search-area > button:focus-visible {
  background: var(--ay-document-magenta) !important;
}

.ay-document-show-main-access {
  display: grid !important;
  position: absolute !important;
  top: 178px !important;
  right: 205px !important;
  width: 430px !important;
  max-width: 430px !important;
  grid-template-columns: repeat(2, 1fr) !important;
  column-gap: 118px !important;
  align-items: end !important;
  justify-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center !important;
}

.ay-document-show-access {
  display: grid !important;
  grid-template-rows: 72px auto !important;
  align-items: end !important;
  justify-items: center !important;
  min-width: 92px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  transition: color 180ms ease !important;
}

.ay-document-show-access-icon {
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  filter: var(--ay-document-dark-filter) !important;
  transition: filter 180ms ease !important;
}

.ay-document-show-access-icon-mapeo {
  max-width: 92px !important;
  max-height: 66px !important;
}

.ay-document-show-access-icon-conoce {
  max-width: 74px !important;
  max-height: 68px !important;
}

.ay-document-show-access strong {
  display: block !important;
  margin: 10px 0 0 !important;
  color: inherit !important;
  font-size: 13px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.ay-document-show-access:hover,
.ay-document-show-access:focus-visible {
  color: var(--ay-document-magenta) !important;
}

.ay-document-show-access:hover .ay-document-show-access-icon,
.ay-document-show-access:focus-visible .ay-document-show-access-icon {
  filter: var(--ay-document-hover-filter) !important;
}

.ay-document-show-logo-link:focus-visible,
.ay-document-show-access:focus-visible {
  outline: 2px solid var(--ay-document-magenta) !important;
  outline-offset: 5px !important;
}

/* =========================================================
   4) ELEMENTOS FIJOS
   ========================================================= */
.ay-document-show-fixed-side-label {
  display: block !important;
  position: fixed !important;
  left: clamp(24px, 3.7vw, 58px) !important;
  bottom: clamp(54px, 8.2vh, 92px) !important;
  z-index: 800 !important;
  width: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
  background: transparent !important;
  pointer-events: none !important;
}

.ay-document-show-fixed-side-label span {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: 15px !important;
  line-height: 1.12 !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
  writing-mode: vertical-rl !important;
  transform: rotate(180deg) !important;
}

.ay-document-show-socials {
  display: flex !important;
  position: fixed !important;
  right: clamp(24px, 3.7vw, 58px) !important;
  bottom: clamp(54px, 8.2vh, 92px) !important;
  z-index: 805 !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  width: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ay-document-show-socials a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ay-document-show-socials img {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  object-fit: contain !important;
  filter: var(--ay-document-dark-filter) !important;
  transition:
    filter 160ms ease,
    transform 160ms ease !important;
}

.ay-document-show-socials a:hover img,
.ay-document-show-socials a:focus-visible img {
  filter: var(--ay-document-hover-filter) !important;
  transform: scale(1.06) !important;
}

/* =========================================================
   5) CONTENIDO PRINCIPAL
   ========================================================= */
.ay-document-show-main {
  width: var(--ay-document-content-width) !important;
  max-width: var(--ay-document-content-width) !important;
  margin: 0 auto !important;
  padding: 0 0 132px !important;
  background: transparent !important;
}

/* Título y línea superior. */
.ay-document-show-related-heading {
  position: relative !important;
  width: 100% !important;
  margin: 0 0 54px !important;
  padding: 0 !important;
}


.ay-document-show-artist-status {
  position: absolute !important;
  left: -70px !important;
  top: 43px !important;
  display: block !important;
  width: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ay-document-magenta) !important;
  background: transparent !important;
  border: 0 !important;
  font-size: 9px !important;
  line-height: 1.18 !important;
  font-weight: 400 !important;
  text-align: left !important;
  text-transform: uppercase !important;
}

.ay-document-show-related-heading h1 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
  font-size: 28px !important;
  line-height: 1.05 !important;
  letter-spacing: 0.035em !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.ay-document-show-related-line {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-top: 1.5px solid var(--ay-document-line) !important;
  border-bottom: 1.5px solid var(--ay-document-line) !important;
}

.ay-document-show-related-label {
  display: block !important;
  color: var(--ay-document-magenta) !important;
  font-size: 9px !important;
  line-height: 1.25 !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
}

.ay-document-show-related-context {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: var(--ay-document-magenta) !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}

/* =========================================================
   6) VISOR Y NAVEGACIÓN
   ========================================================= */
.ay-document-show-viewer {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) 58px !important;
  column-gap: 22px !important;
  align-items: center !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.ay-document-show-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 58px !important;
  height: 58px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ay-document-magenta) !important;
  background: transparent !important;
  border: 0 !important;
  font-size: 45px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  transition:
    color 160ms ease,
    transform 160ms ease !important;
}

.ay-document-show-nav:hover,
.ay-document-show-nav:focus-visible {
  color: var(--ay-document-dark) !important;
  transform: scale(1.08) !important;
}

.ay-document-show-nav:focus-visible {
  outline: 2px solid var(--ay-document-magenta) !important;
  outline-offset: 3px !important;
}

.ay-document-show-nav.is-disabled {
  opacity: 0.25 !important;
  cursor: default !important;
}

.ay-document-show-document {
  width: var(--ay-document-viewer-width) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

.ay-document-show-document-stage {
  position: relative !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: 100% !important;
  height: min(780px, 72vw) !important;
  min-height: 540px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: auto !important;
  background: transparent !important;
  scrollbar-width: thin !important;
  scrollbar-color:
    rgba(34, 6, 29, 0.42)
    rgba(243, 221, 231, 0.3) !important;
}

.ay-document-show-document-stage.is-zoomed {
  justify-content: flex-start !important;
}


.ay-document-show-pages {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  row-gap: 18px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ay-document-show-page-unit {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

.ay-document-show-page-unit.is-pdf {
  display: block !important;
  height: min(860px, 78vh) !important;
  min-height: 620px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

.ay-document-show-pdf-frame {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 620px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

.ay-document-show-document-stage,
.ay-document-show-document-stage *,
.ay-document-show-page-unit,
.ay-document-show-page-unit * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}

.ay-document-show-document-image {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center top !important;
  border: 0 !important;
  box-shadow: none !important;
  transition: transform 180ms ease !important;
}

.ay-document-show-document-placeholder {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 540px !important;
  padding: 42px !important;
  border: 1.5px solid var(--ay-document-magenta) !important;
  color: var(--ay-document-magenta) !important;
  text-align: center !important;
}

.ay-document-show-document-placeholder strong {
  margin: 0 0 12px !important;
  font-size: 22px !important;
  line-height: 1.25 !important;
}

.ay-document-show-document-placeholder span {
  font-size: 11px !important;
  line-height: 1.4 !important;
}

.ay-document-show-toolbar {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) auto !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 31px !important;
  margin: 16px 0 0 !important;
  padding: 0 12px !important;
  color: var(--ay-document-lavender) !important;
  background: var(--ay-document-dark) !important;
}

.ay-document-show-protection {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 38px !important;
  min-height: 31px !important;
  color: var(--ay-document-lavender) !important;
  font-size: 11px !important;
  line-height: 1 !important;
  cursor: default !important;
}

.ay-document-show-protection::after {
  content: "PROTEGIDO" !important;
  display: inline-block !important;
  margin-left: 6px !important;
  color: var(--ay-document-lavender) !important;
  font-size: 7px !important;
  line-height: 1 !important;
  letter-spacing: 0.04em !important;
}

.ay-document-show-position {
  display: block !important;
  color: var(--ay-document-lavender) !important;
  font-size: 8px !important;
  line-height: 1 !important;
  text-align: center !important;
}


.ay-document-show-pdf-hint {
  display: block !important;
  max-width: 250px !important;
  color: var(--ay-document-lavender) !important;
  font-size: 6.8px !important;
  line-height: 1.15 !important;
  letter-spacing: 0.025em !important;
  text-align: right !important;
  white-space: normal !important;
}

.ay-document-show-zoom {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0 !important;
}

.ay-document-show-zoom button {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  height: 18px !important;
  margin: 0 !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-left: 1px solid rgba(34, 6, 29, 0.5) !important;
  border-radius: 0 !important;
  color: var(--ay-document-dark) !important;
  background: var(--ay-document-lavender) !important;
  font-family: inherit !important;
  font-size: 11px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.ay-document-show-zoom button:first-child {
  border-left: 0 !important;
  border-radius: 9px 0 0 9px !important;
}

.ay-document-show-zoom button:last-child {
  border-radius: 0 9px 9px 0 !important;
}

.ay-document-show-zoom button:hover,
.ay-document-show-zoom button:focus-visible {
  color: var(--ay-document-pink) !important;
  background: var(--ay-document-magenta) !important;
}

.ay-document-show-image-caption {
  width: 100% !important;
  margin: 9px 0 0 !important;
  color: var(--ay-document-magenta) !important;
  font-size: 8px !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

/* =========================================================
   7) METADATOS, DESCRIPCIÓN Y CITA
   ========================================================= */
.ay-document-show-information {
  width: var(--ay-document-viewer-width) !important;
  max-width: 100% !important;
  margin: 38px auto 0 !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
}

.ay-document-show-metadata {
  width: 100% !important;
  margin: 0 0 30px !important;
  padding: 0 0 28px !important;
  border-bottom: 1.5px solid var(--ay-document-magenta) !important;
}

.ay-document-show-metadata > div {
  display: grid !important;
  grid-template-columns: 102px minmax(0, 1fr) !important;
  column-gap: 8px !important;
  align-items: baseline !important;
  margin: 0 0 7px !important;
}

.ay-document-show-metadata dt,
.ay-document-show-metadata dd {
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
  font-weight: 400 !important;
}

.ay-document-show-metadata dt {
  font-weight: 700 !important;
}

.ay-document-show-description,
.ay-document-show-description p {
  color: var(--ay-document-dark) !important;
  font-size: 13px !important;
  line-height: 1.58 !important;
}

.ay-document-show-description {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ay-document-show-description p {
  margin: 0 0 16px !important;
}

.ay-document-show-citation {
  width: 100% !important;
  margin: 38px 0 0 !important;
  padding: 12px 0 0 !important;
  border-top: 1.5px solid var(--ay-document-magenta) !important;
  color: var(--ay-document-magenta) !important;
  font-size: 8.5px !important;
  line-height: 1.45 !important;
}

.ay-document-show-citation strong {
  font-weight: 400 !important;
}

.ay-document-show-credit {
  margin: 8px 0 0 !important;
  color: var(--ay-document-magenta) !important;
  font-size: 8.5px !important;
  line-height: 1.4 !important;
}

/* =========================================================
   8) DOCUMENTOS RELACIONADOS INFERIORES
   ========================================================= */
.ay-document-show-cards {
  width: 100% !important;
  margin: 122px 0 0 !important;
  padding: 58px 0 0 !important;
  border-top: 1.5px solid var(--ay-document-dark) !important;
}

.ay-document-show-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  column-gap: 74px !important;
  row-gap: 66px !important;
  width: 100% !important;
}

.ay-document-show-card {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.ay-document-show-card > h3 {
  min-height: 31px !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}

.ay-document-show-card-link {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  padding: 0 0 26px !important;
  border-bottom: 1px solid rgba(165, 29, 117, 0.52) !important;
}

.ay-document-show-card-thumb {
  position: relative !important;
  width: 100% !important;
  height: 250px !important;
  margin: 0 0 13px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

.ay-document-show-card-thumb img {
  display: block !important;
  width: 100% !important;
  height: 250px !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center top !important;
  transition: transform 180ms ease !important;
}

.ay-document-show-card-placeholder {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 250px !important;
  margin: 0 0 13px !important;
  padding: 22px !important;
  border: 1px solid var(--ay-document-magenta) !important;
  color: var(--ay-document-magenta) !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  text-align: center !important;
}

.ay-document-show-card-link h4 {
  margin: 0 0 7px !important;
  padding: 0 !important;
  color: var(--ay-document-dark) !important;
  font-size: 10.5px !important;
  line-height: 1.32 !important;
  font-weight: 700 !important;
}

.ay-document-show-card-link p,
.ay-document-show-card-link span {
  display: block !important;
  margin: 0 0 5px !important;
  color: var(--ay-document-dark) !important;
  font-size: 8px !important;
  line-height: 1.38 !important;
}

.ay-document-show-card-link::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  border: 2px solid var(--ay-document-magenta) !important;
  opacity: 0 !important;
  transition: opacity 160ms ease !important;
}

.ay-document-show-card-link:hover::after,
.ay-document-show-card-link:focus-visible::after {
  opacity: 1 !important;
}

.ay-document-show-card-link:hover img,
.ay-document-show-card-link:focus-visible img {
  transform: scale(1.025) !important;
}

.ay-document-show-card-link:focus-visible {
  outline: 2px solid var(--ay-document-magenta) !important;
  outline-offset: 4px !important;
}

/* =========================================================
   9) CONTACTO MÓVIL
   ========================================================= */
.ay-document-show-mobile-contact {
  display: none !important;
}

/* =========================================================
   10) DONACIÓN Y FOOTER
   ========================================================= */
.ay-document-show-donate {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 150px 20px 102px !important;
  overflow: hidden !important;
  color: var(--ay-document-lavender-2) !important;
  background:
    radial-gradient(
      ellipse at 50% 47%,
      #2e0a28 0%,
      #440d35 13%,
      #571040 28%,
      #75396e 46%,
      #834c83 54%,
      #905e98 65%,
      #905e98 100%
    ) !important;
  text-align: center !important;
}

.ay-document-show-donate p {
  width: min(760px, calc(100% - 80px)) !important;
  max-width: 100% !important;
  margin: 0 auto 42px !important;
  color: var(--ay-document-lavender-2) !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

.ay-document-show-donate-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 250px !important;
  min-height: 54px !important;
  padding: 0 24px !important;
  color: var(--ay-document-lavender-2) !important;
  background: #2e0a28 !important;
  font-size: 16px !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  transition:
    color 180ms ease,
    background 180ms ease !important;
}

.ay-document-show-donate-button:hover,
.ay-document-show-donate-button:focus-visible {
  color: var(--ay-document-lavender-2) !important;
  background: var(--ay-document-magenta) !important;
}

.ay-document-show-footer {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 20px 30px !important;
  color: #571447 !important;
  background:
    linear-gradient(
      180deg,
      #905e98 0%,
      #9870b5 58%,
      #9f7fd4 100%
    ) !important;
  text-align: center !important;
}

.ay-document-show-footer::before {
  content: "" !important;
  display: block !important;
  width: min(720px, calc(100% - 160px)) !important;
  height: 2px !important;
  margin: 0 auto 15px !important;
  background: #571447 !important;
}

.ay-document-show-footer-row {
  width: min(900px, calc(100% - 80px)) !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  color: #571447 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  text-align: center !important;
}

.ay-document-show-footer-row span,
.ay-document-show-footer-row a {
  display: inline !important;
  color: #571447 !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
}

.ay-document-show-footer-row a:hover,
.ay-document-show-footer-row a:focus-visible {
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

/* =========================================================
   11) TABLETA
   ========================================================= */
@media (min-width: 761px) and (max-width: 1180px) {
  :root {
    --ay-document-header-width:
      min(1040px, calc(100vw - 80px));

    --ay-document-content-width:
      min(920px, calc(100vw - 80px));

    --ay-document-viewer-width:
      min(700px, calc(100vw - 180px));
  }

  .ay-document-show-header {
    height: 370px !important;
    min-height: 370px !important;
  }

  .ay-document-show-logo-area {
    top: 70px !important;
    width: 300px !important;
  }

  .ay-document-show-logo-link,
  .ay-document-show-logo {
    width: 250px !important;
    max-width: 250px !important;
  }

  .ay-document-show-hero-caption {
    width: 360px !important;
    font-size: 12px !important;
  }

  .ay-document-show-search-area > label {
    top: 76px !important;
    right: 450px !important;
    width: 82px !important;
  }

  .ay-document-show-search-area > input {
    top: 76px !important;
    right: 135px !important;
    width: 315px !important;
  }

  .ay-document-show-search-area > button {
    top: 76px !important;
    width: 135px !important;
  }

  .ay-document-show-main-access {
    top: 166px !important;
    right: 105px !important;
    width: 410px !important;
    column-gap: 88px !important;
  }

  .ay-document-show-viewer {
    grid-template-columns: 46px minmax(0, 1fr) 46px !important;
    column-gap: 12px !important;
  }

  .ay-document-show-nav {
    width: 46px !important;
    height: 46px !important;
    font-size: 38px !important;
  }

  .ay-document-show-cards-grid {
    column-gap: 38px !important;
  }

  .ay-document-show-fixed-side-label {
    left: 22px !important;
    bottom: 56px !important;
  }

  .ay-document-show-socials {
    right: 22px !important;
    bottom: 56px !important;
  }

  .ay-document-show-footer-row,
  .ay-document-show-footer-row span,
  .ay-document-show-footer-row a {
    font-size: 14px !important;
  }
}

/* =========================================================
   12) MÓVIL — NORMALIZADO CON LA FICHA DE ARTISTA
   Solo se aplica hasta 767 px. Escritorio y tableta no cambian.
   ========================================================= */
@media (max-width: 767px) {
  :root {
    --ay-document-header-width: 100%;
    --ay-document-content-width: 100%;
    --ay-document-viewer-width: 100%;
  }

  html:has(.ay-document-show-page),
  body.ay-document-show-body,
  body:has(.ay-document-show-page),
  body.ay-document-show-body #content,
  body:has(.ay-document-show-page) #content,
  body.ay-document-show-body #content > .ay-document-show-page,
  body:has(.ay-document-show-page) #content > .ay-document-show-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    border-radius: 0 !important;
  }

  html:has(.ay-document-show-page),
  body.ay-document-show-body,
  body:has(.ay-document-show-page) {
    background: var(--ay-document-pink) !important;
  }

  .ay-document-show-page {
    width: 100% !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    background: var(--ay-document-pink) !important;
  }

  /* ---------------------------------------------------------
     MENÚ HAMBURGUESA CERRADO — IGUAL A ARTISTA
     --------------------------------------------------------- */
  .ay-document-show-menu {
    display: block !important;
    position: relative !important;
    z-index: 80 !important;
    width: 100% !important;
    height: 80px !important;
    margin: 0 !important;
    padding: 34px 0 0 !important;
    background: var(--ay-document-pink) !important;
  }

  .ay-document-show-menu > summary {
    display: block !important;
    position: relative !important;
    width: 28px !important;
    height: 18px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
    cursor: pointer !important;
    border-top: 2px solid var(--ay-document-dark) !important;
    border-bottom: 2px solid var(--ay-document-dark) !important;
  }

  .ay-document-show-menu > summary::-webkit-details-marker {
    display: none !important;
  }

  .ay-document-show-menu > summary::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 6px !important;
    width: 28px !important;
    border-top: 2px solid var(--ay-document-dark) !important;
  }

  .ay-document-show-menu-panel {
    display: none !important;
  }

  /* ---------------------------------------------------------
     MENÚ ABIERTO — MISMO DISEÑO Y PROPORCIONES DE ARTISTA
     --------------------------------------------------------- */
  html:has(.ay-document-show-menu[open]),
  body.ay-document-show-body:has(.ay-document-show-menu[open]),
  body:has(.ay-document-show-page):has(.ay-document-show-menu[open]) {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }

  .ay-document-show-menu[open] {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: block !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    background:
      linear-gradient(
        180deg,
        var(--ay-document-lavender) 0%,
        #d8c7ee 12%,
        var(--ay-document-pink) 28%,
        var(--ay-document-pink) 100%
      ) !important;
  }

  .ay-document-show-menu[open] > summary {
    position: absolute !important;
    left: 50% !important;
    top: 31px !important;
    z-index: 3 !important;
    width: 31px !important;
    height: 31px !important;
    margin: 0 !important;
    border: 0 !important;
    transform: translateX(-50%) !important;
  }

  .ay-document-show-menu[open] > summary::before,
  .ay-document-show-menu[open] > summary::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 12px !important;
    width: 31px !important;
    border-top: 7px solid var(--ay-document-dark) !important;
    transform-origin: center !important;
  }

  .ay-document-show-menu[open] > summary::before {
    transform: rotate(45deg) !important;
  }

  .ay-document-show-menu[open] > summary::after {
    transform: rotate(-45deg) !important;
  }

  .ay-document-show-menu[open] .ay-document-show-menu-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 102px 0 0 !important;
    overflow: visible !important;
    text-align: center !important;
  }

  .ay-document-show-menu-logo-link {
    display: block !important;
    flex: 0 0 auto !important;
    width: 200px !important;
    margin: 0 auto 38px !important;
    padding: 0 !important;
    line-height: 0 !important;
  }

  .ay-document-show-menu-logo {
    display: block !important;
    width: 200px !important;
    max-width: 200px !important;
    height: auto !important;
    margin: 0 auto !important;
    filter: var(--ay-document-dark-filter) !important;
  }

  .ay-document-show-menu-nav {
    display: grid !important;
    flex: 0 0 auto !important;
    width: calc(100% - 48px) !important;
    max-width: 342px !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  .ay-document-show-menu-nav a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 89px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border-top: 1px solid var(--ay-document-dark) !important;
    color: var(--ay-document-dark) !important;
    font-size: 19px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
  }

  .ay-document-show-menu-contact {
    display: flex !important;
    flex: 0 0 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-height: clamp(470px, 135vw, 527px) !important;
    margin: 40px 0 0 !important;
    padding: 35px 24px 28px !important;
    color: var(--ay-document-lavender) !important;
    background:
      linear-gradient(
        180deg,
        #84165f 0%,
        #7b1a62 12%,
        #88418f 44%,
        #9570c6 72%,
        var(--ay-document-lavender) 100%
      ) !important;
  }

  .ay-document-show-menu-contact h2 {
    margin: 0 0 27px !important;
    padding: 0 !important;
    color: var(--ay-document-lavender) !important;
    font-size: 20px !important;
    line-height: 1 !important;
    letter-spacing: 0.01em !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
  }

  .ay-document-show-menu-contact-item {
    margin: 0 0 15px !important;
    padding: 0 !important;
    color: var(--ay-document-lavender) !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;
  }

  .ay-document-show-menu-contact-item span,
  .ay-document-show-menu-contact-item a {
    display: block !important;
    color: var(--ay-document-lavender) !important;
    font-size: inherit !important;
    line-height: inherit !important;
  }

  .ay-document-show-menu-contact-item a {
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    overflow-wrap: anywhere !important;
  }

  .ay-document-show-menu-socials {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 48px !important;
    margin: 54px 0 0 !important;
    padding: 0 !important;
  }

  .ay-document-show-menu-socials a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ay-document-show-menu-socials img {
    display: block !important;
    width: 38px !important;
    height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;
    margin: 0 !important;
    filter: var(--ay-document-lavender-filter) !important;
  }

  .ay-document-show-menu-footer {
    width: min(320px, calc(100% - 16px)) !important;
    margin: auto auto 0 !important;
    padding: 10px 0 0 !important;
    border-top: 1px solid rgba(87, 20, 71, 0.72) !important;
    color: var(--ay-document-purple) !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    font-weight: 400 !important;
    text-align: center !important;
  }

  .ay-document-show-menu-footer div,
  .ay-document-show-menu-footer a,
  .ay-document-show-menu-footer span {
    color: var(--ay-document-purple) !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
  }

  /* ---------------------------------------------------------
     HEADER MÓVIL — LOGO, BUSCADOR Y TEXTO
     --------------------------------------------------------- */
  .ay-document-show-header {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 24px 8px !important;
    overflow: visible !important;
    background:
      linear-gradient(
        180deg,
        var(--ay-document-pink) 0%,
        var(--ay-document-pink) 44%,
        #d8c7ee 100%
      ) !important;
  }

  .ay-document-show-header-top {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ay-document-show-logo-area {
    display: contents !important;
  }

  .ay-document-show-logo-link {
    order: 1 !important;
    position: static !important;
    display: block !important;
    width: 150px !important;
    max-width: 150px !important;
    margin: 0 auto 28px !important;
    padding: 0 !important;
  }

  .ay-document-show-logo {
    display: block !important;
    width: 150px !important;
    max-width: 150px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .ay-document-show-search-area {
    order: 2 !important;
    position: static !important;
    display: grid !important;
    grid-template-columns: 70px minmax(0, 1fr) 34px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ay-document-show-search-area > label,
  .ay-document-show-search-area > input,
  .ay-document-show-search-area > button {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: 28px !important;
    min-height: 28px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .ay-document-show-search-area > label {
    display: flex !important;
    align-items: center !important;
    padding: 0 0 0 7px !important;
    border: 1.2px solid var(--ay-document-dark) !important;
    border-right: 0 !important;
    background: transparent !important;
    color: var(--ay-document-dark) !important;
    font-size: 9px !important;
    line-height: 1 !important;
    font-weight: 700 !important;
  }

  .ay-document-show-search-area > input {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 6px !important;
    border-top: 1.2px solid var(--ay-document-dark) !important;
    border-bottom: 1.2px solid var(--ay-document-dark) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    background: transparent !important;
    color: var(--ay-document-dark) !important;
    font-size: 10px !important;
    outline: 0 !important;
  }

  .ay-document-show-search-area > button {
    position: relative !important;
    display: block !important;
    width: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border: 1.2px solid var(--ay-document-dark) !important;
    border-left: 0 !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
  }

  .ay-document-show-search-area > button::before {
    content: "" !important;
    position: absolute !important;
    left: 10px !important;
    top: 7px !important;
    width: 9px !important;
    height: 9px !important;
    border: 1.6px solid var(--ay-document-dark) !important;
    border-radius: 50% !important;
  }

  .ay-document-show-search-area > button::after {
    content: "" !important;
    position: absolute !important;
    left: 19px !important;
    top: 17px !important;
    width: 7px !important;
    border-top: 1.6px solid var(--ay-document-dark) !important;
    transform: rotate(45deg) !important;
    transform-origin: left center !important;
  }

  .ay-document-show-hero-caption {
    order: 3 !important;
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 342px !important;
    margin: 16px auto 0 !important;
    padding: 0 !important;
    color: var(--ay-document-dark) !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
    text-align: left !important;
  }

  .ay-document-show-main-access,
  .ay-document-show-fixed-side-label,
  .ay-document-show-socials {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* ---------------------------------------------------------
     FICHA INDIVIDUAL DE DOCUMENTO
     --------------------------------------------------------- */
  .ay-document-show-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 24px 24px 90px !important;
    background:
      linear-gradient(
        180deg,
        #d8c7ee 0%,
        var(--ay-document-lavender) 20%,
        #c9b4ed 48%,
        var(--ay-document-pink) 100%
      ) !important;
  }

  .ay-document-show-related-heading {
    width: 100% !important;
    margin: 0 0 38px !important;
    padding: 0 !important;
  }

  .ay-document-show-artist-status {
    position: static !important;
    display: block !important;
    width: auto !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
    color: var(--ay-document-magenta) !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    text-transform: uppercase !important;
  }

  .ay-document-show-related-heading h1 {
    width: min(320px, 100%) !important;
    margin: 0 auto 22px !important;
    padding: 0 !important;
    color: var(--ay-document-dark) !important;
    font-size: 27px !important;
    line-height: 1 !important;
    letter-spacing: 0.035em !important;
    text-align: center !important;
  }

  .ay-document-show-related-line {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 9px 0 !important;
    border-top: 1.2px solid var(--ay-document-magenta) !important;
    border-bottom: 1.2px solid var(--ay-document-magenta) !important;
  }

  .ay-document-show-related-label {
    font-size: 8px !important;
    line-height: 1.3 !important;
  }

  .ay-document-show-related-context {
    overflow: visible !important;
    color: var(--ay-document-magenta) !important;
    font-size: 8.5px !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
  }

  .ay-document-show-viewer {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) 24px !important;
    column-gap: 5px !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .ay-document-show-nav {
    width: 24px !important;
    height: 48px !important;
    font-size: 25px !important;
  }

  .ay-document-show-document {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ay-document-show-document-stage {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(460px, 108vw) !important;
    overflow: auto !important;
  }

  .ay-document-show-document-stage.has-pdf {
    max-height: none !important;
    overflow: hidden !important;
  }

  .ay-document-show-pages {
    row-gap: 12px !important;
  }

  .ay-document-show-page-unit.is-image {
    min-height: 300px !important;
  }

  .ay-document-show-document-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  .ay-document-show-page-unit.is-pdf {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .ay-document-show-pdf-frame {
    width: 100% !important;
    height: clamp(390px, 54dvh, 460px) !important;
    min-height: 390px !important;
  }

  .ay-document-show-document-placeholder {
    min-height: 340px !important;
    padding: 24px !important;
  }

  .ay-document-show-document-placeholder strong {
    font-size: 17px !important;
  }

  .ay-document-show-toolbar {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    min-height: 30px !important;
    margin: 10px 0 0 !important;
    padding: 0 7px !important;
  }

  .ay-document-show-protection {
    width: 28px !important;
    min-height: 30px !important;
    font-size: 9px !important;
  }

  .ay-document-show-protection::after {
    display: none !important;
  }

  .ay-document-show-position {
    font-size: 6.5px !important;
    line-height: 1.2 !important;
  }

  .ay-document-show-pdf-hint {
    max-width: 110px !important;
    font-size: 5.6px !important;
    line-height: 1.2 !important;
  }

  .ay-document-show-zoom button {
    min-width: 23px !important;
    height: 18px !important;
    padding: 0 4px !important;
    font-size: 8px !important;
  }

  .ay-document-show-image-caption {
    margin-top: 7px !important;
    font-size: 7px !important;
  }

  .ay-document-show-information {
    width: calc(100% - 58px) !important;
    max-width: 100% !important;
    margin: 30px auto 0 !important;
    padding: 0 !important;
  }

  .ay-document-show-metadata {
    margin: 0 0 26px !important;
    padding: 0 0 24px !important;
  }

  .ay-document-show-metadata > div {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    column-gap: 7px !important;
    margin-bottom: 7px !important;
  }

  .ay-document-show-metadata dt,
  .ay-document-show-metadata dd {
    font-size: 10.5px !important;
    line-height: 1.45 !important;
  }

  .ay-document-show-description,
  .ay-document-show-description p {
    font-size: 11.5px !important;
    line-height: 1.56 !important;
  }

  .ay-document-show-description p {
    margin-bottom: 14px !important;
  }

  .ay-document-show-citation,
  .ay-document-show-credit {
    font-size: 8px !important;
    line-height: 1.45 !important;
  }

  .ay-document-show-citation {
    margin-top: 30px !important;
  }

  /* ---------------------------------------------------------
     DOCUMENTOS RELACIONADOS INFERIORES
     --------------------------------------------------------- */
  .ay-document-show-cards {
    width: 100% !important;
    margin: 80px 0 0 !important;
    padding: 48px 0 0 !important;
  }

  .ay-document-show-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    row-gap: 34px !important;
    column-gap: 0 !important;
    width: 100% !important;
  }

  .ay-document-show-card {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .ay-document-show-card + .ay-document-show-card {
    padding-top: 34px !important;
    border-top: 1.3px solid var(--ay-document-magenta) !important;
  }

  .ay-document-show-card > h3 {
    min-height: 0 !important;
    margin: 0 0 18px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .ay-document-show-card-link {
    width: 100% !important;
    padding: 0 !important;
    border-bottom: 0 !important;
  }

  .ay-document-show-card-link::after {
    display: none !important;
  }

  .ay-document-show-card-thumb,
  .ay-document-show-card-placeholder {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 141 / 200 !important;
    margin: 0 0 14px !important;
  }

  .ay-document-show-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
  }

  .ay-document-show-card-link h4 {
    margin-bottom: 8px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  .ay-document-show-card-link p,
  .ay-document-show-card-link span {
    margin-bottom: 6px !important;
    color: var(--ay-document-magenta) !important;
    font-size: 9.5px !important;
    line-height: 1.4 !important;
  }

  /* ---------------------------------------------------------
     CONTACTO Y FOOTER — MISMO CIERRE DE ARTISTA
     --------------------------------------------------------- */
  .ay-document-show-mobile-contact {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 54px 24px 42px !important;
    color: var(--ay-document-lavender) !important;
    background:
      linear-gradient(
        180deg,
        #721451 0%,
        #84205f 20%,
        #8f4f9f 58%,
        var(--ay-document-lavender) 100%
      ) !important;
    text-align: center !important;
    overflow: hidden !important;
    border: 0 !important;
  }

  .ay-document-show-mobile-contact h2 {
    margin: 0 0 34px !important;
    padding: 0 !important;
    color: var(--ay-document-lavender) !important;
    font-size: 25px !important;
    line-height: 1 !important;
    letter-spacing: 0.025em !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
  }

  .ay-document-show-contact-item {
    margin: 0 0 20px !important;
    color: var(--ay-document-lavender) !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .ay-document-show-contact-item span,
  .ay-document-show-contact-item a {
    display: block !important;
    color: var(--ay-document-lavender) !important;
  }

  .ay-document-show-contact-item a {
    font-size: 12px !important;
    line-height: 1.25 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    overflow-wrap: anywhere !important;
  }

  .ay-document-show-mobile-socials {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 48px !important;
    margin: 42px 0 0 !important;
    padding: 0 !important;
  }

  .ay-document-show-mobile-socials a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
  }

  .ay-document-show-mobile-socials img {
    display: block !important;
    width: 42px !important;
    height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    filter: var(--ay-document-lavender-filter) !important;
  }

  .ay-document-show-donate {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  .ay-document-show-footer {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 24px 34px !important;
    color: var(--ay-document-purple) !important;
    background: var(--ay-document-lavender) !important;
    text-align: center !important;
  }

  .ay-document-show-footer::before {
    content: "" !important;
    display: block !important;
    width: min(342px, 100%) !important;
    height: 1px !important;
    margin: 0 auto 12px !important;
    background: var(--ay-document-purple) !important;
  }

  .ay-document-show-footer-row {
    display: block !important;
    width: min(342px, 100%) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    color: var(--ay-document-purple) !important;
    font-size: 11.5px !important;
    line-height: 1.28 !important;
    text-align: center !important;
  }

  .ay-document-show-footer-row span,
  .ay-document-show-footer-row a {
    display: inline !important;
    color: var(--ay-document-purple) !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-decoration: none !important;
  }
}

/* Fallback para navegadores sin :has(). */
body.ay-document-show-body .ay-document-show-page {
  display: block !important;
}


/* =========================================================
   12) PROTECCIÓN DE IMPRESIÓN
   ========================================================= */
@media print {
  .ay-document-show-document-stage,
  .ay-document-show-toolbar,
  .ay-document-show-image-caption,
  .ay-document-show-cards,
  .ay-document-show-socials,
  .ay-document-show-fixed-side-label,
  .ay-document-show-donate,
  .ay-document-show-footer {
    display: none !important;
  }

  .ay-document-show-document::before {
    content: "Documento disponible únicamente para consulta en línea." !important;
    display: block !important;
    margin: 24px 0 !important;
    padding: 24px !important;
    border: 1px solid var(--ay-document-magenta) !important;
    color: var(--ay-document-dark) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    text-align: center !important;
  }
}

/* AY_DOCUMENT_SECURE_PAGE_VIEWER_BEGIN */

/*
 * El iframe ya no contiene el PDF original.
 * Contiene un visor HTML con páginas rasterizadas y scroll.
 */
.ay-document-show-page-unit.is-pdf {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.ay-document-show-pdf-frame {
  display: block !important;
  width: 100% !important;
  height: min(84vh, 980px) !important;
  min-height: 720px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  outline: 0 !important;
  background: #d8d8d8 !important;
}

@media (max-width: 767px) {
  .ay-document-show-pdf-frame {
    height: clamp(390px, 54dvh, 460px) !important;
    min-height: 390px !important;
  }
}

@media print {
  .ay-document-show-pdf-frame,
  .ay-document-show-document-stage {
    display: none !important;
    visibility: hidden !important;
  }
}

/* AY_DOCUMENT_SECURE_PAGE_VIEWER_END */

/* =========================================================
   AJUSTE PUNTUAL — MENÚ MÓVIL ABIERTO
   Reduce únicamente la distancia entre los íconos sociales
   y el footer dentro del menú desplegado.
   No modifica la vista normal de la ficha.
   ========================================================= */
@media (max-width: 767px) {
  .ay-document-show-menu[open]
  .ay-document-show-menu-contact {
    height: auto !important;
    min-height: 0 !important;
  }

  .ay-document-show-menu[open]
  .ay-document-show-menu-footer {
    margin: 30px auto 0 !important;
  }
}
