/* VIDEO BOX STYLE */

.e-con > .e-con-inner > .elementor-element.elementor-widget.elementor-widget-video-box {
  max-width: var(--blog-max-content-width);
  margin: 0 auto;
  min-width: var(--blog-max-content-width);
}
.elementor-widget-video-box .video_container {
  width: 100%;
  max-width: 80%;
}
.elementor-widget-video-box .enw_video_box_wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  background-size: contain;
  background-position: top;
  background-repeat: no-repeat;
  background-position-y: -30px;
}

.elementor-widget-video-box .video_box_title {
  text-align: center;
  margin: 0;
}

.elementor-widget-video-box .video_box_description p {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* Set video and iframe responsiveness */
.elementor-widget-video-box iframe, 
.elementor-widget-video-box video {
  /* max-width: 80%; Keep maximum width */
  width: 100%; /* Ensures responsiveness */
  height: auto; /* Maintain aspect ratio */
  margin: 0 auto;
}

/* Video wrapper for responsive aspect ratio */
.elementor-widget-video-box .video_wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Tablet media query */
@media (max-width: 1024px) {
  .elementor-widget-video-box .video_wrapper {
      aspect-ratio: var(--elementor-aspect-ratio-tablet); /* Adjust aspect ratio for tablets */
  }
}

/* Mobile media query */
@media (max-width: 768px) {
  .elementor-widget-video-box .video_wrapper {
      aspect-ratio: var(--elementor-aspect-ratio-mobile); /* Adjust aspect ratio for mobile */
  }
  .elementor-widget-video-box .video_container {
    width: 100%;
    max-width: 95%;
  }
}

/* Centering video and iframe inside wrapper */
.elementor-widget-video-box .video_wrapper video,
.elementor-widget-video-box .video_wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  right: 0;
  bottom: 0;
}

/* Responsive description styles */
@media screen and (max-width: 767px) {
  .elementor-widget-video-box .video_box_description p {
      width: 100%;
      padding: 0 10px; /* Add padding for smaller screens */
  }
}

@media screen and (min-width: 360px) and (max-width: 1024px) {
  .elementor-widget-video-box .enw_video_box_wrapper {
      gap: 25px; /* Reduce gap for smaller devices */
      padding-top: 40px; /* Reduce padding for smaller devices */
      background-size: unset; /* Adjust background size for smaller devices */
  }
}
