/* Grid */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* Her item */
.item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .25s ease;
}

.item:hover {
  transform: translateY(-6px);
}

.item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform .4s ease;
}

/* Hover zoom */
.item:hover img {
  transform: scale(1.12);
}

/* Hover overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .35s ease;
}

.item:hover .overlay {
  opacity: 1;
}

/* Mercek ikon */
.icon {
  font-size: 42px;
  color: white;
  opacity: 0;
  transform: scale(0.7);
  transition: .35s ease;
}

.item:hover .icon {
  opacity: 1;
  transform: scale(1);
}

.slide-container {
  flex: 1;
  text-align: center;
  overflow: hidden;
}

/* Dialog */
.dialog {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px; /* dialog kenar boşluğu */
  box-sizing: border-box;
}

@keyframes fadeIn {
  from { opacity: 0; } 
  to { opacity: 1; }
}

.dialog-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
}


@keyframes scaleIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.dialog img {
  max-width: 95%;       /* genişliği %95 yap */
  max-height: 95%;      /* yüksekliği %95 yap */
  width: auto;          /* doğal genişlik */
  height: auto;         /* doğal yükseklik */
  object-fit: contain;  /* orantıyı koru */
  opacity: 0;
  transition: opacity 0.3s;
}

/* Close button */
.close {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* Navigation arrows */
.nav {
  cursor: pointer;
  font-size: 2rem;
  color: white;
  user-select: none;
  padding: 0 10px;
}

.nav:hover {
  background: rgba(255,255,255,0.2);
}

.prev { left: -80px; }
.next { right: -80px; }

