/* ============================================================
   GALLERY.CSS — Страница «Галерея»
   ============================================================ */

/* BLOCK:gallery-hero:start */
.tig-gallery-hero {
  min-height: 65vh;
}
.tig-gallery-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: end;
  width: 100%;
}
.tig-gallery-hero__collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.tig-gallery-hero__collage-item {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}
.tig-gallery-hero__collage-item:nth-child(1) {
  grid-column: 1 / 3;
  aspect-ratio: 16/9;
}
.tig-gallery-hero__collage-item:nth-child(2),
.tig-gallery-hero__collage-item:nth-child(3) {
  aspect-ratio: 1;
}
.tig-gallery-hero__collage-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 768px) {
  .tig-gallery-hero__inner { grid-template-columns: 1fr; }
  .tig-gallery-hero__collage { display: none; }
}
/* BLOCK:gallery-hero:end */

/* BLOCK:gallery-filters:start */
.tig-gallery-page {
  background: var(--tig-bg);
}
.tig-gallery-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.tig-gallery-filter-btn {
  padding: 0.5rem 1.1rem;
  background: var(--tig-bg-card);
  border: 1px solid var(--tig-border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--tig-text-2);
  transition: var(--tig-transition);
  cursor: pointer;
}
.tig-gallery-filter-btn:hover {
  border-color: var(--tig-border-strong);
  color: var(--tig-text);
}
.tig-gallery-filter-btn--active {
  background: rgba(201,164,75,0.12);
  border-color: var(--tig-gold);
  color: var(--tig-gold);
}
/* BLOCK:gallery-filters:end */

/* BLOCK:gallery-grid:start */
.tig-gallery-grid {
  columns: 4 280px;
  gap: 1rem;
}
.tig-gallery-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  background: var(--tig-bg-card);
  border: 1px solid var(--tig-border);
  border-radius: var(--tig-radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--tig-transition);
  position: relative;
}
.tig-gallery-item:hover {
  border-color: var(--tig-border-strong);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.tig-gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}
.tig-gallery-item:hover img {
  transform: scale(1.03);
}
.tig-gallery-item__placeholder {
  aspect-ratio: 4/3;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tig-bg-section);
}
.tig-gallery-item__placeholder--tall { aspect-ratio: 2/3; }
.tig-gallery-item__placeholder--wide { aspect-ratio: 16/9; }
.tig-gallery-item__placeholder svg {
  width: 48px;
  opacity: 0.2;
  transition: var(--tig-transition);
}
.tig-gallery-item:hover .tig-gallery-item__placeholder svg {
  opacity: 0.35;
}
.tig-gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(9,9,12,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--tig-transition);
}
.tig-gallery-item:hover .tig-gallery-item__overlay { opacity: 1; }
.tig-gallery-item__overlay svg {
  width: 32px;
  height: 32px;
  stroke: var(--tig-white);
  stroke-width: 1.5;
  fill: none;
}
.tig-gallery-item__cat {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.2rem 0.55rem;
  background: rgba(9,9,12,0.7);
  border-radius: 100px;
  font-size: 0.68rem;
  color: var(--tig-text-muted);
  backdrop-filter: blur(4px);
}
/* BLOCK:gallery-grid:end */

