.gp-gallery-page {
  --gallery-paper: #f6f2ea;
  --gallery-paper-deep: #ebe3d6;
  --gallery-ink: #1c1d1a;
  --gallery-forest: #243b31;
  --gallery-copper: #8b6f47;
  --gallery-line: rgba(28, 29, 26, 0.14);
  --gallery-header-offset: 74px;
  background: var(--gallery-paper);
  color: var(--gallery-ink);
}

.gp-gallery-page .gp-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(246, 242, 234, 0.94);
  backdrop-filter: blur(18px);
}

.gp-gallery-hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: #151815;
  color: #fff;
}

.gp-gallery-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}

.gp-gallery-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 18, 15, 0.78), rgba(14, 18, 15, 0.38) 50%, rgba(14, 18, 15, 0.18)),
    linear-gradient(180deg, rgba(14, 18, 15, 0.24), rgba(14, 18, 15, 0.7));
}

.gp-gallery-hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 760px;
  align-content: end;
  padding: 140px 0 84px;
}

.gp-gallery-hero .gp-h1 {
  max-width: 780px;
}

.gp-gallery-hero .gp-lead {
  max-width: 650px;
}

.gp-gallery-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.gp-gallery-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 54px;
}

.gp-gallery-pill {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 4px;
  padding: 10px 13px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(12px);
}

.gp-gallery-intro {
  display: grid;
  grid-template-columns: minmax(0, 820px);
  gap: 24px;
  align-items: start;
}

.gp-gallery-intro .gp-h2 {
  color: var(--gallery-ink);
}

.gp-gallery-intro .gp-lead {
  color: rgba(28, 29, 26, 0.74);
}

.gp-gallery-note {
  border-left: 1px solid var(--gallery-line);
  padding: 4px 0 4px 26px;
  color: rgba(28, 29, 26, 0.62);
  font-size: 16px;
  line-height: 1.7;
}

.gp-gallery-filters {
  position: sticky;
  top: var(--gallery-header-offset);
  z-index: 50;
  border-block: 1px solid var(--gallery-line);
  background: rgba(246, 242, 234, 0.88);
  backdrop-filter: blur(18px);
}

.gp-gallery-filters__inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 13px 0;
  scrollbar-width: none;
}

.gp-gallery-filters__inner::-webkit-scrollbar {
  display: none;
}

.gp-gallery-filter {
  flex: 0 0 auto;
  border: 1px solid var(--gallery-line);
  border-radius: 4px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.36);
  color: rgba(28, 29, 26, 0.66);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.45s ease, border-color 0.45s ease, color 0.45s ease;
}

.gp-gallery-filter[aria-pressed="true"] {
  border-color: rgba(36, 59, 49, 0.54);
  background: var(--gallery-forest);
  color: #fff;
}

.gp-gallery-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 92px;
  gap: 14px;
  margin-top: 44px;
}

.gp-gallery-card {
  position: relative;
  grid-column: span 3;
  grid-row: span 3;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  padding: 0;
  background: #ded4c6;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
}

.gp-gallery-card--wide {
  grid-column: span 6;
  grid-row: span 3;
}

.gp-gallery-card--large {
  grid-column: span 6;
  grid-row: span 5;
}

.gp-gallery-card--tall {
  grid-column: span 3;
  grid-row: span 5;
}

.gp-gallery-card--square {
  grid-column: span 4;
  grid-row: span 4;
}

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

.gp-gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.gp-gallery-card::after {
  display: none;
}

.gp-gallery-card:hover img,
.gp-gallery-card:focus-visible img {
  transform: scale(1.035);
  filter: saturate(0.94);
}

.gp-gallery-card:focus-visible {
  outline: 2px solid var(--gallery-copper);
  outline-offset: 3px;
}

.gp-gallery-card__caption {
  display: none;
}

.gp-gallery-card__caption strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}

.gp-gallery-card__caption span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.gp-gallery-card--small-caption .gp-gallery-card__caption span {
  display: none;
}

.gp-gallery-categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 64px;
}

.gp-gallery-category {
  border-top: 1px solid var(--gallery-line);
  padding-top: 20px;
}

