.event-gallery-page {
  background: #f4f4f4;
  color: #151515;
  min-height: calc(100vh - 90px);
}

.event-gallery-header {
  max-width: 980px;
}

.event-gallery-kicker {
  color: #df1f29;
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.event-gallery-header h1 {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 18px;
}

.event-gallery-section {
  max-width: 1180px;
}

.event-gallery-feeds {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.event-gallery-card {
  background: #fff;
  border: 1px solid rgba(21, 21, 21, .1);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(21, 21, 21, .08);
  overflow: hidden;
}

.event-gallery-card__media {
  background: #151515;
  border: 0;
  cursor: pointer;
  display: block;
  margin: 0;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.event-gallery-card__media img {
  aspect-ratio: 1;
  display: block;
  height: auto;
  object-fit: cover;
  transition: filter .2s ease, transform .2s ease;
  width: 100%;
}

.event-gallery-card__media:hover img,
.event-gallery-card__media:focus-visible img {
  filter: brightness(.86);
  transform: scale(1.025);
}

.event-gallery-card__media:focus-visible {
  outline: 2px solid #df1f29;
  outline-offset: -2px;
}

.event-gallery-card__body {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.event-gallery-card__meta,
.event-gallery-empty span {
  color: #df1f29;
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.event-gallery-card h2 {
  font-size: 24px;
  line-height: 1.05;
  margin: 0;
}

.event-gallery-card strong,
.event-gallery-empty p {
  color: #555;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

.event-gallery-card strong {
  color: #151515;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.event-gallery-empty {
  background: #fff;
  border: 1px solid rgba(21, 21, 21, .1);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(21, 21, 21, .08);
  grid-column: 1 / -1;
  padding: 32px;
}

.event-gallery-empty h2 {
  font-size: 26px;
  line-height: 1.05;
  margin: 10px 0;
}

.event-gallery-empty--error {
  border-color: rgba(223, 31, 41, .3);
}

.gallery-section {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  width: 100%;
}

#galeria {
  display: grid;
  gap: 2px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 auto;
  max-width: none;
  padding: 2px;
  width: 100%;
}

#galeria img {
  aspect-ratio: 1;
  background: #111;
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  cursor: pointer;
  border-radius: 0;
  transition: filter 0.2s ease;
}

#galeria img:hover {
  filter: brightness(.86);
} 

#galeria > * {
  margin: 0;
  padding: 0;
  display: block;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  display: flex;
  background-color: #1e1e1e;
  max-width: 900px;
  width: 90%;
  height: 80%;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.gallery-modal-button {
  position: absolute;
  z-index: 3;
  align-items: center;
  border: 0;
  padding: 0;
  background-color: transparent;
  cursor: pointer;
  display: flex;
  justify-content: center;
  opacity: 0.88;
}

.gallery-modal-button:hover,
.gallery-modal-button:focus-visible {
  opacity: 1;
  outline: none;
}

.gallery-modal-button img {
  display: block;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  width: 100%;
}

.gallery-modal-close {
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
}

.gallery-modal-prev,
.gallery-modal-next {
  top: 50%;
  width: 50px;
  height: 55px;
  transform: translateY(-50%);
}

.gallery-modal-prev {
  left: 6px;
}

.gallery-modal-next {
  right: calc(40% + 6px);
}

.modal-body {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
}

.modal-body img {
  width: 60%;
  height: 100%;
  object-fit: cover;
}

.modal-desc {
  width: 40%;
  padding: 20px;
  color: white;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-desc h3 {
  margin-top: 0;
  color: #ffcc00;
}

.modal-desc p {
  margin: 10px 0;
}

.event-image-modal .modal-content {
  background: #111;
  height: min(88vh, 900px);
}

.event-image-modal .modal-body img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.event-image-modal .gallery-modal-next {
  right: 6px;
}

.gallery-maintenance-page {
  background: #151515;
  min-height: calc(100vh - 92px);
  padding: 6em 0 0;
}

.gallery-maintenance {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 92px);
  overflow: hidden;
  position: relative;
}

.gallery-maintenance__media,
.gallery-maintenance__overlay {
  inset: 0;
  position: absolute;
}

.gallery-maintenance__media {
  background-position: center;
  background-size: cover;
  filter: saturate(.92);
  transform: scale(1.03);
}

.gallery-maintenance__overlay {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .84), rgba(0, 0, 0, .52) 58%, rgba(0, 0, 0, .28)),
    radial-gradient(circle at 78% 30%, rgba(223, 31, 41, .2), transparent 34%);
}

.gallery-maintenance__content {
  color: #fff;
  max-width: 790px;
  padding: 178px 7vw 96px;
  position: relative;
  z-index: 2;
}

.gallery-maintenance__content span {
  color: #df1f29;
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.gallery-maintenance__content h1 {
  color: #fff;
  font-size: clamp(44px, 8vw, 92px);
  line-height: .95;
  margin: 0 0 24px;
  max-width: 900px;
}

.gallery-maintenance__content p {
  color: rgba(255, 255, 255, .84);
  font-size: 21px;
  line-height: 1.55;
  margin: 0 0 32px;
  max-width: 680px;
}

.gallery-maintenance__content a {
  background: #df1f29;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  margin: 0 10px 10px 0;
  padding: 15px 18px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .event-gallery-feeds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .event-gallery-header h1 {
    font-size: 38px;
  }

  .event-gallery-feeds {
    grid-template-columns: 1fr;
  }

  .ms-container .gallery-section {
    margin: 18px 0 3em;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
  }

  #galeria {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
    padding: 0;
    width: 100%;
  }

  .modal-content {
    flex-direction: column;
    width: 94%;
    height: auto;
    max-height: 90%;
  }

  .modal-body {
    flex-direction: column;
  }

  .modal-body img,
  .modal-desc {
    width: 100%;
    height: auto;
  }

  .modal-body img {
    max-height: 58vh;
  }

  .gallery-modal-close {
    top: 8px;
    right: 8px;
  }

  .gallery-modal-prev,
  .gallery-modal-next {
    top: 29vh;
  }

  .gallery-modal-prev {
    left: 4px;
  }

  .gallery-modal-next {
    right: 4px;
  }

  .gallery-maintenance,
  .gallery-maintenance-page {
    min-height: calc(100vh - 74px);
  }

  .gallery-maintenance__content {
    padding: 150px 24px 72px;
  }

  .gallery-maintenance__content h1 {
    font-size: 42px;
  }

  .gallery-maintenance__content p {
    font-size: 16px;
  }
}