/* BLOCK:gallery-lightbox:start */
.tig-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(9,9,12,0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.tig-lightbox--open {
  opacity: 1;
  pointer-events: all;
}
.tig-lightbox__inner {
  position: relative;
  max-width: 1100px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tig-lightbox__img-wrap {
  position: relative;
  max-height: 80vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tig-lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--tig-radius);
}
.tig-lightbox__placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 75vh;
  background: var(--tig-bg-card);
  border: 1px solid var(--tig-border);
  border-radius: var(--tig-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tig-lightbox__placeholder svg {
  width: 80px;
  opacity: 0.25;
}
.tig-lightbox__caption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--tig-text-muted);
  text-align: center;
}
.tig-lightbox__close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: 44px;
  height: 44px;
  background: rgba(20,22,32,0.85);
  border: 1px solid var(--tig-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--tig-transition);
}
.tig-lightbox__close:hover {
  background: var(--tig-bg-card-hover);
  border-color: var(--tig-border-strong);
}
.tig-lightbox__close svg {
  width: 18px;
  height: 18px;
  stroke: var(--tig-text);
  stroke-width: 2;
  fill: none;
}
.tig-lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(20,22,32,0.85);
  border: 1px solid var(--tig-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--tig-transition);
}
.tig-lightbox__nav:hover {
  background: var(--tig-bg-card-hover);
  border-color: var(--tig-border-strong);
}
.tig-lightbox__nav svg {
  width: 20px;
  height: 20px;
  stroke: var(--tig-text);
  stroke-width: 2;
  fill: none;
}
.tig-lightbox__nav--prev { left: 1.25rem; }
.tig-lightbox__nav--next { right: 1.25rem; }
.tig-lightbox__counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--tig-text-muted);
  background: rgba(20,22,32,0.7);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
/* BLOCK:gallery-lightbox:end */

/* BLOCK:gallery-instagram:start */
.tig-gallery-instagram {
  margin-top: 3rem;
  background: linear-gradient(135deg, rgba(201,164,75,0.08), rgba(160,104,48,0.05));
  border: 1px solid rgba(201,164,75,0.22);
  border-radius: var(--tig-radius-lg);
  overflow: hidden;
}
.tig-gallery-instagram__rows {
  display: flex;
  flex-direction: column;
}
.tig-gallery-instagram__row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  flex-wrap: wrap;
}
.tig-gallery-instagram__row + .tig-gallery-instagram__row {
  border-top: 1px solid rgba(201,164,75,0.18);
}
.tig-gallery-instagram__icon {
  color: var(--tig-gold);
  flex-shrink: 0;
}
.tig-gallery-instagram__icon svg { display: block; }
.tig-gallery-instagram__handle {
  font-family: var(--tig-font-heading);
  font-size: 1.15rem;
  color: var(--tig-gold);
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}
.tig-gallery-instagram__text {
  font-size: 0.875rem;
  color: var(--tig-text-2);
  margin: 0;
}
.tig-gallery-instagram__row .tig-btn { margin-left: auto; flex-shrink: 0; }
@media (max-width: 600px) {
  .tig-gallery-instagram__row { padding: 1.25rem; }
  .tig-gallery-instagram__row .tig-btn { margin-left: 0; }
}
/* BLOCK:gallery-instagram:end */

/* BLOCK:gallery-video:start */
.tig-gallery-video-section {
  background: var(--tig-bg-2);
}
.tig-gallery-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.tig-video-card {
  background: var(--tig-bg-card);
  border: 1px solid var(--tig-border);
  border-radius: var(--tig-radius-lg);
  overflow: hidden;
  transition: var(--tig-transition);
}
.tig-video-card:hover { border-color: var(--tig-border-strong); }
.tig-video-card__thumb {
  aspect-ratio: 16/9;
  background: var(--tig-bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tig-video-card__thumb svg { width: 56px; opacity: 0.2; }
.tig-video-card__play {
  position: absolute;
  width: 52px;
  height: 52px;
  background: rgba(201,164,75,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tig-video-card__play svg {
  width: 22px;
  opacity: 1;
  stroke: none;
  fill: #0A0800;
  margin-left: 3px;
}
.tig-video-card__body { padding: 1rem; }
.tig-video-card__title { font-size: 0.95rem; margin-bottom: 0.25rem; }
.tig-video-card__text { font-size: 0.8rem; color: var(--tig-text-muted); margin: 0; }
/* BLOCK:gallery-video:end */

@media (max-width: 600px) {
  .tig-gallery-grid { columns: 2 140px; }
}
