/* Galería — adaptación de la nueva identidad Eventos Puebla */

.gallery-page {
  color: var(--ep-text);
  background: var(--ep-black);
}

.gallery-page .page-main {
  overflow: hidden;
  padding-top: 84px;
}

.gallery-page .page-main > .block {
  margin-bottom: 0 !important;
  opacity: 1;
}

.gallery-page .block--title {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 90px 0 80px;
  background: url('../images/17.jpg') center 46% / cover no-repeat;
}

.gallery-page .block--title::before,
.gallery-page .block--title::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
}

.gallery-page .block--title::before {
  background: linear-gradient(90deg, rgba(3, 2, 6, .98), rgba(3, 2, 6, .78) 58%, rgba(1, 38, 144, .4));
}

.gallery-page .block--title::after {
  opacity: .2;
  background-image: linear-gradient(rgba(79, 136, 255, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 136, 255, .14) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}

.gallery-page .block--title h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(40px, 4.8vw, 66px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.08;
  text-transform: uppercase;
}

.gallery-page .block--title h1 .icon {
  display: inline-grid;
  width: 57px;
  height: 57px;
  place-items: center;
  margin: 0 17px 0 0;
  padding: 0;
  border: 1px solid rgba(79, 136, 255, .48);
  border-radius: 12px;
  color: #8fb0ff !important;
  background: rgba(2, 71, 227, .11);
  font-size: 27px;
  line-height: 1;
  vertical-align: 9px;
}

.gallery-page .block--title h1 .icon::before {
  color: currentColor !important;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
}

.gallery-page .breadcrumbs {
  padding: 8px 17px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: #bec5d1;
  background: rgba(3, 2, 6, .62);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.5;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.gallery-page .breadcrumbs a {
  color: #7fa8ff;
}

.gallery-page .breadcrumbs li:not(:last-child)::after {
  color: #4f88ff;
}

/* Filtros y rejilla original de veinte fotografías */
.gallery-page .block--full.no-pad-gutter {
  position: relative;
  padding: 84px 0 110px;
  background: var(--ep-black);
}

.gallery-page .block--full.no-pad-gutter::before {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
  background: radial-gradient(circle at 50% 0, rgba(2, 71, 227, .15), transparent 38%);
}

.gallery-page .block--full.no-pad-gutter > .container {
  position: relative;
  width: min(calc(100% - 48px), var(--ep-container));
  padding: 0;
}

.gallery-page .filtr-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}

.gallery-page .filtr-row li {
  position: relative;
  margin: 0;
  padding: 10px 17px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 999px;
  color: #aeb6c4;
  background: rgba(17, 21, 28, .82);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.gallery-page .filtr-row li::after {
  display: none;
}

.gallery-page .filtr-row li:hover,
.gallery-page .filtr-row li:focus-visible,
.gallery-page .filtr-row li.active {
  border-color: rgba(79, 136, 255, .62);
  color: #fff;
  background: rgba(2, 71, 227, .2);
}

.gallery-page .filtr-row li:hover {
  transform: translateY(-2px);
}

.gallery-page .row.gallery-grid {
  display: block;
  margin: 0;
}

.gallery-page .row.gallery-grid::before,
.gallery-page .row.gallery-grid::after,
.gallery-page .filtr-container::before,
.gallery-page .filtr-container::after {
  display: none;
  content: none;
}

.gallery-page .filtr-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  height: auto !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.gallery-page .filtr-item {
  position: relative !important;
  inset: auto !important;
  display: block;
  width: auto !important;
  padding: 0;
  float: none;
  opacity: 1 !important;
  transform: none !important;
}

.gallery-page .filtr-item[hidden] {
  display: none !important;
}

.gallery-page .gallery-grid-item {
  position: relative;
  height: 100%;
  min-height: 260px;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  background: var(--ep-panel);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .26);
  transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

.gallery-page .gallery-grid-item::before {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: '';
  background: var(--ep-gradient);
  transform: scaleX(.28);
  transform-origin: left;
  transition: transform .22s ease;
}

.gallery-page .gallery-grid-item:hover {
  border-color: rgba(79, 136, 255, .46);
  box-shadow: 0 22px 52px rgba(0, 0, 0, .42);
  transform: translateY(-5px);
}

.gallery-page .gallery-grid-item:hover::before {
  transform: scaleX(1);
}

.gallery-page .open-popup-image {
  position: relative;
  display: block;
  height: 100%;
  min-height: 260px;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-page .open-popup-image::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(0deg, rgba(3, 2, 6, .92), rgba(3, 2, 6, .04) 68%);
  pointer-events: none;
}

.gallery-page .open-popup-image > img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  filter: saturate(.72) contrast(1.07);
  transition: filter .3s ease, transform .5s ease;
}

.gallery-page .gallery-grid-item:hover .open-popup-image > img {
  filter: saturate(1) contrast(1.08);
  transform: scale(1.05);
}

.gallery-page .open-popup-image > .gallery-grid-item-title {
  position: absolute;
  z-index: 2;
  right: 22px;
  bottom: 20px;
  left: 22px;
  padding: 0;
  color: #fff;
  background: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.45;
  text-align: left;
  text-transform: uppercase;
  transition: opacity .2s ease, transform .2s ease;
}

.gallery-page .gallery-grid-item-caption {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(145deg, rgba(1, 38, 144, .88), rgba(3, 2, 6, .92));
  opacity: 0;
  transform: none;
  transition: opacity .24s ease;
}

.gallery-page .gallery-grid-item:hover .gallery-grid-item-caption,
.gallery-page .open-popup-image:focus-visible .gallery-grid-item-caption {
  opacity: 1;
}

.gallery-page .gallery-grid-item:hover .open-popup-image > .gallery-grid-item-title {
  opacity: 0;
  transform: translateY(5px);
}

.gallery-page .gallery-grid-item-caption .gallery-grid-item-title {
  position: static;
  padding: 0;
  color: #fff;
  background: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.45;
  text-align: center;
  text-transform: uppercase;
}

.gallery-page .link-social {
  display: flex;
  gap: 9px;
}

.gallery-page .link-social a {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  color: #fff;
  background: rgba(3, 2, 6, .28);
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.gallery-page .link-social a:hover {
  border-color: #8fb0ff;
  background: rgba(2, 71, 227, .46);
}

.gallery-page .offset-60 {
  margin-top: 52px;
}

.gallery-page .btn.btn--border {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border: 1px solid rgba(79, 136, 255, .62);
  border-radius: 8px;
  color: #fff;
  background: rgba(2, 71, 227, .12);
  box-shadow: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.gallery-page .btn.btn--border::before,
.gallery-page .btn.btn--border::after,
.gallery-page .btn.btn--border span::before,
.gallery-page .btn.btn--border span::after {
  display: none;
}

.gallery-page .btn.btn--border span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit !important;
}

.gallery-page .btn.btn--border:hover {
  color: #fff;
  background: var(--ep-gradient);
  box-shadow: 0 14px 34px rgba(2, 71, 227, .3);
  transform: translateY(-2px);
}

.gallery-page .bannercolor {
  display: none;
}

/* Llamado final; se conserva su contenido original */
.gallery-page .block-bg-101 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 410px;
  margin: 0;
  padding: 100px 0;
  background: url('../images/06.jpg') center 52% / cover fixed no-repeat;
}

.gallery-page .block-bg-101::before,
.gallery-page .block-bg-101::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: '';
}

