/* ==========================================
   Gallery Page - La Mora Pizza
   ========================================== */
.gallery {
  padding: 8rem 1rem 4rem; /* üst boşluk artırıldı */
  background-color: var(--color-bg);
  font-style: italic;
  max-width: 1200px;   /* içerik maksimum genişlik */
  margin: 0 auto;      /* ortalama */
}

.gallery h1,
.gallery .section-title {
  text-align: center;
  font-size: 2.2rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

/* Filtre butonları */
.gallery-filters {
  text-align: center;
  margin-bottom: 2rem;
}

.filter-btn {
  font-family: 'Times New Roman', Times, serif;
  font-style: italic;
  font-weight: bold;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem 0.5rem 0.5rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--color-accent);
}

/* Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* masaüstü 4 sütun */
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 12px;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  display: none; /* başlangıçta gizli */
  position: fixed;
  z-index: 2000;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  margin-bottom: 1rem;
}

.lightbox-caption {
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

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

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  .gallery-item img {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
