/**
 * Bootstrap 5.3 Carousel - Slider Component
 * Uses Bootstrap's built-in carousel slider functionality
 */

/* Display utilities */
.d-block { display: block !important; }
.w-100 { width: 100% !important; }
.d-none { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border-width: 0 !important; }


/* Carousel Base Styles */
.carousel {
  position: relative;
  width: 100%;
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-inner::after {
  display: block;
  clear: both;
  content: "";
}

.carousel-item {
  position: relative;
  display: none;
  float: left;
  width: 100%;
  margin-right: -100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

.carousel-item.active {
  display: block;
}

.carousel-item-next,
.carousel-item-prev {
  display: block;
}

.carousel-item-next.carousel-item-start,
.carousel-item-prev.carousel-item-end {
  transform: translateX(0);
}

.carousel-item-next,
.active.carousel-item-end {
  transform: translateX(100%);
}

.carousel-item-prev,
.active.carousel-item-start {
  transform: translateX(-100%);
}

/* Slide transition (default) */
.carousel-item {
  transition: transform 0.6s ease-in-out;
}

/* Fade transition effect */
.carousel-fade .carousel-item {
  display: block;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  transform: none;
  -webkit-transform: none;
}

.carousel-fade .carousel-item.active {
  opacity: 1;
  z-index: 1;
}

.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  z-index: 0;
  opacity: 0;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
  z-index: 0;
  opacity: 0;
}

.carousel-fade .carousel-item-next,
.carousel-fade .carousel-item-prev {
  transform: none;
  -webkit-transform: none;
}
/* Carousel Controls - Previous/Next Buttons */
.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15%;
  padding: 0;
  color: #fff;
  text-align: center;
  background-color: transparent;
  border: 0;
  opacity: 0.5;
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.carousel-control-prev:hover,
.carousel-control-prev:focus,
.carousel-control-next:hover,
.carousel-control-next:focus {
  color: #fff;
  text-decoration: none;
  outline: 0;
  opacity: 0.9;
}

.carousel-control-prev {
  left: 0;
}

.carousel-control-next {
  right: 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Responsive carousel controls for mobile */
@media (max-width: 767.98px) {
  .carousel-control-prev,
  .carousel-control-next {
    width: 20%;
  }

  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

/* Carousel Indicators - Slider Dots */
.carousel-indicators {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 6px;
}

.carousel-indicators [data-bs-target],
.carousel-indicators [data-bs-slide-to] {
  box-sizing: content-box;
  flex: 0 1 auto;
  width: 30px;
  height: 3px;
  padding: 0;
  margin: 0;
  text-indent: -999px;
  cursor: pointer;
  background-color: #fff;
  background-clip: padding-box;
  border: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  opacity: 0.5;
  transition: opacity 0.6s ease;
}

.carousel-indicators .active {
  opacity: 1;
}

/* Responsive indicators */
@media (max-width: 767.98px) {
  .carousel-indicators [data-bs-target],
  .carousel-indicators [data-bs-slide-to] {
    width: 20px;
    height: 2px;
    border-top-width: 8px;
    border-bottom-width: 8px;
  }
}

/* Carousel Caption */
.carousel-caption {
  position: absolute;
  right: 15%;
  bottom: 20px;
  left: 15%;
  padding-top: 20px;
  padding-bottom: 20px;
  text-align: center;
  color: #fff;
}

.carousel-caption h1,
.carousel-caption h2,
.carousel-caption h3 {
  color: inherit;
}

/* Responsive captions */
@media (max-width: 767.98px) {
  .carousel-caption {
    right: 0;
    bottom: 10px;
    left: 0;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .carousel-caption h1,
  .carousel-caption h2,
  .carousel-caption h3 {
    font-size: 16px !important;
    margin: 4px 0;
  }

  .carousel-caption p {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }
}

@media (max-width: 576px) {
  .carousel-caption {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .carousel-caption h1,
  .carousel-caption h2,
  .carousel-caption h3 {
    font-size: 14px !important;
  }

  .carousel-caption p {
    font-size: 11px !important;
    margin-bottom: 5px !important;
  }
}
