.banner-section {
  position: relative;
  width: 100%;
  overflow: hidden; /* Prevent any overflow */
}
.banner-section,
.banner-section video,
.banner_video {
  height: 100%;
  width: 100%;
}

/* Remote video container styles */
.banner-video-remote {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000; /* Fallback background */
  transform: scale(1.05); /* Slightly scale the container to ensure full coverage */
  transform-origin: center center;
}

.banner-video-remote video,
.banner-video-remote iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-video-remote iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
  z-index: 1;
  border: none;
  margin: 0;
  padding: 0;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  transform: scale(1.2); /* Increased scaling to eliminate black bars */
  transform-origin: center center;
}

.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  color: #fff;
  font-size: 16px;
  z-index: 0; /* Placeholder behind video */
}

.video-loading {
  opacity: 0.7;
}

.video-error {
  opacity: 0.8;
  color: #ff6b6b;
  font-weight: 500;
}

/* Ensure owl-carousel items have proper height for remote videos */
.banner_video .owl-item .item {
  height: 635px; /* Match banner height */
  width: 100%;
  position: relative;
  overflow: hidden; /* Ensure content doesn't overflow */
}

/* iOS-specific video fixes */
@supports (-webkit-touch-callout: none) {
  .banner-section video {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
  }
  
  .banner-video {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  
  /* Ensure first video loads properly on iOS */
  .banner_video .owl-item:first-child .banner-video {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform;
  }
  
  /* iOS iframe fixes */
  .banner-video-remote iframe {
    -webkit-transform: scale(1.2);
    transform: scale(1.2);
    -webkit-transform-origin: center center;
    transform-origin: center center;
  }
}

.home-banner-detail .banner-btn {
  border: 1px solid #fff;
  color: #fff;
  text-decoration: none;
  padding: 8px 25px;
  border-radius: 3px;
  font-weight: 500;
  font-size: 20px;
  margin-bottom: 10px;
  display: inline-block;
  transition: 0.5s;
}
.home-banner-detail .banner-btn:hover {
  background: #e01020;
  border: 1px solid #e01020;
  transition: 0.5s;
}

.banner__tagline,
.banner__paragraph,
.banner__title {
  font-weight: 100;
}

.home-banner-detail .banner__tagline,
.home-banner-detail .banner__description {
  width: fit-content;
  color: #fff;
  font-weight: 300;
  margin-bottom: 20px;
  font-size: 24px;
}

.home-banner-detail .banner__tagline {
  border-bottom: 2px solid #fff;
  padding-bottom: 9px;
  margin-bottom: 25px;
}

.home-banner-detail .banner__title {
  font-size: 40px;
  word-wrap: break-word;
  max-width: 30%;
  margin: auto;
  margin-bottom: 25px;
  text-align: left;
  position: absolute;
  left: 30px;
  font-weight: 400;
  text-shadow: 3px 3px 5px #000;
}

.banner__tagline,
.banner__title {
  line-height: 1;
}

.banner-section video {
  width: 100%;
  object-fit: cover;
}

.banner-section .banner_content {
  gap: 15px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  text-align: left;
  right: 0;
  margin: 0 auto;
  margin-top: 25px;
  z-index: 3;
  width: 100%;
}
.banner_video::before {
  position: absolute;
  content: '';
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #00071a;
  opacity: 0.3;
  z-index: 2;
}

.banner_video .owl-dots {
  position: absolute;
  left: 50%;
  bottom: 15%;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
.banner__title {
  font-weight: 800;
  line-height: 1.2;
}
.home-banner-detail .banner__description {
  max-width: 30%;
  text-align: left;
  margin: auto;
  margin-right: 30px;
  background: rgba(5, 5, 5, 0.55);
  opacity: 1;
  padding: 20px;
}
.home-banner-detail .banner__description p {
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  display: block;
  display: -webkit-box;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
}
.home-banner-detail .banner__description p,
.home-banner-detail .banner__description p a {
  font-weight: 400;
  opacity: 0.9;
  color: #fff;
}
.home-banner-detail .banner__description p a:hover {
  color: #e01020;
}

.banner-section .content-slider.owl-carousel .owl-stage-outer {
  position: absolute;
  min-height: 230px;
  width: 100%;
}
.banner-section .content-slider.owl-carousel .owl-dots {
  position: absolute;
  top: 225px;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Responsive Styles */

@media (width: 1536px) and (height: 730px) {
  .banner-section video {
      max-height: 500px;
  }
  .banner-section .content-slider.owl-carousel .owl-dots {
      top: 150px;
  }
}
@media (min-width: 1500px) and (max-width: 1700.98px) {
  .banner-video-remote {
    height: 740px;
  }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .banner-section .banner_content {
    margin-top: 0;
  }
  .home-banner-detail .banner__title {
    font-size: 32px;
    max-width: 45%;
  }
  .banner__tagline,
  .banner__paragraph {
    font-size: 18px;
  }
  .search-container i {
    font-size: 16px;
  }
  .home-banner-detail .banner__description {
    max-width: 45%;
  }
  .banner-video-remote {
    height: 615px;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .banner-section .banner_content {
    text-align: center;
    margin-top: 0;
  }
  
  /* Remote video tablet styles */
  .banner-video-remote {
    height: 570px; /* Match container height */
    transform: scale(1.1); /* Increased scaling for tablets */
  }
  
  
  .banner-video-remote iframe {
    transform: scale(1.25); /* More aggressive scaling for tablets */
  }
  
  .banner_video .owl-item .item {
    height: 493px; /* Match tablet banner height */
    overflow: hidden; /* Ensure content doesn't overflow */
  }
  .home-banner-detail .banner__title {
    font-size: 32px;
    max-width: 90%;
    margin: 0px 0px 20px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box !important;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
  }
  .banner__tagline,
  .banner__paragraph {
    margin: 0px auto 20px;
  }
  .banner_video .owl-dots {
    left: 50%;
    bottom: 8%;
    z-index: 9999;
    transform: translatex(-50%);
  }
  .home-banner-detail .banner__tagline,
  .home-banner-detail .banner__paragraph {
    font-size: 22px;
  }
  .home-banner-detail .banner__description p {
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box !important;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
  }
  .banner-section, 
  .banner-section video, 
  .banner_video {
    min-height: 493px;
  }
  .home-banner-detail .banner__description {
    max-width: 100%;
    text-align: left;
    margin-right: 0px;
    padding: 10px;
  }
  .home-banner-detail .banner__title {
    position: inherit;
  }
  .banner-section .content-slider.owl-carousel .owl-stage-outer {
    position: inherit;
  }
  .banner-section .content-slider.owl-carousel .owl-dots {
    position: static;
    transform: none;
  }
  .banner_video::before {
    height: 100%;
  }
}


@media (max-width: 767.98px) {
  .banner-section, .banner-section video, .banner_video {
    min-height: 430px;
  }
  
  /* Remote video mobile styles */
  .banner-video-remote {
    height: 248px; /* Match container height */
    transform: scale(2.5); /* Increased scaling for mobile */
  }
  
  .banner-video-remote iframe {
    transform: scale(1.3); /* More aggressive scaling for mobile */
  }
  
  .banner_video .owl-item .item {
    height: 430px; /* Match mobile banner height */
    overflow: hidden; /* Ensure content doesn't overflow */
  }
  
  /* iOS mobile video fixes */
  @supports (-webkit-touch-callout: none) {
    .banner-section video {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
      -webkit-backface-visibility: hidden;
      backface-visibility: hidden;
    }
    
    .banner-video {
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
      will-change: transform;
    }
  }
  .banner-section .banner_content {
    text-align: center;
    margin-top: 0;
  }
  .home-banner-detail .banner__tagline {
    margin: auto;
    margin-bottom: 15px;
  }
  .home-banner-detail .banner__title {
    font-size: 26px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box !important;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
  }
  .home-banner-detail .banner-btn {
    font-size: 16px;
  }
  .banner_video .owl-dots {
    left: 50%;
    bottom: 8%;
    transform: translatex(-50%);
  }
  .home-banner-detail .banner__tagline,
  .home-banner-detail .banner__paragraph {
    font-size: 18px;
  }
  .home-banner-detail .banner__title {
    max-width: 100%;
  }
  .home-banner-detail .banner__description p {
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box !important;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
  }
  .home-banner-detail .banner__description {
    max-width: 100%;
    text-align: left;
    margin-right: 0px;
    padding: 10px;
  }
  .home-banner-detail .banner__title {
    position: inherit;
  }
  .banner-section .content-slider.owl-carousel .owl-stage-outer {
    position: inherit;
  }
  .banner-section .content-slider.owl-carousel .owl-dots {
    position: static;
    transform: none;
  }
  .banner_video::before {
    height: 430px;
  }
  .banner-section {
    min-height: 430px;
    height: 430px;
  }
}
@media (max-width: 575.98px) {
  .banner-video-remote {
    height: 248px; /* Match container height */
    transform: scale(2.5); /* Increased scaling for mobile */
  }
  .home-banner-detail .banner__title {
    font-size: 22px;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
  }
  .banner-section .content-slider.owl-carousel .owl-stage-outer {
    min-height: 196px;
  }
  .banner-section {
    min-height: 430px;
    height: 430px;
  }
}
