/* =========================================================
   GALLERY PAGE HERO
   Reemplaza al cartel, pero sigue funcionando como hero
   ========================================================= */

.gallery-page-hero {
  display: flex;
  align-items: center;
  min-height: clamp(260px, 38vw, 420px);
  padding: 7.5rem 0 4rem;
}

.gallery-page-hero__inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.gallery-page-hero__eyebrow {
  margin: 0 0 0.7rem;
  color: var(--color-secondary);
  font-size: clamp(0.95rem, 1.15vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gallery-page-hero__title {
  margin: 0;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: clamp(3rem, 6.5vw, 6.6rem);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.gallery-page-hero__lead {
  margin: 0.9rem 0 0;
  color: var(--color-text);
  font-size: clamp(1.15rem, 1.55vw, 1.8rem);
  line-height: 1.25;
}

/* -------------------------
   TABLET
   ------------------------- */

@media (max-width: 1100px) {
  .gallery-page-hero {
    min-height: 240px;
    padding: 7rem 0 3.2rem;
  }

  .gallery-page-hero__inner {
    max-width: 860px;
  }

  .gallery-page-hero__title {
    font-size: clamp(2.8rem, 8vw, 5.4rem);
  }

  .gallery-page-hero__lead {
    font-size: 1.2rem;
  }
}

/* -------------------------
   MOBILE
   ------------------------- */

@media (max-width: 700px) {
  .gallery-page-hero {
    min-height: 200px;
    padding: 6.3rem 0 2.4rem;
  }

  .gallery-page-hero__eyebrow {
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
  }

  .gallery-page-hero__title {
    font-size: clamp(2.2rem, 13vw, 3.8rem);
    line-height: 0.98;
  }

  .gallery-page-hero__lead {
    margin-top: 0.7rem;
    font-size: 1rem;
    line-height: 1.35;
  }
}

/* =========================================================
   PAST EDITION
   ========================================================= */

.past-edition {
  padding: 4.8rem 0 4.4rem;
}

.past-edition [hidden] {
  display: none !important;
}

.past-edition__intro {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 500px);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.past-edition__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.past-edition__badge {
  position: relative;
  width: min(100%, 760px);
  margin-bottom: 1.4rem;
  z-index: 1;
}

.past-edition__badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100vw;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0 34px 34px 0;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  z-index: -1;
}

.past-edition__badge span {
  display: inline-flex;
  align-items: center;
  min-height: 78px;
  padding: 0 2rem 0 1.6rem;
  color: var(--color-primary);
  font-size: clamp(1.3rem, 1.8vw, 2rem);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
}

.past-edition__text {
  max-width: 640px;
}

.past-edition__text p {
  margin: 0;
  color: var(--color-text);
  font-size: clamp(1.05rem, 1.2vw, 1.3rem);
  line-height: 1.45;
}

.past-edition__poster-wrap {
  display: flex;
  justify-content: flex-end;
}

.past-edition__poster {
  width: 100%;
  max-width: 500px;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #d9d9d9;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.past-edition__poster:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.past-edition__poster img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* =========================
   MASONRY
   ========================= */

.past-edition__masonry {
  column-count: 4;
  column-gap: 1.2rem;
}

.past-edition__item {
  break-inside: avoid;
  display: block;
  width: 100%;
  margin-bottom: 1.2rem;
  position: relative;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #d9d9d9;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.past-edition__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  z-index: 10;
}

.past-edition__item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.past-edition__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.past-edition__play i {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.4rem;
}

.past-edition__item--embed {
  cursor: default;
}

.past-edition__embed,
.past-edition__embed iframe {
  width: 100%;
  display: block;
  border: 0;
}

.past-edition__actions {
  display: flex;
  justify-content: center;
  margin-top: 1.8rem;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

.past-edition-lightbox {
  position: fixed;
  inset: 0;
  z-index: 6000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.past-edition-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.past-edition-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
}

.past-edition-lightbox__dialog {
  position: absolute;
  inset: 1.5rem;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  gap: 1rem;
  align-items: center;
}

.past-edition-lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
}

.past-edition-lightbox__stage img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border: 0;
}

.past-edition-lightbox__stage video {
  width: min(92vw, 1400px);
  max-height: 82vh;
  display: block;
  background: #000;
  border: 0;
}

.past-edition-lightbox__stage iframe {
  width: min(92vw, 1400px);
  aspect-ratio: 16 / 9;
  max-height: 82vh;
  display: block;
  border: 0;
  background: #000;
}

.past-edition-lightbox__close,
.past-edition-lightbox__nav {
  border: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
}

.past-edition-lightbox__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
}

.past-edition-lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  width: min(90vw, 900px);
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.35;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
  .past-edition__intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .past-edition__copy {
    align-items: center;
  }

  .past-edition__poster-wrap {
    justify-content: center;
  }

  .past-edition__badge {
    width: auto;
  }

  .past-edition__badge::before {
    display: none;
  }

  .past-edition__badge span {
    min-height: 58px;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    justify-content: center;
    text-align: center;
  }

  .past-edition__text {
    max-width: 760px;
  }

  .past-edition__text p {
    text-align: left;
  }

  .past-edition__masonry {
    column-count: 3;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
  .past-edition {
    padding: 3.6rem 0 3rem;
  }

  .past-edition__intro {
    gap: 1.2rem;
    margin-bottom: 1.4rem;
  }

  .past-edition__badge span {
    min-height: 54px;
    padding: 0.9rem 1.35rem;
    font-size: clamp(1rem, 5vw, 1.3rem);
  }

  .past-edition__text p {
    font-size: 1rem;
    line-height: 1.4;
  }

  .past-edition__masonry {
    column-count: 2;
    column-gap: 0.85rem;
  }

  .past-edition__item {
    margin-bottom: 0.85rem;
    border-radius: 10px;
  }

  .past-edition-lightbox__dialog {
    inset: 1rem;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 0.5rem;
  }

  .past-edition-lightbox__stage img,
  .past-edition-lightbox__stage iframe,
  .past-edition-lightbox__stage video {
    max-height: 72vh;
  }

  .past-edition-lightbox__close,
  .past-edition-lightbox__nav {
    width: 42px;
    height: 42px;
  }
}

.past-edition__preview-video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #cfcfcf;
}

