/* ==========================================================================
   gallery.css  —  styling ONLY for gallery.html
   Banner + breadcrumb come from components.css.
   Lightbox behaviour lives in assets/js/main.js (module 12).
   ========================================================================== */

.gallery-page__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.gallery-item {
  display: block;
  border: 6px solid #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
}
.gallery-item:hover img { transform: scale(1.08); filter: saturate(1.15); }

@media (max-width: 1080px) { .gallery-page__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .gallery-page__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 360px)  { .gallery-page__grid { grid-template-columns: 1fr; } }

/* --- Lightbox (shared markup injected once by main.js) --------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 5vw, 4rem);
  background: rgba(8, 28, 17, .92);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .25s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6);
  animation: fade-in-up .3s ease both;
}
.lightbox__btn {
  position: absolute;
  color: #fff;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  transition: background .2s ease;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .28); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__count {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .8);
  font-size: .85rem;
}
