.gallery a {
  min-height: 0;
  aspect-ratio: 4 / 3;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.section,
.container,
.split,
.gallery,
.gallery a {
  min-width: 0;
}

.section-head h2,
.page-title {
  max-width: 100%;
  overflow-wrap: break-word;
}

.gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.gallery img {
  display: block;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  touch-action: pan-y;
}

.lightbox img {
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox .lightbox__close {
  top: 16px;
  right: 16px;
  z-index: 4;
  color: #10251f;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 37, 31, 0.16);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
}

.lightbox .lightbox__nav {
  top: 50%;
  right: auto;
  z-index: 4;
  width: 54px;
  height: 54px;
  transform: translateY(-50%);
  color: #10251f;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 37, 31, 0.16);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
  font-size: 40px;
  line-height: 1;
}

.lightbox .lightbox__nav:hover {
  background: #fff;
}

.lightbox .lightbox__prev {
  left: 18px;
}

.lightbox .lightbox__next {
  left: auto;
  right: 18px;
}

.lightbox__counter {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 4;
  transform: translateX(-50%);
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 16, 12, 0.72);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  pointer-events: none;
}

@media (max-width: 600px) {
  .lightbox {
    padding: 10px;
  }

  .lightbox .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 34px;
  }

  .lightbox .lightbox__prev {
    left: 6px;
  }

  .lightbox .lightbox__next {
    right: 6px;
  }

  .lightbox .lightbox__close {
    top: 8px;
    right: 8px;
  }

  .lightbox__counter {
    bottom: 8px;
  }
}
