/* ============================================================
   GALLERY.CSS — Gallery page + lightbox
   ============================================================ */

/* ── HERO ─────────────────────────────────────────────────── */
.ct-gallery-hero {
  background: linear-gradient(135deg, #0f2423 0%, #112B2A 50%, #0d9488 200%);
  color: #fff;
  padding: 80px 24px 64px;
  text-align: center;
}
.ct-gallery-hero__inner {
  max-width: 760px;
  margin: 0 auto;
}
.ct-gallery-hero__label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: #2dd4bf;
  font-weight: 700;
  margin-bottom: 16px;
}
.ct-gallery-hero__title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 18px;
  color: #fff;
}
.ct-gallery-hero__subtitle {
  font-size: 1rem;
  line-height: 1.65;
  color: #cbd5e1;
  margin: 0;
}

/* ── GRID (masonry via CSS columns) ───────────────────────── */
.ct-gallery {
  background: #f8fafc;
  padding: 56px 24px 80px;
}
.ct-gallery__inner {
  max-width: 1400px;
  margin: 0 auto;
}
.ct-gallery__grid {
  column-count: 4;
  column-gap: 12px;
}
.ct-gallery__item {
  display: block;
  margin: 0 0 12px;
  break-inside: avoid;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  background: #e2e8f0;
  transition: transform 300ms ease, box-shadow 300ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.ct-gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.ct-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 400ms ease;
}
.ct-gallery__item:hover img {
  transform: scale(1.04);
}
.ct-gallery__empty {
  text-align: center;
  font-size: 1.1rem;
  color: #64748b;
  padding: 80px 0;
}

/* Tablet */
@media (max-width: 1024px) {
  .ct-gallery__grid { column-count: 3; }
}
/* Mobile */
@media (max-width: 700px) {
  .ct-gallery__grid { column-count: 2; column-gap: 8px; }
  .ct-gallery__item { margin-bottom: 8px; border-radius: 6px; }
  .ct-gallery { padding: 36px 12px 56px; }
  .ct-gallery-hero { padding: 56px 16px 40px; }
}
@media (max-width: 420px) {
  .ct-gallery__grid { column-count: 1; }
}

/* ── LIGHTBOX ─────────────────────────────────────────────── */
.ct-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 250ms ease, visibility 0s linear 250ms;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.ct-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.ct-lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.ct-lightbox__caption {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 6px 14px;
  border-radius: 20px;
  max-width: 80vw;
  text-align: center;
}
.ct-lightbox__close,
.ct-lightbox__prev,
.ct-lightbox__next {
  position: absolute;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}
.ct-lightbox__close:hover,
.ct-lightbox__prev:hover,
.ct-lightbox__next:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.08);
}
.ct-lightbox__close svg,
.ct-lightbox__prev svg,
.ct-lightbox__next svg {
  width: 24px;
  height: 24px;
}
.ct-lightbox__close { top: 20px; right: 20px; }
.ct-lightbox__prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.ct-lightbox__next  { right: 20px; top: 50%; transform: translateY(-50%); }
.ct-lightbox__prev:hover { transform: translateY(-50%) scale(1.08); }
.ct-lightbox__next:hover { transform: translateY(-50%) scale(1.08); }

@media (max-width: 600px) {
  .ct-lightbox { padding: 16px; }
  .ct-lightbox__close,
  .ct-lightbox__prev,
  .ct-lightbox__next { width: 40px; height: 40px; }
  .ct-lightbox__close { top: 10px; right: 10px; }
  .ct-lightbox__prev { left: 8px; }
  .ct-lightbox__next { right: 8px; }
}

body.ct-lb-open {
  overflow: hidden;
}
