/* 
=================================================================================
CRITICAL LAYOUT SAFETY OVERRIDE
This rule tells the browser: let elements float around, but chop off horizontal layout breaking lines.
=================================================================================
*/
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

.carousel-stage {
  max-width: 100%;
  margin: 40px auto;
  position: relative;
  background: #0b0c10;
  border-radius: 12px;
  padding: 10px;
  box-sizing: border-box;
}

.carousel-wheel {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.wheel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 8px;
  overflow: hidden; 
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s ease, opacity 0.8s ease;
  box-sizing: border-box;
  background: transparent;
}

.wheel-slide iframe {
  width: 103% !important;
  height: 103% !important;
  margin-top: -1.5% !important;
  margin-left: -1.5% !important;
  border: 0 !important;
  display: block;
  pointer-events: none !important; 
  position: relative;
  z-index: 1; /* Lowest layer inside the slide */
}

/* NEW: The Iframe Content Opacity Tint Layer */
.iframe-tint-shield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3; /* Sits directly in front of the iframe image data */
  pointer-events: none;
  transition: background-color 0.8s ease;
}

/* Independent backdrop tint block layer handling the blur background color */
.slide-bg-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5; /* Sits at the front of the background filters */
  pointer-events: none;
  transition: background-color 0.8s ease;
}

/* Invisible block shield for mobile swipe gesture processing loop capture */
.wheel-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10;
  pointer-events: auto !important; 
}

.wheel-prev, .wheel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.25); 
  backdrop-filter: blur(5px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 14px 18px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10000; 
  font-size: 16px;
  user-select: none;
  transition: background 0.3s ease;
}
.wheel-prev:hover, .wheel-next:hover {
  background: rgba(255, 255, 255, 0.4);
}
.wheel-prev { left: -30px; }
.wheel-next { right: -30px; }

@media (max-width: 768px) {
  .carousel-stage {
    width: 100% !important;
    height: auto !important; 
    aspect-ratio: var(--c3dc-ratio, 16/9);
  }
  .wheel-prev { left: 10px; }
  .wheel-next { right: 10px; }
}