.gallery-page .block-bg-101::before {
  background: rgba(3, 2, 6, .82);
}

.gallery-page .block-bg-101::after {
  background: linear-gradient(115deg, rgba(3, 2, 6, .22), rgba(1, 38, 144, .28) 58%, rgba(3, 2, 6, .52));
}

.gallery-page .block-bg-101 .container {
  width: min(calc(100% - 48px), var(--ep-container));
  padding: 0;
}

.gallery-page .block-bg-101 .title-wrap {
  width: auto;
  margin: 0 auto;
  padding: 0;
}

.gallery-page .block-bg-101 .title-wrap::before {
  display: block;
  width: 44px;
  height: 2px;
  margin: 0 auto 20px;
  content: '';
  background: var(--ep-blue-light);
  box-shadow: 0 0 15px rgba(34, 101, 214, .7);
}

.gallery-page .block-bg-101 h2.negro {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 800;
  letter-spacing: -.03em;
}

.gallery-page .block-bg-101 .p--lg.negro {
  max-width: 780px;
  margin: 0 auto;
  color: #c7cdd8;
  font-size: 18px;
  line-height: 1.7;
}

.gallery-page .block-bg-101 .offset-30 {
  margin-top: 30px;
}

/* Visor accesible y ligero para las mismas imágenes */
.gallery-lightbox {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(3, 2, 6, .94);
  backdrop-filter: blur(10px);
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__frame {
  position: relative;
  display: grid;
  width: min(1120px, 100%);
  max-height: calc(100vh - 68px);
  place-items: center;
}

.gallery-lightbox__image {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 68px);
  border: 1px solid rgba(79, 136, 255, .42);
  border-radius: 10px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .72);
}

.gallery-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  color: #fff;
  background: rgba(3, 2, 6, .78);
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 1060px) {
  .gallery-page .filtr-container { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .gallery-page .page-main { padding-top: 72px; }
  .gallery-page .block--title { padding: 70px 0 62px; }
  .gallery-page .block--title h1 .icon { display: grid; margin: 0 auto 18px; vertical-align: 0; }
  .gallery-page .block--full.no-pad-gutter { padding: 64px 0 82px; }
  .gallery-page .filtr-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-page .gallery-grid-item,
  .gallery-page .open-popup-image,
  .gallery-page .open-popup-image > img { min-height: 245px; }
  .gallery-page .block-bg-101 { min-height: 360px; padding: 82px 0; background-attachment: scroll; }
}

@media (max-width: 520px) {
  .gallery-page .block--full.no-pad-gutter > .container,
  .gallery-page .block-bg-101 .container { width: min(calc(100% - 32px), var(--ep-container)); }
  .gallery-page .filtr-row { align-items: stretch; flex-direction: column; }
  .gallery-page .filtr-row li { text-align: center; }
  .gallery-page .filtr-container { grid-template-columns: 1fr; }
  .gallery-page .gallery-grid-item,
  .gallery-page .open-popup-image,
  .gallery-page .open-popup-image > img { min-height: 285px; }
  .gallery-lightbox { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-page .gallery-grid-item,
  .gallery-page .open-popup-image > img,
  .gallery-page .filtr-row li { transition: none; }
  .gallery-page .block-bg-101 { background-attachment: scroll; }
}
