/* KÖŞE YAZILARI BANNERINI DA KAPSAR */
.page-header {
  position: relative;
  background-color: var(--primary-color);
  background-image:
    linear-gradient(135deg, rgba(20, 33, 61, 0.95) 0%, rgba(20, 33, 61, 0.8) 100%),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 10px);
  padding: 80px 0;
  margin-bottom: 0;
  text-align: center;
  border-bottom: 4px solid var(--secondary-color);
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border: 2px solid rgba(212, 175, 55, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.page-header h1 {
  color: white;
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  position: relative;
  z-index: 1;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
  letter-spacing: 2px;
  line-height: 1.3;
  text-transform: none;
}

@media (max-width: 768px) {
  .page-header {
    padding: 40px 0;
    margin-bottom: 40px;
  }
  .page-header h1 {
    font-size: 1.75rem;
  }
}
@media (max-width: 768px) {
  .page-header {
    padding: 40px 0;
    margin-bottom: 40px;
  }
  .page-header h1 {
    font-size: 1.75rem;
  }
}
/* ===================================
   FOTO GALERİ - GRID GALLERY
   =================================== */


/* PAGE HEADER (For text-based gallery pages like Arçelik, Gebze TO) */
.page-header {
  position: relative;
  background-color: var(--primary-color);
  background-image: 
    linear-gradient(135deg, rgba(20, 33, 61, 0.95) 0%, rgba(20, 33, 61, 0.8) 100%),
    repeating-linear-gradient(45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(-45deg, rgba(212, 175, 55, 0.03) 0px, rgba(212, 175, 55, 0.03) 1px, transparent 1px, transparent 10px);
  padding: 80px 0;
  margin-bottom: 0;
  text-align: center;
  border-bottom: 4px solid var(--secondary-color);
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border: 2px solid rgba(212, 175, 55, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.page-header h1 {
  color: white;
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  position: relative;
  z-index: 1;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
  letter-spacing: 2px;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .page-header {
    padding: 40px 0;
    margin-bottom: 40px;
  }
  .page-header h1 {
    font-size: 1.5rem;
    line-height: 1.2;
    word-break: break-word;
    white-space: normal;
    padding: 0 10px;
  }
}


.gallery-section {
  padding: 60px 0;
  background-color: #f4f6f9;
  min-height: 100vh;
}

/* FIXED GRID LAYOUT (Uniform Boxes) */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Yatayda tam 4 adet resim */
  gap: 20px;
}

.gallery-item {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  border: 1px solid #eee;
  
  /* FIXED ASPECT RATIO (Square-ish) */
  aspect-ratio: 4 / 3; 
}

/* Loading State Style */
.gallery-item.loading {
  background-color: #e0e0e0;
  animation: pulse 1.5s infinite;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(20, 33, 61, 0.2); /* Navy shadow */
  border-color: var(--secondary-color); /* Gold border */
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fill the box completely, cropping if needed */
  display: block;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

/* Overlay Effect */
.item-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(20, 33, 61, 0.6); /* Navy/Dark overlay */
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .item-overlay {
  opacity: 1;
}

.zoom-icon {
  color: var(--secondary-color); /* Gold icon */
  font-size: 2rem;
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.gallery-item:hover .zoom-icon {
  transform: scale(1);
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .masonry-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
}

/* LIGHTBOX STYLES (Reusing slightly modified from archive page) */
.lightbox-modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85); /* Arkaplan karartısı biraz açıldı (0.95 -> 0.85) */
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 95%; /* Genişlik arttırıldı (90% -> 95%) */
  max-height: 95vh; /* Yükseklik arttırıldı (90vh -> 95vh) */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-image {
  /* Zorla büyütmeyi kaldırdık (kalite bozulduğu için) */
  max-width: 90vw;  
  max-height: 85vh; 
  
  width: auto;  /* Resmin orijinal boyutu neyse onu kullan */
  height: auto;
  
  border-radius: 4px;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
  .lightbox-content {
     width: 100%;
  }
  .lightbox-image {
    max-width: 95vw;
    max-height: 80vh;
  }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 2001;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: #e53935;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 20px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  transition: background 0.3s ease;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(30, 136, 229, 0.8);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }
