/* ======================================
   Gallery page - Workshop NM'26
   ====================================== */

body.gallery-page {
  background: #f8f9fa;
}

.gallery-section {
  padding: 140px 0 80px 0;
  min-height: calc(100vh - 300px);
}

.gallery-section .section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.gallery-section .section-title h2 {
  font-size: 32px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 15px;
  color: #37517e;
  position: relative;
  padding-bottom: 15px;
  display: inline-block;
}

.gallery-section .section-title h2::after {
  content: "";
  position: absolute;
  display: block;
  width: 50px;
  height: 3px;
  background: #3fbbc0;
  bottom: 0;
  left: calc(50% - 25px);
}

.gallery-section .section-title p {
  color: #6c757d;
  margin: 0;
}

/* Grid – columns layout (masonry-like, žádné prázdné mezery) */
.gallery-grid {
  columns: 4;
  column-gap: 1rem;
}

.gallery-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #e9ecef;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
  break-inside: avoid;
  margin-bottom: 1rem;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(63, 187, 192, 0) 60%, rgba(55, 81, 126, 0.45) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 1;
}

.gallery-count {
  text-align: center;
  margin-top: 2rem;
  color: #6c757d;
  font-size: 0.9rem;
  font-style: italic;
}

.gallery-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: #6c757d;
  font-style: italic;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ======================================
   GLightbox override – žádné ořezy
   ====================================== */

.glightbox-container .gslide-image img,
.glightbox-container .gslide-image img.zoomable {
  width: auto !important;
  height: auto !important;
  max-width: 90vw !important;
  max-height: 90vh !important;
  object-fit: contain !important;
  aspect-ratio: unset !important;
}

.glightbox-container .gslide-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Responsive */
@media (max-width: 1200px) {
  .gallery-grid {
    columns: 3;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 100px 0 60px 0;
  }

  .gallery-section .section-title h2 {
    font-size: 26px;
  }

  .gallery-grid {
    columns: 2;
    column-gap: 0.5rem;
  }

  .gallery-item {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    columns: 2;
    column-gap: 0.4rem;
  }

  .gallery-item {
    margin-bottom: 0.4rem;
  }
}