/* Custom Slider Styles - Optimized for Performance and SEO */

/* === BASE SLIDER STYLES === */
.custom-fade-slider,
.custom-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.custom-fade-slider {
  height: auto;
}

.custom-carousel {
  margin: 20px 0;
}

/* === FADE SLIDER SPECIFIC === */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 400px;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
  position: relative;
}

/* === NAVIGATION DOTS === */
.slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  gap: 15px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.dot:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.dot.active {
  background-color: #ffffff;
  border-color: #007bff;
  transform: scale(1.2);
}

/* === HORIZONTAL CAROUSEL === */
.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 30px;
}

.carousel-slide {
  flex: 0 0 auto;
  width: 470px;
  max-width: 90vw;
}

.industry-carousel .carousel-slide {
  width: 250px;
}

.industry-carousel-grid,
.sections-card-grid:has(> .custom-carousel) {
  display: block;
  grid-template-columns: none;
  max-width: 100%;
}

.industry-carousel-grid > .custom-carousel,
.sections-card-grid:has(> .custom-carousel) > .custom-carousel {
  width: 100%;
}

.industry-carousel.carousel-container {
  width: 100%;
}

/* === NAVIGATION ARROWS === */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.carousel-prev,
.carousel-next {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
}

.carousel-prev:hover,
.carousel-next:hover {
  background-color: #007bff;
  color: white;
  transform: scale(1.1);
}

.carousel-prev:disabled,
.carousel-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  .slider-wrapper {
    min-height: 300px;
  }
  
  .dot {
    width: 10px;
    height: 10px;
  }

  .carousel-slide {
    width: 300px;
  }

  .industry-carousel {
    gap: 12px;
    width: 100%;
  }

  .industry-carousel .carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  .carousel-container {
    gap: 15px;
  }

  .carousel-prev,
  .carousel-next {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .carousel-slide {
    width: 250px;
  }

  .industry-carousel .carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  .carousel-nav {
    padding: 0 10px;
  }
}

/* === PERFORMANCE OPTIMIZATIONS === */
.slide,
.carousel-container {
  will-change: transform, opacity;
}

.custom-fade-slider *,
.custom-carousel * {
  box-sizing: border-box;
}

/* === ACCESSIBILITY === */
.carousel-prev:focus,
.carousel-next:focus,
.dot:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .carousel-container,
  .dot,
  .carousel-prev,
  .carousel-next {
    transition: none;
  }
}
