/* ========================================
   CAROUSEL STYLES
   ======================================== */

.carousel-container {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Carousel Track Container */
.carousel-track-container {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.carousel-slide {
  min-width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: none;
}

.carousel-slide.active {
  opacity: 1;
  display: block;
}

/* Carousel Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
  left: 1rem;
}

.carousel-btn-next {
  right: 1rem;
}

.carousel-btn svg {
  color: #333;
}

/* Carousel Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.carousel-indicators .indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-indicators .indicator:hover {
  background: #999;
  transform: scale(1.2);
}

.carousel-indicators .indicator.active {
  background: #333;
  width: 32px;
  border-radius: 6px;
}

/* Image styling within carousel */
.carousel-slide .project-hero-image {
  margin: 0;
}

.carousel-slide .project-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.carousel-slide .project-hero-image figcaption {
  text-align: center;
  font-style: italic;
  color: #666;
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn-prev {
    left: 0.5rem;
  }

  .carousel-btn-next {
    right: 0.5rem;
  }

  .carousel-indicators {
    gap: 0.5rem;
  }

  .carousel-indicators .indicator {
    width: 10px;
    height: 10px;
  }

  .carousel-indicators .indicator.active {
    width: 24px;
  }
}

/* Keyboard navigation focus styles */
.carousel-btn:focus,
.carousel-indicators .indicator:focus {
  outline: 2px solid #333;
  outline-offset: 2px;
}

/* Smooth transitions for slide changes */
.carousel-slide.sliding-out {
  animation: slideOut 0.5s ease-in-out;
}

.carousel-slide.sliding-in {
  animation: slideIn 0.5s ease-in-out;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