.past-edition__masonry-wrap {
  position: relative;
}

.past-edition__masonry {
  column-count: 4;
  column-gap: 1.2rem;
  max-height: 980px;
  overflow: hidden;
  transition: max-height 0.45s ease;
}

.past-edition__masonry.is-expanded {
  max-height: none;
}

/* =========================
   PATCH #1
   ========================= */

/* =========================
   MASONRY / AUTO LAYOUT
   ========================= */
.past-edition__masonry {
  --gallery-row: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: var(--gallery-row);
  gap: 1.2rem;
}

.past-edition__masonry.is-expanded {
  max-height: none;
}

.past-edition__item {
  display: block;
  width: 100%;
  position: relative;
  border: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #d9d9d9;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.past-edition__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  z-index: 10;
}

.past-edition__item img,
.past-edition__preview-video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #cfcfcf;
}

.past-edition__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.past-edition__play i {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.4rem;
}

.past-edition__item--embed {
  cursor: default;
}

.past-edition__embed {
  width: 100%;
  display: block;
  overflow: hidden;
  background: #d9d9d9;
}

.past-edition__embed iframe {
  width: 100%;
  display: block;
  border: 0;
  aspect-ratio: 9 / 16;
  min-height: 420px;
  background: #d9d9d9;
}

.past-edition__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */

.past-edition-lightbox {
  position: fixed;
  inset: 0;
  z-index: 6000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.past-edition-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.past-edition-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.84);
}

.past-edition-lightbox__dialog {
  position: absolute;
  inset: 1.5rem;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  gap: 1rem;
  align-items: center;
}

.past-edition-lightbox__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 1rem 0;
}

.past-edition-lightbox__stage img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border: 0;
}

.past-edition-lightbox__stage video {
  width: min(92vw, 1400px);
  max-height: 82vh;
  display: block;
  background: #000;
  border: 0;
}

.past-edition-lightbox__stage iframe {
  width: min(92vw, 1400px);
  aspect-ratio: 16 / 9;
  max-height: 82vh;
  display: block;
  border: 0;
  background: #000;
}

.past-edition-lightbox__close,
.past-edition-lightbox__nav {
  border: 0;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  color: var(--color-primary);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.past-edition-lightbox__close:hover,
.past-edition-lightbox__nav:hover {
  transform: translateY(-2px);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.past-edition-lightbox__close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 3;
}

.past-edition-lightbox__nav i,
.past-edition-lightbox__close i {
  font-size: 1rem;
  line-height: 1;
}

.past-edition-lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: 0.5rem;
  transform: translateX(-50%);
  width: min(90vw, 900px);
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.35;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
  .past-edition__intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .past-edition__copy {
    align-items: center;
  }

  .past-edition__poster-wrap {
    justify-content: center;
  }

  .past-edition__badge {
    width: auto;
  }

  .past-edition__badge::before {
    display: none;
  }

  .past-edition__badge span {
    min-height: 58px;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    justify-content: center;
    text-align: center;
  }

  .past-edition__text {
    max-width: 760px;
  }

  .past-edition__text p {
    text-align: left;
  }

  .past-edition__masonry {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .past-edition__embed iframe {
    min-height: 360px;
  }

  .past-edition-lightbox__dialog {
    inset: 1rem;
    grid-template-columns: minmax(0, 1fr);
  }

  .past-edition-lightbox__nav {
    display: none;
  }

  .past-edition-lightbox__stage {
    padding: 2rem 0 3.5rem;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
  .past-edition {
    padding: 3.6rem 0 3rem;
  }

  .past-edition__intro {
    gap: 1.2rem;
    margin-bottom: 1.4rem;
  }

  .past-edition__badge span {
    min-height: 54px;
    padding: 0.9rem 1.35rem;
    font-size: clamp(1rem, 5vw, 1.3rem);
  }

  .past-edition__text p {
    font-size: 1rem;
    line-height: 1.4;
  }

  .past-edition__masonry {
    max-height: 760px;
  }

  .past-edition__masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .past-edition__item {
    border-radius: 10px;
  }

  .past-edition__play i {
    width: 54px;
    height: 54px;
    font-size: 1.1rem;
  }

  .past-edition__embed iframe {
    min-height: 280px;
  }

  .past-edition-lightbox__dialog {
    inset: 0.75rem;
  }

  .past-edition-lightbox__stage {
    padding: 2.5rem 0 4.2rem;
  }

  .past-edition-lightbox__stage img,
  .past-edition-lightbox__stage iframe,
  .past-edition-lightbox__stage video {
    max-height: 68vh;
  }

  .past-edition-lightbox__close {
    width: 44px;
    height: 44px;
    top: 0;
    right: 0;
  }

  .past-edition-lightbox__caption {
    font-size: 0.92rem;
    line-height: 1.35;
    bottom: 0.2rem;
  }
}