.gallery_header {
  position: fixed;
}

.gallery_root {
  position: fixed;
  padding-top: 72px;
  top: 0;
  height: 100dvh;
  width: 100%;
  display: flex;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3),
    rgba(0, 0, 0, 0.6)
  );

  @media (max-width: 1152px) {
    padding-left: 24px;
    padding-right: 24px;
  }

  @media (max-width: 767px) {
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 44px;
  }

  &::after {
    content: "";
    background: url("/img/menu-background.jpg") center / cover no-repeat;
    position: absolute;
    inset: 0;
    z-index: -1;

    @media (max-width: 1152px) {
      background: url("/img/menu-backgroundAdaptive.jpg") center / cover
        no-repeat;
    }
  }
}

.gallery_seo_h1,
.gallery_seo_p {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.gallery_scroll {
  overflow-x: hidden;
  overflow-y: auto;

  -ms-overflow-style: none;
  scrollbar-width: none;

  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery_wrapper {
  width: 1200px;

  column-count: 4;
  column-gap: 16px;

  @media (max-width: 1152px) {
    width: 100%;
    column-count: 3;
    column-gap: 12px;
  }

  @media (max-width: 767px) {
    column-count: 2;
    column-gap: 8px;
  }
}

.gallery_item {
  break-inside: avoid;
  margin-bottom: 8px;

  & img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    cursor: pointer;
  }
}

.gallery_modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.gallery_modal.is-open {
  display: flex;
}

.gallery_modal_overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.gallery_modal_buttons_wrapper {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.gallery_modal_download {
  width: 30px;
}

.gallery_modal_close,
.gallery_modal_download {
  background: transparent;
  width: 36px;
  cursor: pointer;

  & img {
    width: 100%;
    fill: #fff;
  }

  @media (max-width: 767px) {
    width: 24px;
  }
}

.gallery_modal_content {
  position: relative;
  max-height: 100dvh;
  max-width: 80vw;
  object-fit: contain;

  @media (max-width: 1152px) {
    max-width: 100vw;
  }
}