.gp-gallery-category strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 500;
}

.gp-gallery-category p {
  margin: 0;
  color: rgba(28, 29, 26, 0.6);
  font-size: 14px;
  line-height: 1.65;
}

.gp-gallery-cta {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: #171917;
  color: #fff;
}

.gp-gallery-cta__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gp-gallery-cta__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 17, 14, 0.8), rgba(13, 17, 14, 0.34));
}

.gp-gallery-cta__content {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 520px;
  align-content: center;
  max-width: 720px;
  padding: 78px 0;
}

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

.gp-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: rgba(23, 25, 23, 0.96);
  color: #fff;
}

.gp-gallery-lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 62px 78px 30px;
}

.gp-gallery-lightbox__image {
  max-width: min(1180px, 100%);
  max-height: calc(100vh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.gp-gallery-lightbox__close,
.gp-gallery-lightbox__nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.35s ease, transform 0.35s ease;
}

.gp-gallery-lightbox__close {
  top: 22px;
  right: 22px;
  width: 42px;
  height: 42px;
  font-size: 26px;
}

.gp-gallery-lightbox__nav {
  top: 50%;
  width: 46px;
  height: 60px;
  transform: translateY(-50%);
  font-size: 34px;
}

.gp-gallery-lightbox__nav--prev {
  left: 22px;
}

.gp-gallery-lightbox__nav--next {
  right: 22px;
}

.gp-gallery-lightbox__close:hover,
.gp-gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.16);
}

.gp-gallery-lightbox__meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  justify-items: end;
  align-items: end;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding: 18px 28px 24px;
}

.gp-gallery-lightbox__title {
  display: none;
}

.gp-gallery-lightbox__caption {
  display: none;
}

.gp-gallery-lightbox__counter {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  white-space: nowrap;
}

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

@media (max-width: 980px) {
  .gp-gallery-page {
    --gallery-header-offset: 124px;
  }
}

@media (max-width: 1100px) {
  .gp-gallery-board {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-auto-rows: 86px;
  }

  .gp-gallery-card,
  .gp-gallery-card--square {
    grid-column: span 4;
    grid-row: span 4;
  }

  .gp-gallery-card--wide,
  .gp-gallery-card--large {
    grid-column: span 8;
    grid-row: span 4;
  }

  .gp-gallery-card--tall {
    grid-column: span 4;
    grid-row: span 5;
  }

  .gp-gallery-intro,
  .gp-gallery-categories {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .gp-gallery-page {
    --gallery-header-offset: 124px;
  }

  .gp-gallery-hero,
  .gp-gallery-hero__content {
    min-height: 640px;
  }

  .gp-gallery-hero__content {
    padding: 112px 0 52px;
  }

  .gp-gallery-hero .gp-h1 {
    font-size: 40px;
    line-height: 1.04;
  }

  .gp-gallery-hero__facts {
    margin-top: 34px;
  }

  .gp-gallery-board {
    display: block;
    margin-top: 32px;
  }

  .gp-gallery-card,
  .gp-gallery-card--wide,
  .gp-gallery-card--large,
  .gp-gallery-card--tall,
  .gp-gallery-card--square {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    margin-bottom: 12px;
  }

  .gp-gallery-card--wide,
  .gp-gallery-card--large {
    aspect-ratio: 4 / 3;
  }

  .gp-gallery-card--tall {
    aspect-ratio: 3 / 4;
  }

  .gp-gallery-card img {
    position: absolute;
    inset: 0;
  }

  .gp-gallery-card__caption {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .gp-gallery-categories {
    margin-top: 42px;
  }

  .gp-gallery-lightbox__stage {
    padding: 66px 14px 20px;
  }

  .gp-gallery-lightbox__image {
    max-height: calc(100vh - 220px);
  }

  .gp-gallery-lightbox__nav {
    top: auto;
    bottom: 112px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .gp-gallery-lightbox__nav--prev {
    left: 16px;
  }

  .gp-gallery-lightbox__nav--next {
    right: 16px;
  }

  .gp-gallery-lightbox__meta {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 18px 22px;
  }
}
