/* Carousel with Neutral Colors */
.mg-mega-carousel {
  --primary-color: #666; /* Medium gray */
  --dot-inactive: #ddd; /* Light gray */
  --dot-size: 8px;
  --dot-spacing: 12px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mg-mega-carousel:not(.loaded) .mg-carousel__slide {
  transition: none !important;
}

.mg-carousel__viewport {
  position: relative;
  height: 600px;
}

.mg-carousel__slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.98);
  will-change: opacity, transform;
}

.mg-carousel__slide.mg-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.mg-carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mg-carousel__slide.mg-active .mg-carousel__image {
  transform: scale(1);
}

.mg-carousel__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation Controls */
.mg-carousel__controls {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 2;
}

.mg-carousel__nav {
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: ease-in-out 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mg-carousel__nav:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
}

/* Dot Navigation */
.mg-mega-carousel-dots-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--dot-spacing);
  background: transparent;
  border-radius: 12px;
}

.mg-mega-carousel-dot {
  width: var(--dot-size);
  height: var(--dot-size);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--dot-inactive), white 15%),
    color-mix(in srgb, var(--dot-inactive), black 10%)
  );
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  margin: 0 calc(var(--dot-spacing) / 2);
}

.mg-mega-carousel-dot::after {
  content: "";
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: -8px;
  right: -8px;
}

.mg-mega-carousel-dot.active {
  width: 32px;
  height: var(--dot-size);
  border-radius: 4px;
  background: #666;
  transform-origin: center;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #666, white 15%),
    #666,
    color-mix(in srgb, #666, black 15%)
  );
}

/* Responsive Design */
@media (max-width: 768px) {
  .mg-carousel__viewport {
    height: 400px;
  }
  
  .mg-carousel__nav {
    width: 36px;
    height: 36px;
  }
  
  .mg-mega-carousel-dots-container {
    padding: 0 8px;
    height: 20px;
  }
  
  .mg-mega-carousel-dot.active {
    width: 24px;
  }
}

/* Dot Animation Update */
.mg-mega-carousel-dot {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade Animations */
@keyframes mg-fade-in {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes mg-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.02);
  }
}

.mg-carousel__slide.mg-exiting {
  animation: mg-fade-out 0.8s forwards;
}

.mg-carousel__slide.mg-entering {
  animation: mg-fade-in 0.8s forwards;
}

.mg-carousel__arrow {
  cursor: pointer;
}
