/* Carousel Gallery Styles - Mobile design for all screen sizes */
.carousel-gallery {
  position: relative;
  width: min(100%, 75svh);
  margin: 0 auto 30px;
  overflow: hidden;
  background-color: #000;
  border-radius: 15px;
  border: 2px solid hsl(0, 0%, 70%);
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
  aspect-ratio: 1;
}

.carousel-slide {
  flex: 0 0 100%;
  /* Always show 1 slide at a time */
  position: relative;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  opacity: 0.7;
  transform: scale(1.1);
  /* Prevent blur edges from showing */
  z-index: 0;
}

.carousel-image {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 0;
  transition: transform 0.3s ease;
}

/* Facebook layout styles within carousel */
.carousel-facebook-layout {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.carousel-facebook-layout .gallery-photos {
  background: transparent;
  width: 100%;
  max-width: 600px;
  max-height: 80%;
}

/* Caption styles */
.carousel-caption {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.carousel-nav-button {
  position: absolute;
  bottom: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  z-index: 100;
  color: white;
  transition: all 0.3s ease;
  border: none;
  font-weight: bold;
}

.carousel-nav-button:focus {
  outline: none;
}

.carousel-nav-button:hover {
  background-color: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.6);
}

.carousel-nav-button.prev {
  left: 0.75rem;
}

.carousel-nav-button.next {
  right: 0.75rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  /* Increased width to accommodate active dot expansion */
  height: 0.5rem;
  overflow: hidden;
  z-index: 101;
  padding: 0.5rem 0;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.3);
}

.carousel-dots-slider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  height: 100%;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.carousel-dot:hover {
  background-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.carousel-dot.active {
  width: 24px;
  border-radius: 4px;
  background-color: white;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

/* Directional expansion animations */
.carousel-dot.expanding-right {
  transform-origin: left center;
  animation: expandRight 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-dot.expanding-left {
  transform-origin: right center;
  animation: expandLeft 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes expandRight {
  0% {
    width: 8px;
    transform: scaleX(1);
  }

  50% {
    transform: scaleX(1.5);
  }

  100% {
    width: 24px;
    transform: scaleX(1);
  }
}

@keyframes expandLeft {
  0% {
    width: 8px;
    transform: scaleX(1);
  }

  50% {
    transform: scaleX(1.5);
  }

  100% {
    width: 24px;
    transform: scaleX(1);
  }
}

.carousel-dot.edge {
  width: 6px;
  height: 6px;
  opacity: 0.7;
  transform: scale(0.8);
}

.carousel-dot.edge:hover {
  opacity: 0.9;
  transform: scale(1.0);
}

@media (min-width: 768px) {
  .carousel-caption {
    font-size: 1.2rem;
    padding: 10px 20px;
  }

  .carousel-slide {}
}