.mn-research-videos {
  --mn-research-green-desktop: #658072;
  --mn-research-green-mobile: #9cff2c;
  padding: 80px 0;
}

.mn-research-videos .mn-container {
  max-width: 1382px;
  padding-inline: 20px;
  margin-inline: auto;
}

.mn-research-videos__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.mn-research-videos__title-primary,
.mn-research-videos__title-secondary {
  display: block;
  margin: 0;
  font-family: "roc-grotesk-wide", sans-serif !important;
  text-transform: uppercase;
  letter-spacing: 0;
}

.mn-research-videos__title-primary {
  color: #3e3e3e;
  font-size: 60px;
  line-height: 72px;
  font-weight: 700;
}

.mn-research-videos__title-secondary {
  color: #ffffff;
  font-size: 60px;
  line-height: 72px;
  font-weight: 700;
}

.mn-research-videos__header-link {
  margin-top: 12px;
  color: #658072;
  font-family: "roc-grotesk", sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: underline !important;
  white-space: nowrap;
}

.mn-research-videos__header-link:hover {
  color: #658072;
}

.mn-research-videos__desktop,
.mn-research-videos__mobile {
  overflow: visible;
}

.mn-research-videos__desktop.swiper,
.mn-research-videos__mobile.swiper {
  cursor: grab;
}

.mn-research-videos__desktop.swiper:active,
.mn-research-videos__mobile.swiper:active {
  cursor: grabbing;
}

.mn-research-videos__mobile {
  display: none;
}

.mn-research-videos__desktop .swiper-slide {
  max-width: 406px;
}

.mn-research-videos__card {
  border-radius: 20px;
  overflow: visible;
  aspect-ratio: 406 / 524;
}

.mn-research-videos__media {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 406 / 524;
  background: #131313;
}

.mn-research-videos__video,
.mn-research-videos__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

/* Fit option: show the whole video, letterboxed on the dark media background (poster stays cover) */
.mn-research-videos__media--fit .mn-research-videos__video {
  object-fit: contain;
}

.mn-research-videos__video {
  z-index: 0;
}

.mn-research-videos__poster {
  z-index: 1;
  transition: opacity 0.35s ease;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.mn-research-videos__chrome {
  position: absolute;
  inset: 0;
  z-index: 2;
  transition: opacity 0.35s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.mn-research-videos__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.68) 100%);
  pointer-events: none;
}

.mn-research-videos__gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.46) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.66));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mn-research-videos__card-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  margin: 0;
  color: #F5F1E8;
  font-family: "roc-grotesk-wide", sans-serif !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mn-research-videos .mn-vid-card__play-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mn-research-videos .mn-vid-card__play {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  background: #00000040;
  transition:
    background 0.2s,
    transform 0.2s;
}

.mn-research-videos .mn-vid-card__play::after {
  content: "";
  display: block;
  position: absolute;
  top: -1px;
  left: -1px;
  transform: rotate(45deg);
  transform-origin: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transition: 0.3s border cubic-bezier(0.4, 0, 0.2, 1);
}

.mn-research-videos .mn-vid-card__play:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mn-research-videos .mn-vid-card__play-icon {
  display: block;
  width: 20px;
  height: 20px;
  margin-left: 4px;
}

.mn-research-videos .mn-vid-card__pause-icon {
  display: none;
  width: 20px;
  height: 20px;
  margin-left: 0;
}

.mn-research-videos__card.is-playing .mn-vid-card__play-icon {
  display: none;
}

.mn-research-videos__card.is-playing .mn-vid-card__pause-icon {
  display: block;
}

.mn-research-videos__card.is-playing .mn-vid-card__play-container {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}

.mn-research-videos__card.is-playing:hover .mn-vid-card__play-container,
.mn-research-videos__card.is-playing:focus-within .mn-vid-card__play-container {
  opacity: 1;
  visibility: visible;
}

.mn-research-videos__product {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  background: #161618e3;
  border-radius: 10px;
}

