/* ======================================================================
   DMT Cádiz 2026 · La Gala · responsive definitivo 3.23.13
   Esta hoja se carga la última para neutralizar posiciones históricas.
   ====================================================================== */

html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-glow {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin-top: 180px !important;
  z-index: -1;
  background-color: transparent !important;
  background-image: var(--dmt-element-multicolor) !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: 100% 100% !important;
  opacity: .82 !important;
  filter: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
}

@media (max-width: 1050px) {
  html body .dmt-site section#gala.pdf-gala.pdf-sheet {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-heading-line,
  html body .dmt-site section#gala.pdf-gala > h3,
  html body .dmt-site section#gala.pdf-gala > .pdf-gala-intro {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  html body .dmt-site section#gala.pdf-gala > h3 {
    white-space: normal !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-gala-grid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 38px 0 0 !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    grid-auto-flow: row !important;
    align-items: stretch !important;
    gap: 11px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  /* Igualamos y superamos la especificidad de las posiciones de escritorio. */
  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > :is(
    :nth-child(1), :nth-child(2), :nth-child(3), :nth-child(4),
    :nth-child(5), :nth-child(6), :nth-child(7), :nth-child(8),
    :nth-child(9), :nth-child(10), :nth-child(11)
  ) {
    position: relative !important;
    inset: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-glow {
    grid-column: span 2 !important;
    min-height: 205px !important;
    margin-top: 0 !important;
    z-index: -1;
    background-color: transparent !important;
    background-image: var(--dmt-element-multicolor) !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    background-size: 100% 100% !important;
    opacity: .82 !important;
    filter: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-gala-gradient,
  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > figure {
    min-height: 205px !important;
    aspect-ratio: 1 / 1 !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > figure {
    position: relative !important;
    overflow: hidden !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > figure > img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-gala-card {
    min-height: 220px !important;
    padding: 17px !important;
    overflow: hidden !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > p {
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: auto !important;
  }
}

/* Tablet vertical y móvil horizontal: mosaico estable de dos columnas. */
@media (max-width: 820px) {
  html body .dmt-site section#gala.pdf-gala.pdf-sheet {
    width: calc(100% - 20px) !important;
    padding: 46px 22px 40px !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-gala-grid {
    margin-top: 32px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-glow {
    grid-column: 1 / -1 !important;
    min-height: clamp(145px, 24vw, 190px) !important;
    margin-top: 0 !important;
    z-index: -1;
    aspect-ratio: auto !important;
    background-position: left center !important;
    background-size: 100% 100% !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-gala-gradient,
  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > figure {
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-gala-card {
    min-height: clamp(220px, 35vw, 270px) !important;
    padding: clamp(14px, 2.5vw, 19px) !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > b {
    font-size: clamp(29px, 4.8vw, 36px) !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > h4 {
    font-size: clamp(17px, 2.9vw, 21px) !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > p {
    font-size: clamp(12px, 2vw, 15px) !important;
    line-height: 1.24 !important;
  }
}

/* Móvil: se conservan dos columnas, sin solapes ni contenido cortado. */
@media (max-width: 560px) {
  html body .dmt-site section#gala.pdf-gala.pdf-sheet {
    width: calc(100% - 12px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 36px 12px 30px !important;
    border-radius: 18px !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-heading-line {
    grid-template-columns: auto minmax(30px, 1fr) !important;
    gap: 9px !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-heading-line h2 {
    font-size: clamp(39px, 12vw, 50px) !important;
  }

  html body .dmt-site section#gala.pdf-gala > h3 {
    font-size: clamp(21px, 6.8vw, 29px) !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-gala-intro {
    padding: 0 !important;
    background: none !important;
    font-size: clamp(14px, 4.15vw, 17px) !important;
    line-height: 1.38 !important;
    text-align: left !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-gala-grid {
    margin-top: 27px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-glow {
    grid-column: 1 / -1 !important;
    height: clamp(125px, 38vw, 165px) !important;
    min-height: clamp(125px, 38vw, 165px) !important;
    margin-top: 0 !important;
    z-index: -1;
    background-position: left center !important;
    background-size: 100% 100% !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-gala-card {
    min-height: clamp(215px, 65vw, 255px) !important;
    padding: clamp(10px, 3.2vw, 14px) !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > b {
    font-size: clamp(25px, 8vw, 31px) !important;
    line-height: .9 !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > h4 {
    margin: 6px 0 10px !important;
    font-size: clamp(14px, 4.4vw, 18px) !important;
    line-height: 1.05 !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > p {
    margin: auto 0 0 !important;
    font-size: clamp(10px, 3.15vw, 13px) !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 350px) {
  html body .dmt-site section#gala.pdf-gala.pdf-sheet {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }

  html body .dmt-site section#gala.pdf-gala > .pdf-gala-grid {
    gap: 7px !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-grid > .pdf-gala-card {
    min-height: 235px !important;
    padding: 10px !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > h4 {
    font-size: 14px !important;
  }

  html body .dmt-site section#gala.pdf-gala .pdf-gala-card > p {
    font-size: 10px !important;
  }
}
