/* ===== Лайтбокс ===== */
body.lb-no-scroll { overflow: hidden; }

.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 20, 30, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-tap-highlight-color: transparent;
}
.lb-overlay.is-open { display: flex; }

.lb-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-img {
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  background: #000;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  font-family: inherit;
}
.lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; font-size: 22px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.22); }
.lb-close:focus, .lb-prev:focus, .lb-next:focus { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px; }

.lb-meta {
  position: absolute;
  left: 0; right: 0; bottom: 16px;
  text-align: center;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  pointer-events: none;
}
.lb-counter { display: inline-block; margin-right: 12px; opacity: 0.7; }
.lb-caption { display: inline-block; }

@media (max-width: 575px) {
  .lb-overlay { padding: 8px; }
  .lb-prev, .lb-next { width: 44px; height: 44px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ===== Сетка работ ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.works-grid__item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #f5f5f5;
}
.works-grid__item.is-hidden { display: none; }
.works-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.works-grid__item::after {
  /* плюсик в правом нижнем углу при наведении */
  content: "+";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 22px;
  line-height: 30px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.works-grid__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}
.works-grid__item:hover img { transform: scale(1.05); }
.works-grid__item:hover::after { opacity: 1; transform: translateY(0); }

@media (min-width: 768px) {
  .works-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
}

/* ===== Якорная навигация по категориям ===== */
.works-anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.works-anchors a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  font-size: 0.9rem;
  color: #555;
  text-decoration: none;
  background: #fff;
  transition: all 0.2s;
}
.works-anchors a:hover, .works-anchors a:focus {
  border-color: var(--primary, #1abc9c);
  color: var(--primary, #1abc9c);
  text-decoration: none;
}

.works-category { padding-top: 70px; margin-top: -70px; } /* offset для sticky-якорей под navbar */
.works-category__title { margin-bottom: 16px; }
.works-category__count { color: #999; font-weight: 400; font-size: 0.65em; margin-left: 8px; }
