.gallery-wrapper {
  max-width: 1100px;
  margin: auto;
}

.gallery-main-swiper {
  width: 100%;
  height: 500px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
}

.gallery-main-swiper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs-swiper {
  margin-top: 15px;
}

.gallery-thumbs-swiper .swiper-slide {
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-thumbs-swiper .swiper-slide-thumb-active {
  opacity: 1;
  transform: scale(1.05);
  border: 2px solid #0d6efd;
}

.gallery-thumbs-swiper img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

@media (max-width: 768px) {
  .gallery-main-swiper {
    height: 300px;
  }
}

/* Modern Premium Gallery */
.gallery {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #fff;
}

/* Grid thumbs düzenleme */
.gallery-thumb {
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 120px;
  object-fit: cover;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.gallery-thumb.active {
  border: 3px solid #0d6efd;
}

.gallery__main {
  width: 100%;
  height: 500px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.gallery__main img,
.gallery__main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  pointer-events: auto;
  display: block;
}

.gallery__main .swiper-slide {
  pointer-events: auto;
}

.gallery__thumbs {
  height: 110px;
}

.gallery__thumbs .swiper-slide {
  width: 130px;
  height: 100px;
  opacity: 0.4;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery__thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid #111;
}

.gallery__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0,0,0,0.4);
  border-radius: 50%;
  z-index: 10;
  cursor: pointer;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
}

.gallery__nav:hover {
  background: rgba(0,0,0,0.7);
}

.gallery__nav--prev { left: 15px; }
.gallery__nav--next { right: 15px; }

/* LIGHTBOX NAV */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: #fff;
  cursor: pointer;
  padding: 10px;
  user-select: none;
  z-index: 10000;
}

.lightbox-prev { left: 25px; }
.lightbox-next { right: 25px; }

@media (max-width: 768px) {
  .gallery__main {
    height: 320px;
  }
}
/* === NEW MODERN GALLERY (APPENDED) === */
.gallery {
  width: 100%;
}

.gallery-main {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f3f3;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .35s ease, transform .35s ease;
}

.gallery-main img.fade { opacity: 0; }

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.nav.prev { left: 15px; }
.nav.next { right: 15px; }

/* okların dışarı taşmasını engelle */
.gallery-main {
  position: relative;
}

/* hatalı eski ok stillerini override et */
.nav {
  font-size: 20px;
  line-height: 1;
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow: hidden;
  position: relative;
  align-items: center;
}

.gallery-thumbs img {
  width: 85px;
  height: 65px;
  object-fit: cover;
  border-radius: 6px;
  opacity: .6;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s ease;
}

.gallery-thumbs img.active {
  opacity: 1;
  border-color: #0d6efd;
}

.gallery-thumbs img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6); /* daha açık arka plan */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90%;
  max-height: 90%;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 38px;
  color: #fff;
  cursor: pointer;
}

@media (max-width:768px) {
  .gallery-thumbs img {
    width: 65px;
    height: 50px;
  }
}

@media (prefers-color-scheme: dark) {
  .gallery-main {
    background: #1c1c1c;
  }
}
.gallery {
  width: 100%;
  overflow: hidden;
}

.gallery-main {
  max-width: 100%;
  overflow: hidden;
}

.gallery-thumbs {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
}
/* THUMB NAV BUTTONS */
.thumb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.thumb-prev { left: 5px; }
.thumb-next { right: 5px; }

/* broken image fix */
.gallery img {
  background: #eee;
}

.gallery img::after {
  content: "Görsel yüklenemedi";
  display: none;
}
.gallery-main img {
  display: block;
}

.gallery-thumbs {
  max-width: 100%;
}

.gallery-thumbs img {
  flex-shrink: 0;
}

.nav {
  pointer-events: auto;
}
/* ================= MODERN PREMIUM GALLERY ================= */

.gallery__main img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.6s ease, filter 0.6s ease;
}

.gallery__main:hover .swiper-slide-active img {
  transform: scale(1.03);
  filter: brightness(0.95);
}

.gallery__thumbs img {
  border-radius: 8px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.7;
}

.gallery__thumbs img:hover {
  transform: scale(1.12);
  opacity: 1;
}

/* NAV BUTTONS */
.gallery__nav {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.gallery__nav:hover {
  background: rgba(0,0,0,0.75);
  transform: translateY(-50%) scale(1.08);
}

/* FANCYBOX DARK OVERLAY */
.fancybox__backdrop {
  background: rgba(0,0,0,0.5) !important; /* çok karanlık sorunu düzeltildi */
}

.fancybox__content img {
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.fancybox__content img:hover {
  transform: scale(1.02);
}
.gallery__main .swiper-slide:not(.swiper-slide-active) {
  pointer-events: none;
}

.gallery__main .swiper-slide-active {
  pointer-events: auto;
}

/* === LIGHTBOX MODAL (TAM EKRAN) === */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.lightbox.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* Scrollbar kaybolmasını önle */
body.lightbox-open {
  overflow: hidden;
  padding-right: 0;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  will-change: opacity;
  z-index: 9998;
  position: relative;
}

.lightbox.active .lightbox-content {
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  font-size: 45px;
  color: #333;
  cursor: pointer;
  z-index: 10001;
  transition: color 0.2s ease;
  user-select: none;
  font-weight: bold;
  line-height: 1;
  opacity: 1;
  visibility: visible;
}

.lightbox-close:hover {
  color: #000;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 50px;
  color: #333;
  cursor: pointer;
  padding: 15px 20px;
  user-select: none;
  z-index: 10001;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 4px;
  border: 1px solid #ddd;
  opacity: 1;
  visibility: visible;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 1);
  color: #000;
  border-color: #999;
}

.lightbox-prev { left: 25px; }
.lightbox-next { right: 25px; }

/* Sayfa numarası göstergesi */
.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #333;
  font-size: 16px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 16px;
  border-radius: 20px;
  z-index: 10001;
  border: 1px solid #ddd;
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 35px;
    padding: 10px 15px;
  }

  .lightbox-close {
    font-size: 35px;
    top: 20px;
    right: 25px;
  }

  .lightbox-counter {
    font-size: 14px;
    bottom: 20px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 28px;
    padding: 8px 12px;
  }

  .lightbox-close {
    font-size: 28px;
    top: 15px;
    right: 15px;
  }
}
