/* Video strip (after Popular Currency Tools section) */
.hero-video.hero-wrap.style3.hero-video--section {
  margin-top: 0;
  padding: 80px 0 70px;
  background-color: #fafafc;
}

.theme-dark .hero-video.hero-wrap.style3.hero-video--section {
  background-color: #121212;
}

#homepage-features + .hero-video.hero-video--section {
  border-top: 1px solid rgba(113, 78, 57, 0.08);
}

.theme-dark #homepage-features + .hero-video.hero-video--section {
  border-top-color: rgba(255, 255, 255, 0.06);
}

@media only screen and (min-width: 992px) {
  .hero-video--rtl .hero-video__row,
  .hero-video--rtl[dir="rtl"] .hero-video__row {
    flex-direction: row-reverse;
  }
}

/* Second btn spacing (legacy has one primary btn) */
.hero-video.hero-wrap.style3 .hero-content .hero-btn a.btn.style5 {
  margin-right: 15px;
}

/* Media column */
.hero-video__media {
  width: 100%;
}

.hero-video--has-slider .hero-video__media {
  display: flex;
  justify-content: center;
}

/* Video thumbnail */
.hero-video__figure {
  margin: 0 auto;
  max-width: 100%;
  width: 100%;
}

.hero-video__figure--solo {
  max-width: 520px;
  margin-inline: auto;
}

.hero-video__thumb {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  background: #1a120d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  aspect-ratio: 16 / 9;
  transition: box-shadow 0.25s ease;
}

.hero-video--has-slider .hero-video__thumb {
  aspect-ratio: unset;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.hero-video__thumb:hover {
  box-shadow: 0 8px 28px rgba(42, 28, 20, 0.14);
}

.hero-video__thumb:focus-visible {
  outline: 2px solid #714e39;
  outline-offset: 2px;
}

.hero-video__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 5px;
}

.hero-video__thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.hero-video__thumb-play i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 26px;
  color: #714e39;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding-left: 3px;
}

.hero-video__thumb:hover .hero-video__thumb-play {
  background: rgba(0, 0, 0, 0.3);
}

.hero-video__caption {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

/* Merged video + photo carousel */
.hero-video__carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  border-radius: 14px;
  background: #1a120d;
  box-shadow: 0 18px 48px rgba(61, 42, 31, 0.16);
  overflow: hidden;
}

.hero-video__carousel {
  position: relative;
}

/* Let Owl Carousel control layout (do not override display/float on .owl-item) */
.hero-video-slider.owl-carousel {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hero-video-slider.owl-carousel.owl-loaded {
  opacity: 1;
}

.hero-video-slider .owl-stage-outer {
  border-radius: 14px 14px 0 0;
  overflow: hidden;
}

.hero-video__slide {
  width: 100%;
}

.hero-video--has-slider .hero-video__figure {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: min(65vh, 540px);
  padding: 14px;
  background: #1a120d;
}

.hero-video-slider.owl-carousel .owl-item .hero-video__photo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.hero-video-slider.owl-carousel .owl-item .hero-video__thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-video--has-slider .hero-video__thumb-img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

.hero-video-slider .owl-nav {
  margin: 0;
}

.hero-video-slider .owl-nav button.owl-prev,
.hero-video-slider .owl-nav button.owl-next {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #714e39 !important;
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  font-size: 0;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.32s cubic-bezier(0.34, 1.25, 0.64, 1),
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.hero-video-slider .owl-nav button.owl-prev i,
.hero-video-slider .owl-nav button.owl-next i {
  font-size: 17px;
  line-height: 1;
}

.hero-video-slider .owl-nav button.owl-prev {
  left: 10px;
  right: auto;
  transform: translateY(-50%) translateX(-10px);
}

.hero-video-slider .owl-nav button.owl-next {
  right: 10px;
  left: auto;
  transform: translateY(-50%) translateX(10px);
}

/* Reveal on hover / keyboard focus inside gallery */
.hero-video__carousel-wrap:hover .hero-video-slider .owl-nav button.owl-prev,
.hero-video__carousel-wrap:hover .hero-video-slider .owl-nav button.owl-next,
.hero-video__carousel-wrap:focus-within .hero-video-slider .owl-nav button.owl-prev,
.hero-video__carousel-wrap:focus-within .hero-video-slider .owl-nav button.owl-next {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

.hero-video__carousel-wrap .hero-video-slider .owl-nav button.owl-prev:hover,
.hero-video__carousel-wrap .hero-video-slider .owl-nav button.owl-next:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  transform: translateY(-50%) translateX(0) scale(1.08);
}

.hero-video__carousel-wrap .hero-video-slider .owl-nav button.owl-prev:active,
.hero-video__carousel-wrap .hero-video-slider .owl-nav button.owl-next:active {
  transform: translateY(-50%) translateX(0) scale(0.96);
  transition-duration: 0.1s;
}

/* Touch devices: keep controls visible but subtle */
@media (hover: none) {
  .hero-video-slider .owl-nav button.owl-prev,
  .hero-video-slider .owl-nav button.owl-next {
    opacity: 0.88;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
  }
}

/* Thumbnail strip */
.hero-video__strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #1a120d;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.hero-video__strip::-webkit-scrollbar {
  height: 5px;
}

.hero-video__strip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-video__strip-btn {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #2a1d15;
  scroll-snap-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-video__strip-btn:hover {
  border-color: rgba(255, 255, 255, 0.55);
}

.hero-video__strip-btn.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(113, 78, 57, 0.55);
  transform: translateY(-1px);
}

.hero-video__strip-btn:focus-visible {
  outline: 2px solid #714e39;
  outline-offset: 2px;
}

.hero-video__strip-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  image-rendering: auto;
  pointer-events: none;
}

