/* --- Slider Container --- */
.editorial-slider-component .slider-inner {
  background-color: transparent; 
  width: 100%;
  position: relative;
}

.editorial-slider-component .slider-item {
  display: none; 
  width: 100%;
  animation: fadeSlide 0.3s ease-in-out;
}

.editorial-slider-component .slider-item.active {
  display: block;
}

/* --- Image Sizing & Wrapper Fix --- */
.editorial-slider-component .slide-image-wrapper {
  position: relative;
  width: 100%;
  display: block; /* Prevents Drupal wrappers from shrink-wrapping smaller images */
}

/* Force Drupal's native media wrappers to expand to full width */
.editorial-slider-component .slide-image-wrapper > div,
.editorial-slider-component .slide-image-wrapper > article,
.editorial-slider-component .slide-image-wrapper figure {
  width: 100% !important;
  margin: 0;
}

.editorial-slider-component .slide-image-wrapper img {
  width: 100% !important;
  aspect-ratio: 16 / 9; /* Creates a perfectly uniform slider frame for all images */
  object-fit: cover; /* Fills the space nicely without distortion */
  display: block;
  border-radius: 8px;
}

/* --- Slider Caption (Italicized) --- */
.editorial-slider-component .slide-image-wrapper figcaption,
.editorial-slider-component .slide-image-wrapper .field--name-field-media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 26, 0.85); /* Semi-transparent dark background */
  color: #ffffff;
  padding: 1rem 4rem; /* Wide side padding so slider arrows don't overlap text */
  text-align: center;
  font-size: 0.95rem;
  font-style: italic; /* Forces italics */
  margin: 0;
  z-index: 5;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* --- OnClick Navigation Buttons --- */
.editorial-slider-component .slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26, 26, 26, 0.8);
  color: #D4AF37;
  border: 2px solid #D4AF37;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.editorial-slider-component .slider-btn:hover {
  background: #D4AF37;
  color: #1A1A1A;
}

.editorial-slider-component .prev-btn { left: 15px; }
.editorial-slider-component .next-btn { right: 15px; }

.editorial-slider-component .slider-icon {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
}

/* --- Slide Counter --- */
.editorial-slider-component .slider-counter {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(26, 26, 26, 0.8);
  color: #fff;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  z-index: 10;
}

/* --- Animations --- */
@keyframes fadeSlide {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}