/* Стили страниц «Работы» TERMINATOR */

.works-page {
  background: var(--bg, #0a0b0c);
  color: var(--text, #f2f0eb);
}

.works-page .section {
  padding: 150px 0 110px;
}

.works-page .container {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
}

.works-page .service-back,
.works-page .back-link {
  display: inline-flex;
  margin-bottom: 54px;
  color: var(--text-soft, #a7a7a3);
  text-decoration: none;
  transition: color 0.25s ease;
}

.works-page .service-back:hover,
.works-page .back-link:hover {
  color: var(--accent, #e36f20);
}

.works-page .section-heading {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.works-page .section-number {
  color: var(--accent, #e36f20);
  font-size: 14px;
  letter-spacing: 0.12em;
  padding-top: 9px;
}

.works-page .section-label {
  color: var(--text-muted, #72736f);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.works-page h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(30px, 4.5vw, 56px);
  line-height: 1.02;
  font-weight: 500;
}

/* Галерея: две колонки, реальные пропорции изображений */
.gallery-grid,
.works-page .works-gallery {
  column-count: 3;
  column-gap: 18px;
}

.gallery-grid img,
.works-page .gallery-item img,
.works-page .works-gallery img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 18px;
  break-inside: avoid;
  cursor: zoom-in;
  transition: opacity 0.3s ease, transform 0.45s ease;
}

.gallery-grid img:hover,
.works-page .gallery-item img:hover,
.works-page .works-gallery img:hover {
  opacity: 0.88;
  transform: scale(1.012);
}

.works-page .service-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 54px;
}

.works-page .service-order,
.work-order-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 58px;
  padding: 0 26px;
  border: 1px solid var(--accent, #e36f20);
  background: var(--accent, #e36f20);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.works-page .service-order span,
.work-order-button span {
  font-size: 20px;
  line-height: 1;
}

.works-page .service-order:hover,
.work-order-button:hover {
  background: transparent;
  color: var(--accent-light, #f18a38);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, 0.94);
}

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

.lightbox-image {
  display: block;
  max-width: 88vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox button {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.lightbox-close {
  top: 18px;
  right: 26px;
  width: 44px;
  height: 44px;
  font-size: 36px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 64px;
  height: 96px;
  margin-top: -48px;
  font-size: 64px;
  line-height: 1;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox button:hover {
  color: var(--accent-light, #f18a38);
}

@media (max-width: 900px) {
  .gallery-grid,
  .works-page .works-gallery {
    column-count: 2;
  }

  .lightbox-prev {
    left: 4px;
  }

  .lightbox-next {
    right: 4px;
  }
}

@media (max-width: 560px) {
  .works-page .section {
    padding: 120px 0 70px;
  }

  .works-page .container {
    width: min(100% - 32px, 1320px);
  }

  .works-page .section-heading {
    gap: 14px;
    margin-bottom: 30px;
  }

  .gallery-grid,
  .works-page .works-gallery {
    column-count: 1;
    column-gap: 0;
  }

  .works-page .service-order,
  .work-order-button {
    width: 100%;
  }

  .lightbox {
    padding: 18px;
  }

  .lightbox-image {
    max-width: 94vw;
    max-height: 82vh;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 42px;
    height: 70px;
    margin-top: -35px;
    font-size: 48px;
  }
}