.hero-video-slider.owl-carousel .owl-item .hero-video__thumb-img {
  image-rendering: auto;
}

.hero-video__strip-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.hero-video__strip-play i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  color: #714e39;
  background: #fff;
  padding-left: 2px;
}

.hero-video--has-slider .hero-video__caption {
  padding: 10px 12px 14px;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.78);
  background: #1a120d;
  border-radius: 0 0 14px 14px;
}

.theme-dark .hero-video--has-slider .hero-video__caption {
  color: rgba(255, 255, 255, 0.78);
}

.theme-dark .hero-video__caption {
  color: rgba(255, 255, 255, 0.7);
}

.hero-video--rtl .hero-video__caption,
.hero-video[dir="rtl"] .hero-video__caption {
  direction: rtl;
}

/* Video modal */
.hero-video-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hero-video-modal[hidden] {
  display: none !important;
}

.hero-video-modal.is-open {
  display: flex;
}

.hero-video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 6, 0.88);
}

.hero-video-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(320px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  margin: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-video-modal__dialog.is-sized {
  width: auto;
}

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

.hero-video-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  transition: background 0.2s ease;
}

.hero-video-modal--rtl .hero-video-modal__close {
  right: auto;
  left: 10px;
}

.hero-video-modal__close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.hero-video-modal__close i {
  font-size: 20px;
}

.hero-video-modal__frame {
  line-height: 0;
  background: #000;
}

.hero-video-modal__player {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 40px);
  vertical-align: top;
  background: #000;
}

body.hero-video-modal-open {
  overflow: hidden;
}

@media only screen and (max-width: 991px) {
  .hero-video.hero-wrap.style3.hero-video--section {
    padding: 60px 0 50px;
  }

  .hero-video__figure--solo {
    max-width: 520px;
    margin-inline: auto;
  }

  .hero-video--has-slider .hero-video__media {
    justify-content: center;
  }

  .hero-video__carousel-wrap {
    margin-inline: auto;
    max-width: min(100%, 420px);
  }
}

@media only screen and (max-width: 767px) {
  .hero-video.hero-wrap.style3.hero-video--section {
    padding: 48px 0 40px;
  }

  .hero-video-slider .owl-nav button.owl-prev,
  .hero-video-slider .owl-nav button.owl-next {
    width: 30px;
    height: 30px;
  }

  .hero-video-slider .owl-nav button.owl-prev i,
  .hero-video-slider .owl-nav button.owl-next i {
    font-size: 15px;
  }

  .hero-video-slider .owl-nav button.owl-prev {
    left: 6px;
  }

  .hero-video-slider .owl-nav button.owl-next {
    right: 6px;
  }

  .hero-video--has-slider .hero-video__figure {
    padding: 10px;
  }

  .hero-video__strip-btn {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }
}
