/* Homepage responsive overrides — SoftTech + Bootstrap */

/* ----- Hero ----- */
/*
 * Desktop banners include a ~60px navy bar at the top (designed for an overlay header).
 * With a solid in-flow header that strip reads as an empty second blue band — crop it.
 * 60/1920 of image width ≈ displayed strip height (margin-% is width-relative).
 */
#carouselExampleCaptions .carousel-inner {
  overflow: hidden;
}

#carouselExampleCaptions .carousel-item {
  overflow: hidden;
}

#carouselExampleCaptions .carousel-item > img.d-block {
  margin-top: calc(-100% * 60 / 1920);
  width: 100%;
}

.banner-title-new {
  font-size: clamp(1.25rem, 4vw, 2.5rem) !important;
  line-height: 1.2;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

#carouselExampleCaptions .carousel-caption p,
.home-mobile-hero__copy p {
  font-size: clamp(0.875rem, 2.2vw, 1.125rem);
  line-height: 1.45;
  color: #1a1a1a;
  margin-bottom: 1rem;
}

#carouselExampleCaptions .carousel-caption {
  left: 5%;
  right: auto;
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  padding: 1rem;
  text-align: left;
  width: auto !important;
  max-width: min(42%, 28rem);
}

#carouselExampleCaptions .cara-content {
  width: 100% !important;
  max-width: 100%;
}

@media (max-width: 991.98px) {
  #carouselExampleCaptions .carousel-caption {
    max-width: min(55%, 26rem);
  }

  #carouselExampleCaptions .home-hero-qr {
    display: none !important;
  }
}

/* Mobile hero: image then copy in normal flow (no absolute overlay) */
#responsiveCarousel {
  margin-top: 0 !important;
}

/* Variable-height slides + fade (no horizontal swipe collage) */
#responsiveCarousel .carousel-inner {
  overflow: hidden;
}

#responsiveCarousel .carousel-item {
  position: relative;
  float: none;
  margin-right: 0;
  height: auto;
}

#responsiveCarousel .carousel-item.active,
#responsiveCarousel .carousel-item-next,
#responsiveCarousel .carousel-item-prev {
  display: block;
}

#responsiveCarousel.carousel-fade .carousel-item {
  transform: none;
}

#responsiveCarousel.carousel-fade .carousel-item-next:not(.carousel-item-start),
#responsiveCarousel.carousel-fade .active.carousel-item-end,
#responsiveCarousel.carousel-fade .carousel-item-prev:not(.carousel-item-end),
#responsiveCarousel.carousel-fade .active.carousel-item-start {
  transform: none;
}

#responsiveCarousel .carousel-control-prev,
#responsiveCarousel .carousel-control-next {
  width: 2.75rem;
  height: 2.75rem;
  top: 28%;
  bottom: auto;
  transform: translateY(-50%);
  opacity: 0.85;
}

.home-mobile-hero {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
}

.home-mobile-hero__media {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: top;
}

.home-mobile-hero__copy {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.25rem 1.75rem;
  background: #fff;
  text-align: left;
  scroll-margin-top: 5rem;
}

.home-mobile-hero__copy .banner-title-new {
  margin-top: 0;
}

.home-mobile-hero__cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  max-width: 100%;
  width: auto;
  white-space: normal;
  line-height: 1.3;
  font-size: 0.95rem;
  padding: 0.75rem 1.1rem;
  text-align: center;
}

#responsiveCarousel .home-hero-qr {
  display: none !important;
}

@media (min-width: 480px) and (max-width: 767.98px) {
  #responsiveCarousel .home-hero-qr {
    display: flex !important;
    width: 100% !important;
    gap: 0.75rem;
  }

  #responsiveCarousel .home-hero-qr img {
    width: 72px !important;
    height: auto;
  }

  #responsiveCarousel .home-hero-qr p {
    font-size: 0.7rem;
  }
}

/* ----- Sample form ----- */
.tp-subscribe-form #sampleEmailForm {
  width: 100% !important;
  max-width: 100%;
}

.tp-subscribe-form .form-control {
  margin-bottom: 0.75rem;
}

.tp-subscribe-form .captcha img {
  height: auto;
  max-width: 100%;
}

.tp-subscribe-form .home-sample-captcha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.tp-subscribe-form .home-sample-captcha .form-control {
  flex: 1 1 120px;
  min-width: 0;
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .tp-subscribe-area .tp-subscribe-title {
    font-size: clamp(1.15rem, 5vw, 1.5rem);
  }

  .tp-subscribe-form .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* ----- Consultancy / Vimeo ----- */
.home-vimeo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-top: 1rem;
}

.home-vimeo-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.home-consultancy-row > [class*="col-"] {
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .home-vimeo-wrap {
    margin-top: 0;
  }
}

/* ----- Testimonials ----- */
.tp-testimonial-section-title {
  font-size: clamp(1.15rem, 3.5vw, 1.75rem);
  line-height: 1.35;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.tp-testimonial-area {
  overflow: hidden;
}

.tp-testimonial-slider-active .swiper-slide {
  width: 100%;
  box-sizing: border-box;
}

.tp-testimonial-designation {
  display: block;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  line-height: 1.5;
}

.tp-testimonial-user-title {
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
}

@media (max-width: 767.98px) {
  .tp-testimonial-area {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .tp-testimonial-user {
    flex-direction: column;
    text-align: center;
  }
}

/* ----- Header (homepage shell) ----- */
/* Match xl (1200): hamburger range includes former lg–xl tablet band */
@media (max-width: 1199.98px) {
  .tp-header-bottom-3.pl-35 {
    padding-left: 12px !important;
  }

  .tp-header-bottom-3.pr-35 {
    padding-right: 12px !important;
  }

  .tp-header-action.ml-50 {
    margin-left: 0 !important;
  }

  .tp-header-area .logo img {
    max-width: 140px;
    width: auto !important;
    height: auto;
    max-height: 48px;
  }
}

@media (max-width: 575.98px) {
  .tp-header-area .logo img {
    max-width: 120px;
    max-height: 40px;
  }
}

/* ----- Sectors / features / logos ----- */
@media (max-width: 575.98px) {
  .tp-blog-thumb {
    height: auto !important;
    min-height: 180px;
  }

  .tp-blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .tp-feature-item {
    margin-bottom: 1rem;
  }
}

.home-accreditation img {
  max-width: min(200px, 100%);
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.home-accreditation .col {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* Prevent stray horizontal scroll on home content */
.home-page-content {
  overflow-x: clip;
  max-width: 100%;
}
