/* --- Motion Page Styles --- */
.motion-description {
    width: 100%;
    padding-left: 10%;
    margin-bottom: 2rem;
    text-align: left;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.carousel-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

/* carousel styles */
.carousel {
  --carousel-height: 500px;
  --carousel-width: 1000px; /* Adjusted width for 3 items */
  --carousel-item-width: 350px; /* Base item width */
  width: 100%;
  position: relative;
}

.carousel-container {
  align-items: center;
  display: flex;
  min-height: var(--carousel-height);
  margin: 0 auto;
  max-width: var(--carousel-width);
  position: relative;
}

.carousel-item {
  /* Remove fixed height to maintain aspect ratio */
  opacity: 0;
  position: absolute;
  transform: translateX(-50%);
  transition: all 0.3s ease-in-out;
  width: var(--carousel-item-width);
  z-index: 0;
  border-radius: 10px;
  /* Add a container for the video and controls */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Hide controls that might overflow */
}

.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.carousel-item video:fullscreen {
    object-fit: contain;
}

/* Left item */
.carousel-item-1 {
  left: 25%;
  opacity: 0.4;
  transform: translateX(-50%) scale(0.8);
}

/* Center item */
.carousel-item-2 {
  width: calc(var(--carousel-item-width) * 1.5);
  opacity: 1;
  left: 50%;
  transform: translateX(-50%) scale(1);
  z-index: 2;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1), 0 0 60px rgba(0, 0, 0, 0.1);
}

/* Right item */
.carousel-item-3 {
  left: 75%;
  opacity: 0.4;
  transform: translateX(-50%) scale(0.8);
}

/* Hidden items - ensure they are not visible */
.carousel-item-4,
.carousel-item-5 {
  opacity: 0;
  transform: translateX(-50%) scale(0.5);
  pointer-events: none; /* Prevent interaction */
  left: 50%; /* Keep them centered to avoid peeking */
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    pointer-events: none; /* Allow clicks to pass through to buttons */
}

/* carousel button styles */
.carousel-control {  
  background-color: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease-out;
  pointer-events: auto; /* Make buttons clickable */
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-control:hover {
  transform: scale(1.1);
}

/* previous button */
.carousel-control-previous::after {
  content: '‹';
  font-size: 2.5rem;
  line-height: 50px;
  font-weight: 200;
}

/* next button */
.carousel-control-next::after {
  content: '›';
  font-size: 2.5rem;
  line-height: 50px;
  font-weight: 200;
}

.ax-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}