/* ========================================
   HERO SLIDER STYLES
   ======================================== */

/* SLIDER CONTAINER */
.hero-slider {
  position: relative;
  width: 95%;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.slide {
  position: absolute;
  top: 0;           /* Added to ensure top alignment */
  left: 0;          /* Added to ensure left alignment */
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  animation: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide img {
  width: 100%;
  height: 100%; /* Changed from auto to 100% to fill the container defined by aspect ratio */
  display: block;
  object-fit: contain; /* Ensure full image is visible without cropping */
}

.hero {
  /* Ensure hero section allows slider to size itself */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0.5rem;
}

/* Adjust aspect ratio container trick or just set min-height */
.hero-slider::before {
  content: "";
  display: block;
  /* 430px / 1500px = 28.66% Aspect Ratio */
  padding-top: 28.66%; 
}

/* Make sure the active slide is visible */
.slide.slide-active {
  opacity: 1;
  z-index: 2; /* Bring to front */
  animation: zoomFadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Make exiting slide stay visible during transition but below active */
.slide.slide-exit {
  opacity: 1; /* Keep opacity 1, let new slide cover it or fade it out */
  z-index: 1;
  animation: scaleDownFadeOut 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* New Animation: Zoom In + Fade In */
@keyframes zoomFadeIn {
  0% {
    opacity: 0;
    transform: scale(1.1) translateY(20px); /* Start slightly zoomed and lower */
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* Exiting Animation: Scale Down + Fade Out */
@keyframes scaleDownFadeOut {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(2px);
  }
}

/* REMOVED OLD KEYFRAMES to avoid confusion
@keyframes fadeIn ...
@keyframes slideIn ...
@keyframes slideOut ...
*/

/* SLIDER NAVIGATION */
.slider-nav {
  display: flex;
  justify-content: center;
  gap: 15px; /* Aradaki boşluk arttırıldı */
  position: relative;
  z-index: 10;
  margin-top: 1.5rem;
}

.slider-dot {
  width: 40px; /* Geniş çizgi */
  height: 5px; /* İnce yükseklik */
  border-radius: 2px; /* Hafif yuvarlak köşe */
  border: none; /* Çerçeveyi kaldır */
  background-color: #d1d1d1; /* Pasif renk (Gri) */
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.slider-dot:hover {
  background-color: #b0b0b0;
  transform: none; /* Büyümeyi kaldır */
}

.slider-dot.active {
  background-color: var(--secondary-color); /* Aktif renk (Altın) */
  width: 60px; /* Aktifken daha uzun */
  height: 5px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero-slider {
    /* Mebilde de aynı stil (gölgeli ve köşeli) kalsın isteniyorsa border-radius ve width'i override etme */
    width: 95%; /* Masaüstü ile aynı */
    margin: 20px auto 0 auto; /* Üstten biraz boşluk bırakıldı (Navbar ile yapışmaması için) */
    border-radius: 20px;
  }

  
  .hero-slider::before {
    /* Mobilde resmin tamamının görünmesi için orijinal oran korunmalı */
    /* Resim 1500x430 => ~28.66% */
    padding-top: 28.66%; 
  }

  .slide img {
    height: 100%;
    /* Resmi kırpmadan tamamını göster */
    object-fit: contain; 
    object-position: center;
  }

  .slider-nav {
    /* Noktaları alta alabiliriz çok dar olacağı için, ya da overlay */
    margin-top: 10px;
    gap: 8px;
    position: relative; /* Altına alalım, resim çok ince */
    bottom: auto;
    left: auto;
    right: auto;
    z-index: 10;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
  }
}
