/* Gallery page
==================================== */
.gallery-hero.title-pages--about::before {
  background:
    linear-gradient(90deg, rgba(10, 27, 47, 0.58) 0%, rgba(10, 27, 47, 0.12) 58%, transparent 100%),
    linear-gradient(0deg, rgba(10, 27, 47, 0.55) 0%, transparent 48%);
}

.gallery-page {
  position: relative;
  overflow: hidden;
  padding: 112px 0 124px;
  background:
    radial-gradient(circle at 8% 9%, rgba(97, 221, 197, 0.13), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f3f7f9 100%);
}

.gallery-page::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(23, 37, 57, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 37, 57, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}

.gallery-page__glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(97, 221, 197, 0.16), transparent 68%);
  animation: galleryGlow 7s ease-in-out infinite alternate;
}

.gallery-page__glow--one {
  top: 70px;
  left: -190px;
}

.gallery-page__glow--two {
  right: -210px;
  bottom: 180px;
  animation-delay: -3.5s;
}

.gallery-page .main-container {
  position: relative;
  z-index: 1;
}

.gallery-page__head {
  display: grid;
  max-width: 940px;
  gap: 22px;
  margin-bottom: 50px;
}

.gallery-page__title {
  gap: 16px;
}

.gallery-page__title .title-hero__mark {
  --cube-size: 13px;
  flex: 0 0 auto;
}

.gallery-page__title .title-hero__mark span {
  background: #61ddc5;
}

.gallery-page__title h2 {
  margin: 0;
  color: #172539;
  font-family: "font_bold";
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.18;
}

.gallery-page__title h2 span {
  display: block;
  margin-bottom: 8px;
  color: #2fbba0;
  font-family: "font_bold";
  font-size: 15px;
  line-height: 1.4;
}

.gallery-page__head > p {
  max-width: 800px;
  margin: 0;
  color: #687582;
  font-family: "font_medium";
  font-size: 17px;
  line-height: 2;
}

