/* ==========================================================
   🎨 SLIDER.CSS — Optimize & Mobil Dostu
   ========================================================== */

/* === SLIDER GENEL === */
.slider {
  position: relative;
  width: 100%;
  /*height: 864px;*/
  height: 95dvh; /* Dinamik viewport height */  
  overflow: hidden;
  background: #000;
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateX(0) translateY(0) scale(1);
  transition: opacity 0.8s ease, transform 0.8s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  will-change: opacity, transform;
}

.slide.active {
  opacity: 1;
  z-index: 2;
  transform: translateX(0) translateY(0) scale(1);
}

/* === GÖRSELLER VE VİDEOLAR === */
.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: opacity, transform;
}

/* === OVERLAY === */
.slide.dark-overlay::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.2); /* opacity ayarlanabilir */
  z-index: 1;
}

.dark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}

/* === CAPTION === */
.caption {
  position: absolute;
  bottom: 45%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-align: center;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide.active .caption {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.caption h2 {
  font-size: 3rem;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95); /* biraz soft beyaz */
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5); /* soft gölge */
  margin: 0;
  line-height: 1.2;
}

.caption p {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9); /* hafif transparan */
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
  margin: 0.5em 0 0 0;
  line-height: 1.4;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .slider {
    height: 75dvh;
  }
  .caption h2 {
    font-size: 2rem;
  }
  .caption p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .slider {
    height: 80dvh;
  }
  
  .caption h2 {
    font-size: 2rem;
    letter-spacing: 1px;
  }
  .caption p {
    font-size: 1rem;
    line-height: 1.3;
  }
}





/* === ANİMASYON TÜRLERİ === */
.slide.fade-up {
  opacity: 0;
  transform: translate3d(0,0,0);
}

.slide.fade-down {
  transform: translateY(-30px);
}

.slide.fade-left {
  transform: translateX(-30px);
}

.slide.fade-right {
  transform: translateX(30px);
}

.slide.zoom-in {
  transform: scale(1.2);
}

.slide.zoom-out {
  transform: scale(0.8);
}

/* Aktif sınıflar */
.slide.active.fade-up {
  animation: fadeUpIOS 0.8s ease forwards;
  z-index: 2;
  pointer-events: auto;
}

@keyframes fadeUpIOS {
  from {
    opacity: 0;
    transform: translate3d(0,40px,0);
  }
  to {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
}
/* Caption animasyonu */
.slide.fade-up .caption {
  animation: captionFadeUp 0.8s ease forwards;
}

@keyframes captionFadeUp {
  from { opacity:0; transform: translate3d(-50%,30px,0);}
  to { opacity:1; transform: translate3d(-50%,0,0);}
}

.slide.active.fade-down,
.slide.active.fade-left,
.slide.active.fade-right,
.slide.active.zoom-in,
.slide.active.zoom-out {
  transform: translateX(0) translateY(0) scale(1);
  opacity: 1;
}

/* === PROGRESS BAR === */
.progress-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 10;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  transition: width 0.1s linear;
  z-index: 10;
}

/* === NAVIGATION BUTTONS === */
.slider .prev,
.slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
}

.slider:hover .prev,
.slider:hover .next {
  opacity: 1;
  visibility: visible;
}

.slider .prev:hover,
.slider .next:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(255,255,255,0.4);
}

.slider .prev:active,
.slider .next:active {
  transform: translateY(-50%) scale(0.95);
}

.slider .prev { left: 20px; }
.slider .next { right: 20px; }

/* === THUMBNAILS === */
.thumbnails {
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  z-index: 10;
}

.thumbnails img {
  width: 70px;
  height: 47px;
  object-fit: cover;
  margin: 0 4px;
  opacity: 0.6;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity 0.3s ease, border 0.3s ease;
}

.thumbnails img:hover,
.thumbnails img.active {
  opacity: 1;
  border-color: #ff6b00;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .slider { height: 300px; }

  .caption { padding: 0.8rem 1.2rem; font-size: 0.9rem; }
  .caption h2 { font-size: 1.3rem; }
  .caption p { font-size: 0.9rem; }

  .thumbnails img { width: 50px; height: 33px; }

  .prev, .next { font-size: 1.5rem; padding: 0.4rem 0.8rem; }
}

/* Dots */
.dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.dot {
  width: 14px;
  height: 14px;
  background: rgba(255,255,255,0.3); /* şeffaf */
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(0,0,0,0.4); /* soft gölge */
  transition: all 0.3s ease;
}

.dot:hover,
.dot:focus {
  background: rgba(255,255,255,0.8); /* parlama efekti */
  box-shadow: 0 0 12px rgba(255,255,255,0.7);
  transform: scale(1.3);
}

.dot.active {
  background: #fff; /* aktif slide rengi */
  box-shadow: 0 0 8px rgba(255,161,92,0.5); /* yumuşak glow */
  transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
  .dots {
    gap: 10px;
    bottom: 15px;
  }

  .dot {
    width: 12px;
    height: 12px;
  }
}
