/* ==========================================================
   GTRBL — Gallery Styles
   Covers: Flickity carousel cells, photo grid columns,
           hover zoom, lightbox modal.
   Flickity base styles: style/flickity.css
   ========================================================== */

/* ── Flickity carousel ─────────────────────────────────── */
.gallery {
  background: #EEE;
}

.gallery-cell {
  width: 28%;
  height: 500px;
  margin-right: 10px;
  opacity: 0.4;
  border-radius: 10px;
  counter-increment: gallery-cell;
}

.gallery-cell.is-selected { opacity: 1; }

.gallery--wide .gallery-cell { width: 56%; }

/* ── Photo grid (uniform tiles) ────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.photo-grid .gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-grid .gallery-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

/* ── Lightbox modal ────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding-top: 100px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.9);
}

.modal-content {
  display: block;
  margin: 0 auto;
  width: 80%;
  max-width: 700px;
  animation: zoom 0.3s ease;
}

#modal-caption {
  display: block;
  margin: 0 auto;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  min-height: 40px;
}

@keyframes zoom {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}

.close:hover { color: #bbb; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* First carousel — double width, keep height */
  .gallery-cell {
    width: 75%;
  }

  /* Second (wide) carousel — full width, shorter */
  .gallery--wide .gallery-cell {
    width: 100%;
    height: 260px;
  }

  .modal-content { width: 100%; }
}
