.gallery-topbar {
  position: sticky;
  top: 0;
  z-index: 120;
  background: #252525;
  box-shadow: 0 3px 10px rgba(37, 37, 37, 0.55);
}

.gallery-topbar__inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.gallery-topbar__logo img {
  width: 96px;
  height: auto;
  display: block;
}

.gallery-page-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.gallery-page-nav a {
  color: #f7f4f0;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color .2s ease;
}

.gallery-page-nav a:hover {
  color: #8FA34E;
}

.gallery-topbar__phone {
  color: #f7f4f0;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.gallery-topbar__phone:hover {
  color: #d8d1bf;
}

.gallery-page-main {
  padding: 120px 0 70px;
  background: #f7f4f0;
  min-height: 60vh;
}

.gallery-page-hero {
  margin-bottom: 24px;
}

.gallery-page-hero h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.1;
  margin-bottom: 12px;
  font-weight: 700;
  color: #1f232b;
}

.gallery-page-hero p {
  font-size: 18px;
  line-height: 1.5;
  color: #535a63;
  max-width: 760px;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.photo-gallery-item {
  display: block;
  border-radius: var(--ui-radius);
  overflow: hidden;
  background: #ece9e2;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.photo-gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .24s ease;
}

.photo-gallery-item:hover img {
  transform: scale(1.04);
}

.photo-gallery-empty {
  border-radius: var(--ui-radius);
  padding: 26px;
  background: #fff;
  color: #616771;
  font-size: 17px;
}

.fancybox__container .fancybox__content > .f-button.is-close-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  left: auto;
  z-index: 1200;
}

.gallery-footer {
  background: #252525;
  color: #f7f4f0;
  padding: 34px 0 24px;
}

.gallery-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.gallery-footer__logo img {
  width: 96px;
  height: auto;
  display: block;
}

.gallery-footer__title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 10px;
  color: #f7f4f0;
}

.gallery-footer a,
.gallery-footer span {
  display: block;
  color: #d7d7d7;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.75;
}

.gallery-footer a:hover {
  color: #8FA34E;
}

.gallery-footer__bottom {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #bdbdbd;
}

.gallery-footer__back {
  color: #f7f4f0 !important;
}

@media (max-width: 1280px) {
  .photo-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .gallery-topbar__phone {
    display: none;
  }

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

@media (max-width: 900px) {
  .gallery-page-main {
    padding: 80px 0 44px;
  }

  .gallery-page-main .title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
  }

  .gallery-page-main .navigation {
    gap: 14px;
  }

  .gallery-page-nav {
    display: none;
  }

  .photo-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-gallery-item img {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 560px) {
  .gallery-topbar__inner {
    min-height: 66px;
  }

  .photo-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .photo-gallery-item img {
    aspect-ratio: 4 / 3;
  }

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