.mn-research-videos__product--overlay {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mn-research-videos__product--mobile {
  display: none;
  margin-top: 14px;
}

.mn-research-videos__product-image {
  width: 80px;
  height: 74px;
  border-radius: 10px;
  overflow: hidden;
  background: #2a2a2a;
  border: 1px solid #3e3e3e;
  flex-shrink: 0;
}

.mn-research-videos__product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mn-research-videos__product-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mn-research-videos__product-name {
  margin: 0;
  color: #f5f1e8;
  font-family: "roc-grotesk", sans-serif !important;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mn-research-videos__product-price {
  margin: 0 0 10px;
  color: #c6ff39;
  font-family: "roc-grotesk", sans-serif;
  font-size: 12px;
  line-height: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.mn-research-videos__product-price .woocommerce-Price-amount {
  color: inherit;
}

.mn-research-videos__product-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ffffff;
  font-family: "roc-grotesk", sans-serif;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: underline !important;
}

.mn-research-videos__product-link svg {
  color: #c6ff39;
  flex-shrink: 0;
}

.mn-research-videos__card.is-playing .mn-research-videos__poster {
  opacity: 0;
  pointer-events: none;
}

.mn-research-videos__card.is-playing .mn-research-videos__gradient {
  opacity: 0;
}

.mn-research-videos__card.is-playing .mn-research-videos__video {
  z-index: 1;
}

.mn-research-videos__card.is-playing .mn-research-videos__product--overlay {
  opacity: 1;
  pointer-events: auto;
}

.mn-research-videos__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 47px;
}

.mn-research-videos__pagination-viewport {
  width: 88px;
  overflow: hidden;
}

.mn-research-videos__pagination-track {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.mn-research-videos__dot {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--mn-research-green-desktop);
  opacity: 0.2;
  transition:
    opacity 0.25s,
    width 0.25s,
    height 0.25s,
    border-radius 0.25s;
}

.mn-research-videos__dot.is-active {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  opacity: 1;
}

.mn-research-videos__dot.is-neighbor {
  opacity: 0.45;
}

.mn-research-videos__pagination-track .mn-research-videos__dot:nth-child(3) {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 60%);
  mask-image: linear-gradient(to right, transparent 0%, #000 60%);
}

.mn-research-videos__pagination-track .mn-research-videos__dot:nth-child(7) {
  -webkit-mask-image: linear-gradient(to left, transparent 0%, #000 60%);
  mask-image: linear-gradient(to left, transparent 0%, #000 60%);
}

.mn-research-videos__pagination-track.is-going-next .mn-research-videos__dot:nth-child(7) {
  -webkit-mask-image: none;
  mask-image: none;
}

.mn-research-videos__pagination-track.is-going-prev .mn-research-videos__dot:nth-child(3) {
  -webkit-mask-image: none;
  mask-image: none;
}

@media (max-width: 991px) {
  .mn-research-videos__pagination {
    margin-top: 31px;
    min-height: 10px;
  }

  .mn-research-videos {
    padding: 48px 0;
    --mn-research-green-desktop: var(--mn-research-green-mobile);
  }

  .mn-research-videos__header {
    align-items: center;
    margin-bottom: 24px;
    padding: 0 16px;
  }

  .mn-research-videos__title-primary {
    margin-bottom: 12px;
  }

  .mn-research-videos__title-primary,
  .mn-research-videos__title-secondary {
    font-size: 24px !important;
    line-height: 1 !important;
  }

  .mn-research-videos__header-link {
    display: none;
  }

  .mn-research-videos__desktop {
    display: none;
  }

  .mn-research-videos__mobile {
    display: block;
    padding-inline: 30px;
  }

  .mn-research-videos__card-title {
    font-size: 26px;
    line-height: 30px;
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .mn-research-videos__product--overlay {
    display: none;
  }

  .mn-research-videos__product--mobile {
    display: flex;
  }

  .mn-research-videos .mn-container {
    padding-inline: 0;
  }

  .mn-research-videos__mobile .swiper-slide:not(.swiper-slide-active) .mn-research-videos__gradient::after {
    opacity: 1;
  }
}

/* YouTube/Vimeo embed — cover-fit a 16:9 iframe in the portrait card; controlled via the overlay play button */
.mn-vid-embed.mn-vid-embed { /* doubled class outranks Elementor's `.elementor iframe` reset */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300%; /* landscape fallback; JS sizes to the real video aspect for true cover */
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  z-index: 0;
  pointer-events: none;
}

/* Fit option: contain a 16:9 embed (JS refines Vimeo to its real aspect) */
.mn-vid-embed.mn-vid-embed[data-mn-fit] {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 100%;
}
