/* =========================
   Slider Container
   ========================= */
.slider-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

/* =========================
   Slides
   ========================= */
.slider .slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: auto;
}

/* Image container for proper sizing */
.slider .slides img {
  width: 100%;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
  max-height: 80vh; /* Limits maximum height */
}

/* =========================
   Aspect ratio container
   ========================= */
/* Optional: Use a container with fixed aspect ratio */
.slider-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* If you want a fixed aspect ratio without stretching */
.aspect-ratio-container {
  position: relative;
  width: 100%;
  padding-bottom: 43.75%; /* 16:7 aspect ratio (7/16 = 0.4375 * 100) */
  overflow: hidden;
}

.aspect-ratio-container .slides {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.aspect-ratio-container .slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* =========================
   Slider Buttons
   ========================= */
.slider-buttons button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 5px;
  z-index: 10;
  transition: background 0.3s ease;
}

#prev {
  left: 10px;
}

#next {
  right: 10px;
}

.slider-buttons button:hover {
  background: rgba(255, 0, 0, 0.7);
}

/* =========================
   Slider Dots - Gradient Circles with Animation
   ========================= */
.slider-dots {
  text-align: center;
  margin-top: 10px;
  font-size: 0; /* remove inline-block space */
}

.slider-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff416c, #ff4b2b);
  opacity: 0.5;
  cursor: pointer;
  transition: transform 0.4s ease, opacity 0.4s ease, box-shadow 0.4s ease;
}

/* Hover Effect */
.slider-dots span:hover {
  transform: scale(1.3);
  opacity: 0.8;
}

/* Active Dot Animation */
.slider-dots span.active {
  transform: scale(1.5);
  opacity: 1;
  box-shadow: 0 0 12px rgba(255, 75, 43, 0.7);
  animation: pulse 1.5s infinite alternate ease-in-out;
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1.5);
    opacity: 1;
  }
  50% {
    transform: scale(1.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.5);
    opacity: 1;
  }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .slider-container {
    overflow: hidden;
    width: 100%;
    position: relative;
  }
  
  .slider .slides {
    height: auto;
  }
  
  .slider .slides img {
    width: 100%;
    height: auto;
    max-height: 60vh; /* Lower max-height on mobile */
    object-fit: contain; /* Changed from 'cover' to prevent overflow */
    background-color: #000; /* Optional: add background for letterboxing */
  }
  
  /* If using aspect-ratio container on mobile */
  .aspect-ratio-container {
    padding-bottom: 56.25%; /* 16:9 aspect ratio for mobile */
  }
  
  .aspect-ratio-container .slides img {
    object-fit: contain; /* Changed for mobile */
    background-color: #000; /* Optional background */
  }
  
  .slider-buttons button {
    font-size: 18px;
    padding: 6px 10px;
  }

  .slider-dots span {
    width: 5px;
    height: 5px;
    margin: 0 4px;
  }
}

/* Alternative: Use max-width on image */
.slider-container img {
  max-width: 100%;
  height: auto;
}

/* Optional: Prevent horizontal scrolling on mobile */
@media (max-width: 768px) {
  body, html {
    overflow-x: hidden;
    width: 100%;
  }
}

/* =========================
   Tablet Fix (768px – 1024px)
   ========================= */
@media (min-width: 769px) and (max-width: 1024px) {

  .slider-container {
    overflow: hidden;
    width: 100%;
  }

  .slider .slides {
    align-items: stretch;
  }

  .slider .slides img {
    width: 100%;
    height: 100%;
    max-height: 70vh;       /* Prevents overflow on tablet */
    object-fit: cover;     /* Keeps image filling container */
  }

  /* If aspect-ratio container is used */
  .aspect-ratio-container {
    padding-bottom: 50%;   /* Balanced ratio for tablets */
  }

  .aspect-ratio-container .slides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
