.image-container {
  margin-top: 20px;
  position: relative;
  width: 100%;
}

.overlay-image {
  width: 100%;
  height: 110vh;
  object-fit: cover;
  cursor: pointer;
}

/* Hero section wrapper to contain all content */
.hero-content-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 50px; /* Footer spacing target */
}

/* Ensure no extra whitespace from last element inside hero */
.hero-content-wrapper > :last-child {
  margin-bottom: 0 !important;
}

.overlay-text {
  position: absolute;
  font-weight: 800;
  top: 45%;
  left: 20px;
  transform: translateY(-50%);
  color: black;
  font-size: 24px;
  line-height: 1.4;
}

.arrow-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arrow-container {
  text-align: center;
}

.arrow-box {
  background-color: #15658a;
  color: white;
  padding: 20px 40px;
  font-size: 20px;
  border-radius: 8px;
  width: 650px;
  height: 150px;
  margin-top: 20px;
}

.arrow {
  font-size: 120px; /* Even larger */
  color: #15658a;
  margin-top: -50px;
}

/* ========================= RESPONSIVE ========================= */
/* Large tablets and below */
@media (max-width: 1200px) {
  /* Scale hero carousel height */
  .hero .carousel-item img {
    height: 70vh !important;
    object-fit: cover;
  }

  /* Scale overlay banner image height */
  .overlay-image {
    height: 80vh;
  }

  /* Nudge overlay text a bit smaller */
  .overlay-text {
    font-size: 20px;
    left: 16px;
  }
}

/* Tablets (<= 992px) */
@media (max-width: 992px) {
  /* Make all images inside hero fluid and centered */
  .hero img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block;
    margin-bottom: 16px !important;
  }

  /* Tame aggressive negative margins from inline styles */
  .hero [style*='margin-left:'] {
    margin-left: 0 !important;
  }
  .hero [style*='margin-right:'] {
    margin-right: 0 !important;
  }
  .hero [style*='margin-top: -'],
  .hero [style*='margin-bottom: -'] {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
  }

  /* Carousel height shorter on tablets */
  .hero .carousel-item img {
    height: 55vh !important;
  }

  .overlay-image {
    height: 60vh;
  }

  .overlay-text {
    font-size: 18px;
    top: 40%;
  }

  /* Prevent off-screen absolutely positioned/rotated decorative elements */
  .hero [style*='position: absolute'] {
    position: static !important;
    transform: none !important;
    margin: 12px 0 !important;
    display: block !important;
  }
  .hero [style*='rotate:'] {
    rotate: 0deg !important;
    transform: none !important;
  }

  /* Reduce big inline bottom margins and keep footer spacing consistent */
  .hero [style*='margin-bottom:'] {
    margin-bottom: 16px !important;
  }
  .hero-content-wrapper {
    padding-bottom: 50px; /* keep consistent footer spacing */
  }
}

/* Phones (<= 768px) */
@media (max-width: 768px) {
  .hero .carousel-item img {
    height: 45vh !important;
  }

  .overlay-image {
    height: 50vh;
  }

  .overlay-text {
    font-size: 16px;
    left: 12px;
    top: 38%;
    line-height: 1.3;
  }

  /* Ensure BEFORE/AFTER labels show under each image */
  .hero img + p {
    display: inline-block;
    width: 50%;
    text-align: left;
    margin: 6px 0 !important;
    vertical-align: top;
  }
  .hero img + p + p {
    display: inline-block;
    width: 50%;
    text-align: right;
    margin: 6px 0 !important;
    vertical-align: top;
  }

  /* Headings and paragraphs inside hero: scale down */
  .hero h1,
  .hero h2,
  .hero h3,
  .hero h4,
  .hero h5 {
    font-size: clamp(16px, 4vw, 24px) !important;
  }
  .hero p,
  .hero li,
  .hero span {
    font-size: clamp(14px, 3.5vw, 18px) !important;
    line-height: 1.5 !important;
  }

  /* Keep long two-column text blocks readable */
  .hero div[style*='text-align: left'],
  .hero div[style*='width: 45%'],
  .hero div[style*='width: 40%'],
  .hero div[style*='display: inline-block'] {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border: 0 !important;
  }
}

