.gallery-page {
  position: relative;
  margin-top: -90px;
  padding-top: 90px; /* компенсируем, чтобы контент не заехал под шапку */
  background-image: url("../images/trainersback.png"); /* путь относительно CSS-файла */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 60px;
  color: #fff;
  min-height: 100vh;
}

.gallery-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.85);
  z-index: 0;
}

.gallery-header,
.trainers-grid {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  text-align: center;
}
.gallery-header {
  text-align: center;

  margin-bottom: 25px;
}

.gallery-header h1 {
  font-size: 42px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
}

.gallery-header .accent {
  color: #ff5c00;
}

.gallery-grid {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(280px, 340px));

  justify-content: center;

  gap: 30px;

  max-width: 1200px;

  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
}

/* Lightbox — увеличенный просмотр фото */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}
