/* ========================================
   CAROUSEL STYLES - FIXED VERSION
   ======================================== */

.carousel-container {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 4rem 3rem; /* Added more padding for white space */
}

.carousel-wrapper {
  position: relative;
  width: 100%;
  padding: 0 90px; /* Increased from 70px for more side space */
}

/* Carousel Track Container */
.carousel-track-container {
  overflow: hidden;
  width: 100%;
  padding: 4rem 0; /* Increased from 2rem to 3rem for more vertical space */
  position: relative;
}

.carousel-track {
  display: flex;
  align-items: center;
  position: relative;
  left: 0;
  transition: transform 0.5s ease-in-out;
}

.carousel-slide {
  flex: 0 0 70%; /* Each slide takes 70% of container width */
  margin: 0 15%; /* Center the slide with equal margins */
  opacity: 0.3;
  transform: scale(0.85);
  transition: all 0.5s ease-in-out;
  cursor: pointer;
}

.carousel-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
  cursor: default;
}

/* Carousel Navigation Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.95);
  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.15);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) scale(1.1);
}

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

.carousel-btn-prev {
  left: 10px;
}

.carousel-btn-next {
  right: 10px;
}

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

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

.carousel-indicators .indicator {
  width: 10px;
  height: 10px;
  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: 28px;
  border-radius: 5px;
}

/* Image styling within carousel */
.carousel-slide .project-hero-image {
  margin: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.carousel-slide.active .project-hero-image {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.carousel-slide .project-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 600px;
  object-fit: contain;
}

.carousel-slide .project-hero-image figcaption {
  text-align: center;
  font-style: italic;
  color: #666;
  padding: 1rem;
  font-size: 0.9rem;
  background: #fff;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .carousel-slide {
    flex: 0 0 80%;
    margin: 0 10%;
  }
  
  .carousel-wrapper {
    padding: 0 60px;
  }
}

@media (max-width: 768px) {
  .carousel-slide {
    flex: 0 0 90%;
    margin: 0 5%;
    transform: scale(0.92);
  }
  
  .carousel-slide.active {
    transform: scale(1);
  }
  
  .carousel-wrapper {
    padding: 0 50px;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  .carousel-btn-prev {
    left: 5px;
  }

  .carousel-btn-next {
    right: 5px;
  }

  .carousel-indicators {
    gap: 0.4rem;
  }

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

  .carousel-indicators .indicator.active {
    width: 20px;
  }
  
  .carousel-slide .project-hero-image img {
    max-height: 400px;
  }
}

@media (max-width: 480px) {
  .carousel-slide {
    flex: 0 0 100%;
    margin: 0;
  }
  
  .carousel-slide .project-hero-image img {
    max-height: 300px;
  }
}

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