/**
 * MTC Filmstrip Gallery Layout Styles
 */

/* Main wrapping container block rules */
.mtc-filmstrip-block {
  position: relative;
  width: 100%;
  margin: 0 auto 2rem auto;
  max-width: 100%; /* Adapts cleanly to its layout column */
}

/* 1. Main Large Hero Slider Configuration */
.mtc-filmstrip-block .mtc-main-slider {
  width: 100%;
  height: 500px; /* Set a explicit fixed height for the filmstrip stage */
  overflow: hidden;
  position: relative;
  border-radius: 4px;
  background-color: #000;
}

.mtc-filmstrip-block .mtc-main-slider .swiper-slide {
  display: flex;
  justify-content: center; /* Centers the image if it's narrower than the wrapper */
  align-items: center;
  width: 100%;
  height: 100%;
}

.mtc-filmstrip-block .mtc-main-slider .swiper-slide img {
  height: 100%; /* Forces the image to take up 100% of the stage height */
  width: auto; /* Automatically calculates width based on the aspect ratio */
  max-width: 100%; /* Prevents extra-wide images from spilling outside the box */
  object-fit: contain; /* Alternatives: 'contain' keeps it uncropped, 'cover' fills the space */
  display: block;
}

/* Custom Navigation Arrow Overrides */
.mtc-filmstrip-block .mtc-main-slider .swiper-button-next,
.mtc-filmstrip-block .mtc-main-slider .swiper-button-prev {
  color: #ffffff; /* White arrows matching standard gallery themes */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transform: scale(0.8);
  transition: transform 0.2s ease;
}

.mtc-filmstrip-block .mtc-main-slider .swiper-button-next:hover,
.mtc-filmstrip-block .mtc-main-slider .swiper-button-prev:hover {
  transform: scale(1);
}

/* 2. Bottom Filmstrip Track Configuration */
.mtc-filmstrip-block .mtc-thumbs-slider {
  margin-top: 12px;
  box-sizing: border-box;
  height: 75px; /* Fixed track height for the scrolling row */
  overflow: hidden;
}

.mtc-filmstrip-block .mtc-thumbs-slider .swiper-slide {
  height: 100%;
  opacity: 0.4; /* Softly dims unselected elements like the screenshot */
  cursor: pointer;
  transition:
    opacity 0.25s ease-in-out,
    border-color 0.25s ease-in-out;
  border: 2px solid transparent;
  border-radius: 2px;
  box-sizing: border-box;
}

.mtc-filmstrip-block .mtc-thumbs-slider .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1px;
}

/* Hover State for Thumbnails */
.mtc-filmstrip-block .mtc-thumbs-slider .swiper-slide:hover {
  opacity: 0.75;
}

/* Active Filmstrip Image (Brings opacity back up to 100%) */
.mtc-filmstrip-block
  .mtc-thumbs-slider
  .swiper-slide.swiper-slide-thumb-active {
  opacity: 1;
  border-color: #0073aa; /* Optional theme accent frame around the active view */
}
