.gallery__section {
  padding: 5.2rem 0 5.2rem;
  border-bottom: var(--kf-white-2);
}

.gallery__container {
  max-width: calc(var(--kf-page-width) * 1.2);
  margin: 0 auto;
}

.gallery__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  margin-bottom: 3.2rem;
}

.gallery__header-left {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex: 1;
}

.gallery__nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.gallery__nav-btn {
  width: 4rem;
  height: 4rem;
  border-radius: var(--kf-rxl);
  color: var(--kf-white-5);
  font-size: var(--kf-fs-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--kf-dt-base) var(--kf-ease);
  user-select: none;
  line-height: 1;
}

.gallery__nav-btn:hover {
  background: var(--kf-bg-invert);
  border-color: var(--kf-white-3);
  color: var(--kf-text-invert);
}

.gallery__nav-btn:active {
  transform: var(--kf-click-effect);
}

.gallery__counter {
  font-size: var(--kf-fs-sm);
  letter-spacing: var(--kf-ls-xll);
  text-transform: var(--kf-tu);
  color: var(--kf-white-2);
  min-width: 4.4rem;
  text-align: center;
}

.gallery__track-wrap {
  overflow-y: hidden;
  overflow-x: scroll;
}

.gallery__track-wrap:active {
  cursor: pointer;
}

.gallery__track {
  display: flex;
  gap: 1.2rem;
  transition: transform var(--kf-dt-base) var(--kf-ease);
  will-change: transform;
}

.gallery__slide {
  flex-shrink: 0;
  border-radius: var(--kf-rm);
  overflow: hidden;
  position: relative;
  transition: transform var(--kf-dt-base) var(--kf-ease);
}

.gallery__slide:hover {
  transform: scale(1.02);
}

.gallery__slide-wide {
  width: 60rem;
  height: 40rem;
}

.gallery__slide-square {
  width: 50rem;
  height: 40rem;
}

.gallery__slide-tall {
  width: 42rem;
  height: 40rem;
}

.gallery__slide-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform var(--kf-dt-focus) var(--kf-ease-in-out);
}

.gallery__slide:hover .gallery__slide-inner {
  transform: scale(1.04);
}

.gallery__slide-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.gallery__slide-blob {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  position: absolute;
  top: -20%;
  left: -20%;
  pointer-events: none;
}

.gallery__slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 55%);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: 1.6rem 1.8rem;
  pointer-events: none;
}

.gallery__slide-caption {
  font-size: var(--kf-fs-sm);
  letter-spacing: var(--kf-ls-xll);
  text-transform: var(--kf-tu);
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--kf-dt-base) var(--kf-ease);
}

.gallery__slide:hover .gallery__slide-caption {
  color: rgba(255, 255, 255, 0.9);
}

.gallery__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem 4rem 0;
}

.gdot {
  width: 2rem;
  height: 0.5rem;
  border-radius: var(--kf-rs);
  background: var(--kf-white-2);
  transition: all var(--kf-dt-base) var(--kf-ease);
  cursor: pointer;
  border: none;
  padding: 0;
}

.gdot.active {
  width: 3.2rem;
  background: var(--kf-accent-color);
}

.gdot:hover:not(.active) {
  background: var(--kf-white-3);
}

@media (max-width: 1280px) {
  .gallery__header {
    padding: 0 2.8rem;
    margin-bottom: 2.8rem;
  }

  .gallery__slider-wide {
    width: 50rem;
    height: 36rem;
  }

  .gallery__slide-square {
    width: 42rem;
    height: 36rem;
  }

  .gallery__slide-tall {
    width: 36rem;
    height: 36rem;
  }

  .gallery__dots {
    padding: 1.8rem 2.8rem 0;
  }
}

@media (max-width: 1024px) {
  .gallery__header {
    padding: 0 2.4rem;
    margin-bottom: 2.4rem;
    gap: 1.2rem;
  }

  .gallery__track {
    gap: 1rem;
  }

  .gallery__slide-wide {
    width: 40rem;
    height: 30rem;
  }

  .gallery__slide-square {
    width: 34rem;
    height: 30rem;
  }

  .gallery__slide-tall {
    width: 28rem;
    height: 30rem;
  }

  .gallery__nav-btn {
    width: 3.6rem;
    height: 3.6rem;
  }

  .gallery__dots {
    padding: 1.6rem 2.4rem 0;
  }
}

@media (max-width: 768px) {
  .gallery__header {
    padding: 0 2rem;
    margin-bottom: 2rem;
  }

  .gallery__header-left {
    gap: 1rem;
  }

  .gallery__track {
    gap: 0.8rem;
  }

  .gallery__slide-wide {
    width: 28rem;
    height: 22rem;
  }

  .gallery__slide-square {
    width: 24rem;
    height: 22rem;
  }

  .gallery__slide-tall {
    width: 20rem;
    height: 22rem;
  }

  .gallery__nav-btn {
    width: 3.2rem;
    height: 3.2rem;
  }

  .gallery__counter {
    min-width: 3.6rem;
  }

  .gallery__dots {
    padding: 1.4rem 2rem 0;
  }

  .gdot {
    width: 1.6rem;
  }

  .gdot.active {
    width: 2.8rem;
  }
}

@media (max-width: 480px) {
  .gallery__section {
    padding: 3.6rem 0;
  }

  .gallery__slide:hover {
    transform: none;
  }

  .gallery__slide:hover .gallery__slide-inner {
    transform: none;
  }

  .gallery__slide-overlay {
    padding: 1.2rem 1.4rem;
  }

  .gallery__dots {
    padding: 1.2rem 1.6rem 0;
    gap: 0.5rem;
  }

  .gdot {
    width: 1.4rem;
    height: 0.4rem;
  }

  .gdot.active {
    width: 2.4rem;
  }
}
