/* Testimonials page styles */

/* Force hero section positioning with maximum specificity */
.sub-page-hero .container-full .sub-hero-content-block {
  padding-bottom: 0px !important;
  margin-bottom: 0px !important;
  justify-content: flex-end !important;
  align-items: flex-end !important;
  display: flex !important;
  flex-direction: column !important;
}

.sub-page-hero .container-full .sub-hero-content-block .sub-hero-desc-block {
  margin-bottom: 0px !important;
  margin-left: 0px !important;
  width: 75% !important;
  max-width: none !important;
  position: absolute !important;
  bottom: 60px !important;
  left: 0px !important;
}

/* Ultra-specific override for left positioning */
.sub-page-hero.background-3-testimonials .container-full .sub-hero-content-block .sub-hero-desc-block {
  left: 0px !important;
  margin-left: 0px !important;
  padding-left: 0px !important;
}

/* Mobile optimization for hero sections - matches what-is-infinity */
@media (max-width: 768px) {
  .sub-page-hero .container-full .sub-hero-content-block {
    padding-bottom: 0.1% !important;
  }
  .sub-page-hero .container-full .sub-hero-content-block .sub-hero-desc-block {
    margin-bottom: 0.05% !important;
    margin-left: 0.3% !important;
    width: 90% !important;
  }
  .sub-hero-h1, .sub-her-h1-black {
    margin-bottom: 10px !important;
  }
  .sub-hero-h2, .sub-hero-h2-black {
    margin-bottom: 8px !important;
    font-size: 1.2em !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
  }
  .sub-page-p-big-white {
    margin-top: 5px !important;
    line-height: 1.3 !important;
    font-size: 0.85em !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .sub-page-hero .container-full .sub-hero-content-block .sub-hero-desc-block {
    margin-bottom: 0.02% !important;
    margin-left: 0.2% !important;
    width: 95% !important;
  }
  .sub-hero-h1, .sub-her-h1-black {
    margin-bottom: 5px !important;
    font-size: 1.8em !important;
  }
  .sub-hero-h2, .sub-hero-h2-black {
    margin-bottom: 5px !important;
    font-size: 1.1em !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
  }
  .sub-page-p-big-white {
    margin-top: 3px !important;
    font-size: 0.8em !important;
    line-height: 1.2 !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
  }
}

/* Video testimonials section vertical centering */
.testimonial-video-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  margin-top: 30px;
}

/* Add top margin to Video Testimonials section on desktop for breathing room */
@media (min-width: 769px) {
  /* Target the video testimonials section specifically */
  .main-section-2.video-testimonials-section,
  .sub-page-hero.background-3-testimonials ~ .main-section-2.video-testimonials-section,
  .sub-page-hero.background-3-testimonials + .main-section-2.video-testimonials-section {
    margin-top: 80px !important;
    padding-top: 20px !important;
  }
  
  /* Fallback for :has() selector support */
  .main-section-2:has(.testimonial-video-grid) {
    margin-top: 80px !important;
  }
}

/* Video testimonials slider layout */
.video-testimonials-container {
  display: flex;
  gap: 20px;
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px;
  justify-content: flex-start;
}

.video-testimonials-container::-webkit-scrollbar {
  height: 8px;
}

.video-testimonials-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.video-testimonials-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.video-testimonials-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.video-testimonial-item {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex: 0 0 400px;
  min-width: 400px;
}

.video-testimonial-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-testimonial-text-block {
  padding: 20px;
  text-align: center;
}

.video-testimonial-text-block .testimonial-slide-h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.video-testimonial-text-block .testimonial-slide-h2 {
  font-size: 14px;
  color: #666;
  font-weight: 400;
}

/* Mobile responsive */
@media (max-width: 1024px) {
  .video-testimonials-container {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .video-testimonials-container {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px;
  }
  
  .video-testimonial-text-block {
    padding: 15px;
  }
  
  .video-testimonial-text-block .testimonial-slide-h1 {
    font-size: 16px;
  }
  
  .video-testimonial-text-block .testimonial-slide-h2 {
    font-size: 13px;
  }
}

/* Horizontal scrollable tabs menu */
.testimonial-tabs-block .tabs-menu {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
  white-space: nowrap;
  width: 100%;
  padding-bottom: 10px;
}

/* Webkit scrollbar styling for tabs menu */
.testimonial-tabs-block .tabs-menu::-webkit-scrollbar {
  height: 6px;
}

.testimonial-tabs-block .tabs-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.testimonial-tabs-block .tabs-menu::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.testimonial-tabs-block .tabs-menu::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Ensure tab links don't wrap */
.testimonial-tabs-block .tabs-menu .testimonials-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  min-width: fit-content;
}

/* Prevent wrapping of tab content */
.testimonial-tabs-block .tabs-menu .testimonials-tab div {
  white-space: nowrap;
}

