.gallery-container {
  width: 90%;
  margin: 0 auto;
  text-align: center;
  padding: 40px 0;
}

.gallery-container h2 {
  font-size: 3rem;
  margin-bottom: 30px;
  color: #d2b48c;
}

.gallery-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.gallery-description {
  flex: 1 1 40%;
  text-align: left;
  font-size: 25px;
  line-height: 2;
}

.gallery-videos {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Right carousel */
.carousel {
  position: relative;
  width: 50%;
  height: 500px; /* set container height slightly larger than video */
  overflow: hidden;
  border-radius: 12px;
  padding: 30px;
  background-color: #1b1e55;
  box-shadow: 0px 0px 5px 7px #d2b48c;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Carousel slides: fade effect */
.carousel-slide {
  position: absolute; /* stacked for fade */
  top: 35px;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* center videos vertically */
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

.carousel-slide.active {
  opacity: 1;
  z-index: 10;
}

/* Video itself */
.carousel-slide video {
  width: 500px;          /* keeps the video size you already set */    /* or whatever size you want for video */
  height: 400px;
  border-radius: 12px;
  box-shadow: 0px 0px 15px rgb(255, 255, 255);
  margin: 0 auto;       /* center video inside the container */
  background-color: rgba(0, 0, 0, 0.395);
}

/* Fade-in label */
.video-label {
  margin-top: 10px;
  font-weight: bold;
  font-size: 1.2rem;
  color: #d2b48c;
  opacity: 0;
  transition: opacity 1s ease;
}

.video-label.fade-in {
  opacity: 1;
}

/* Arrows */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(210, 180, 140, 0.8);
  border: none;
  font-size: 2rem;
  padding: 0px 12px 2px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
}
/* Left arrow: inside container, left of video */
.carousel-prev {
  left: 25px;       /* small gap from the left edge of container */
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

/* Right arrow: inside container, right of video */
.carousel-next {
  right: 25px;      /* small gap from the right edge of container */
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

/* Optional hover effect */
.carousel-prev:hover,
.carousel-next:hover {
  background-color: rgba(210, 180, 140, 1);
  transform: translateY(-50%) scale(1.1);
}

/* Dots */
.carousel-dots {
  position: absolute;     /* position relative to carousel container */
  bottom: 15px;           /* distance from bottom */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;            /* above slides */
}

.carousel-dots .dot {
  height: 12px;
  width: 12px;
  background-color: #d2b48c66;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
}

.carousel-dots .dot.active {
  background-color: #d2b48c;
}
/* CTA button */
.cta-button {
  display: inline-block;
  margin-top: 30px;
  background-color: #d2b48c;
  color: #000;
  padding: 14px 40px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

@media (max-width: 900px) {
  /* Reduce container padding */
  .gallery-container {
    padding: 20px 10px;
  }

  /* Stack description above videos */
  .gallery-flex {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  /* Description */
  .gallery-description {
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    line-height: 1.5;
    margin-bottom: 10px;
  }

  /* Videos column */
  .gallery-videos {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
  }

  /* Carousel: keep aspect ratio to prevent smashing */
  .carousel {
    width: 100%;
    aspect-ratio: 5 / 4;    /* maintain 500x400 ratio */
    position: relative;
    overflow: hidden;       /* hide inactive slides */
    padding: 0;             /* remove padding to avoid shrinking */
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Slides: only show active */
  .carousel-slide {
    position: absolute;     /* stack slides */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;           /* fill carousel container */
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
  }

  .carousel-slide.active {
    opacity: 1;
    z-index: 10;
  }

  /* Video scales to container */
  .carousel-slide video {
    width: 100%;
    height: 80%;
    object-fit: cover;      /* prevents stretching */
    border-radius: 12px;
  }

   /* Hide prev/next buttons on mobile */
  .carousel-prev,
  .carousel-next {
    display: none;
  }


  /* CTA button */
  .cta-button {
    font-size: 1rem;
    padding: 12px 30px;
  }
}