.gallery-page__toolbar {
  display: flex;
  margin-bottom: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.gallery-filters button {
  min-height: 44px;
  padding: 8px 19px;
  border: 1px solid rgba(23, 37, 57, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #53606d;
  font-family: "font_bold";
  font-size: 13px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.gallery-filters button:hover,
.gallery-filters button:focus-visible {
  border-color: #61ddc5;
  color: #172539;
  transform: translateY(-2px);
}

.gallery-filters button.is-active {
  border-color: #172539;
  background: #172539;
  color: #fff;
  box-shadow: 0 12px 28px rgba(23, 37, 57, 0.17);
}

.gallery-page__count {
  display: flex;
  margin: 0;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.gallery-page__count strong {
  color: #172539;
  font-family: "font_bold";
  font-size: 28px;
}

.gallery-page__count span {
  color: #7a8691;
  font-family: "font_medium";
  font-size: 12px;
}

.gallery-showcase {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row;
  grid-auto-rows: 225px;
  gap: 18px;
}

.gallery-showcase__item {
  position: relative;
  grid-column: span 4;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #172539;
  color: #fff;
  cursor: zoom-in;
  text-align: right;
  isolation: isolate;
  box-shadow: 0 18px 44px rgba(23, 37, 57, 0.1);
}

.gallery-showcase__item.is-revealing {
  animation: galleryItemIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--gallery-delay, 0ms);
}

.gallery-showcase__item--featured {
  grid-column: span 8;
  grid-row: span 2;
}

.gallery-showcase__item--wide {
  grid-column: span 8;
}

.gallery-showcase__item--full {
  grid-column: span 12;
}

.gallery-showcase__item--tall {
  grid-row: span 2;
}

.gallery-showcase__item.is-filtered-out {
  display: none;
}

.gallery-showcase.is-filtered .gallery-showcase__item {
  grid-column: span 4;
  grid-row: span 1;
}

.gallery-showcase__item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}

.gallery-showcase__overlay {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  min-height: 48%;
  padding: 28px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(transparent, rgba(10, 26, 45, 0.9));
}

.gallery-showcase__overlay > span {
  min-width: 0;
}

.gallery-showcase__overlay small {
  display: block;
  margin-bottom: 7px;
  color: #61ddc5;
  font-family: "font_bold";
  font-size: 11px;
}

.gallery-showcase__overlay strong {
  display: block;
  color: #fff;
  font-family: "font_bold";
  font-size: clamp(16px, 1.6vw, 23px);
  line-height: 1.45;
}

.gallery-showcase__overlay > i {
  width: 44px;
  height: 44px;
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(9px);
  transform: scale(0.88);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.gallery-showcase__item:hover img,
.gallery-showcase__item:focus-visible img {
  filter: saturate(1.08);
  transform: scale(1.075);
}

.gallery-showcase__item:hover .gallery-showcase__overlay > i,
.gallery-showcase__item:focus-visible .gallery-showcase__overlay > i {
  background: #61ddc5;
  color: #172539;
  transform: scale(1);
}

.gallery-showcase__item:focus-visible,
.gallery-filters button:focus-visible,
.gallery-lightbox button:focus-visible {
  outline: 3px solid #61ddc5;
  outline-offset: 3px;
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(4, 12, 22, 0.88);
  cursor: zoom-out;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.gallery-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: #101e30;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.48);
  transform: translateY(22px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-lightbox.is-open .gallery-lightbox__dialog {
  transform: translateY(0) scale(1);
}

.gallery-lightbox__topbar {
  display: grid;
  min-height: 66px;
  padding: 12px 16px 12px 22px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: rgba(255, 255, 255, 0.66);
}

.gallery-lightbox__topbar p {
  margin: 0;
  justify-self: start;
  direction: ltr;
  font-family: "font_medium";
}

.gallery-lightbox__topbar > span {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(97, 221, 197, 0.12);
  color: #61ddc5;
  font-family: "font_bold";
  font-size: 12px;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
  display: inline-flex;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.gallery-lightbox__close {
  width: 42px;
  height: 42px;
  justify-self: end;
  border-radius: 50%;
}

.gallery-lightbox__stage {
  display: grid;
  min-height: 300px;
  padding: 0 18px;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 14px;
}

.gallery-lightbox__stage img {
  width: 100%;
  height: min(66vh, 680px);
  display: block;
  border-radius: 12px;
  background: #091525;
  object-fit: contain;
  user-select: none;
}

.gallery-lightbox__nav {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:not(:disabled):hover {
  background: #61ddc5;
  color: #172539;
  transform: scale(1.05);
}

.gallery-lightbox__nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.gallery-lightbox__caption {
  padding: 22px 82px 26px;
}

.gallery-lightbox__caption h2 {
  margin: 0 0 7px;
  color: #fff;
  font-family: "font_bold";
  font-size: clamp(22px, 2.5vw, 34px);
}

.gallery-lightbox__caption p {
  margin: 0;
  color: rgba(255, 255, 255, 0.63);
  font-family: "font_medium";
  font-size: 14px;
  line-height: 1.8;
}

body.gallery-modal-open {
  overflow: hidden;
}

@keyframes galleryItemIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes galleryGlow {
  to { transform: translate3d(0, 28px, 0) scale(1.06); }
}

@media (max-width: 992px) {
  .gallery-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 220px;
  }

  .gallery-showcase__item {
    grid-column: span 1;
  }

  .gallery-showcase.is-filtered .gallery-showcase__item {
    grid-column: span 1;
  }

  .gallery-showcase__item--featured,
  .gallery-showcase__item--wide,
  .gallery-showcase__item--full {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .gallery-page {
    padding: 78px 0 88px;
  }

  .gallery-page .main-container {
    width: 92%;
  }

  .gallery-page__toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
  }

  .gallery-filters::-webkit-scrollbar {
    display: none;
  }

  .gallery-filters button {
    flex: 0 0 auto;
  }

  .gallery-lightbox {
    padding: 10px;
  }

  .gallery-lightbox__dialog {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .gallery-lightbox__topbar {
    grid-template-columns: 1fr auto 1fr;
  }

  .gallery-lightbox__stage {
    position: relative;
    display: block;
    padding: 0 10px;
  }

  .gallery-lightbox__stage img {
    height: 57vh;
    height: 57dvh;
  }

  .gallery-lightbox__nav {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 44px;
    height: 44px;
    background: rgba(10, 27, 47, 0.76);
    transform: translateY(-50%);
  }

  .gallery-lightbox__nav:hover {
    transform: translateY(-50%) scale(1.04);
  }

  .gallery-lightbox__nav--prev { right: 20px; }
  .gallery-lightbox__nav--next { left: 20px; }

  .gallery-lightbox__caption {
    padding: 20px;
  }
}

@media (max-width: 560px) {
  .gallery-showcase {
    grid-template-columns: 1fr;
    grid-auto-rows: 285px;
  }

  .gallery-showcase__item,
  .gallery-showcase__item--featured,
  .gallery-showcase__item--wide,
  .gallery-showcase__item--full,
  .gallery-showcase__item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-showcase__overlay {
    padding: 22px;
  }

  .gallery-lightbox__topbar > span {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-page *,
  .gallery-page *::before,
  .gallery-page *::after,
  .gallery-lightbox *,
  .gallery-lightbox *::before,
  .gallery-lightbox *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
