/* Video Banner Main Block Styles */

/* Main container - full width hero */
.video-banner-container {
  position: relative;
  width: 100%;
  height: 100vh; /* Adjust hero height as needed */
  min-height: 500px;
  max-height: 900px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Full-width alignment for the block */
.alignfull .video-banner-container {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

/* Video background wrapper */
.video-background-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Placeholder image - shows while video loads */
.video-placeholder-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  transition: opacity 0.8s ease-in-out;
}

.video-placeholder-image.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Background video iframe - covers entire container */
.background-video-iframe,
.hero-main-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100%;
  min-width: 177.77vh; /* 16:9 aspect ratio */
  transform: translate(-50%, -50%);
  pointer-events: none; /* Prevents interaction with video */
  border: none;
  outline: none;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.background-video-iframe.fade-in,
.hero-main-video.fade-in {
  opacity: 1 !important;
}

/* Force hide any remaining player UI elements */
.background-video-iframe::after,
.hero-main-video::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
}

/* Video overlay for better text contrast */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.1) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  z-index: 3;
}

/* Content overlay area for inner blocks */
.video-banner-content-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 40px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 70%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 50%;
}

/* Style content within the overlay */
.video-banner-content-overlay h1,
.video-banner-content-overlay h2,
.video-banner-content-overlay h3,
.video-banner-content-overlay h4,
.video-banner-content-overlay h5,
.video-banner-content-overlay h6 {
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.video-banner-content-overlay p {
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.video-banner-content-overlay .wp-block-buttons {
  margin-top: 1.5rem;
}

.video-banner-content-overlay .wp-block-button {
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

/* Ensure buttons are visible on dark background */


/* Statistics/logos section styling (like in the image) */
.video-banner-content-overlay .wp-block-group {
  margin-top: 2rem;
}

/* Special styling for logo/stats sections */
.video-banner-content-overlay .wp-block-columns {
  align-items: center;
  gap: 1rem;
}

.video-banner-content-overlay .wp-block-column {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  flex-direction: column;
}

/* Image styling within overlay */
.video-banner-content-overlay img {
  max-height: 60px;
  width: auto;
  filter: brightness(1.2) contrast(1.1);
}

/* Stat content styling */
.stat-item {
  text-align: center;
}

.stat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stat-percent {
  font-size: 1.2em !important;
  font-weight: bold !important;
  line-height: 1.2;
}

.stat-text {
  font-size: 0.85em !important;
  font-weight: normal !important;
  line-height: 1.3;
  text-align: center;
}

/* Video placeholder when no URL is provided */
.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  z-index: 2;
}

.video-placeholder p {
  font-size: 1.2rem;
  margin: 0;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
}


/* Responsive design */
@media (max-width: 768px) {
  .video-banner-container {
    height: 60vh;
    min-height: 400px;
  }

  .video-banner-content-overlay {
    padding: 24px;
    min-height: 40%;
  }

  .video-banner-content-overlay h1 {
    font-size: 1.8rem;
  }

  .video-banner-content-overlay .wp-block-buttons {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-banner-content-overlay .wp-block-button {
    margin-right: 0;
    margin-bottom: 1rem;
    width: 100%;
  }

  .video-banner-content-overlay .wp-block-columns {
    flex-direction: column;
    gap: 0.5rem;
  }

  .video-banner-content-overlay img {
    max-height: 40px;
  }
}

@media (max-width: 480px) {
  .video-banner-container {
    height: 50vh;
    min-height: 350px;
  }

  .video-banner-content-overlay {
    padding: 16px;
    min-height: 35%;
  }

  .video-banner-content-overlay h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .video-banner-content-overlay p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
}

/* Ensure site header/navigation stays above video */
.site-header,
.wp-block-navigation,
header {
  position: relative;
  z-index: 999;
}

/* Additional video control hiding (belt and suspenders approach) */
.background-video-iframe[src*="youtube"] {
  border: none;
  background: transparent;
}

.background-video-iframe[src*="vimeo"] {
  border: none;
  background: transparent;
}

/* Splide carousel styles for stats/logos section */
.stats-logos-carousel.splide {
  padding: 0;
}

.stats-logos-carousel .splide__track {
  overflow: visible;
}

.stats-logos-carousel .splide__list {
  align-items: center;
}

.stats-logos-carousel .splide__slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ensure stat items look good in carousel */
.stats-logos-carousel .stat-item {
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.stats-logos-carousel .stat-item:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-2px);
}
.video-inner-blocks{
  display: -webkit-flex;
  display: -ms-flex;
  display: flex;
  color: #fff;
  gap: 10px;
}

/* Responsive carousel adjustments */
@media (max-width: 768px) {
  .stats-logos-carousel .stat-item {
    min-height: 70px;
    padding: 0.5rem 0.75rem;
  }

  .stats-logos-carousel .stat-content {
    gap: 0.1rem;
  }

  .stats-logos-carousel .stat-percent {
    font-size: 1.1em !important;
  }

  .stats-logos-carousel .stat-text {
    font-size: 0.8em !important;
  }
}