/* Small phones (<= 576px) */
@media (max-width: 576px) {
  .hero .carousel-item img {
    height: 40vh !important;
  }

  .overlay-image {
    height: 45vh;
  }

  .overlay-text {
    font-size: 14px;
    top: 36%;
  }

  /* Slight padding at sides for breathing room */
  .hero-content-wrapper {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 50px; /* keep consistent footer spacing */
  }

  /* BEFORE/AFTER labels stack nicely on very small screens */
  .hero img + p,
  .hero img + p + p {
    width: 50%;
    margin: 4px 0 !important;
  }
}
/* Wrapper */
.testimonial-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 40px auto;
  max-width: 1200px;
  align-items: flex-start;
}

/* Left side */
.testimonial-left {
  flex: 1 1 300px;
  text-align: center;
}

.testimonial-logo {
  max-width: 200px;
  margin-bottom: 20px;
}

.testimonial-post {
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
}

/* Right side */
.testimonial-right {
  flex: 2 1 600px;
}

.testimonial-heading {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  text-align: left;
}

/* Each testimonial */
.testimonial-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.testimonial-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-item p {
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
  margin: 0 0 5px;
}

.testimonial-item strong {
  display: block;
  margin-bottom: 5px;
}

.testimonial-item a {
  color: #2a9d8f;
  font-weight: 600;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .testimonial-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .testimonial-right {
    width: 100%;
  }

  .testimonial-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .testimonial-avatar {
    margin-bottom: 10px;
  }
}

/* ========================= HERO CAROUSEL TRANSITION ========================= */
/* Soften the fade transition for hero carousel images and avoid harsh slide */
.hero .carousel,
.hero .carousel-inner,
.hero .carousel-item,
.hero .carousel-item img {
  backface-visibility: hidden;
}

/* Ensure we only fade (no slide transform) and make it a bit slower/easier */
.hero .carousel.carousel-fade .carousel-item {
  transition-property: opacity;
  transition-duration: 800ms;
  transition-timing-function: ease-in-out;
}

/* Explicitly keep transform effects off to prevent jank during fade */
.hero .carousel .carousel-item {
  transform: none !important;
}

/* Smooth image-level paint during crossfade */
.hero .carousel .carousel-item img {
  transition: opacity 800ms ease-in-out;
}

/* Slightly ease controls/indicators appearance as well */
.hero .carousel .carousel-control-prev,
.hero .carousel .carousel-control-next,
.hero .carousel .carousel-indicators li,
.hero .carousel .carousel-indicators [data-bs-target] {
  transition: opacity 300ms ease-in-out, background-color 300ms ease-in-out;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero .carousel.carousel-fade .carousel-item,
  .hero .carousel .carousel-item img {
    transition-duration: 0ms;
  }
}

/* ========================= HERO CAROUSEL SIZE STABILITY ========================= */
/* Keep a consistent slide height; images fill the slide to avoid jumps */
.hero .carousel,
.hero .carousel-inner {
  height: 85vh;
}
.hero .carousel-item {
  height: 85vh;
}
.hero .carousel-item img {
  height: 100% !important;
  width: 100%;
  object-fit: cover;
}

@media (max-width: 1200px) {
  .hero .carousel,
  .hero .carousel-inner,
  .hero .carousel-item {
    height: 70vh;
  }
}

@media (max-width: 992px) {
  .hero .carousel,
  .hero .carousel-inner,
  .hero .carousel-item {
    height: 55vh;
  }
}

@media (max-width: 768px) {
  .hero .carousel,
  .hero .carousel-inner,
  .hero .carousel-item {
    height: 45vh;
  }
}

@media (max-width: 576px) {
  .hero .carousel,
  .hero .carousel-inner,
  .hero .carousel-item {
    height: 40vh;
  }
}
