.testimonials {

  background: var(--color-white);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

/* Layout */
.testimonials__layout {
  display: flex;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 400px;
  flex-direction: row;
}

/* Single Image */
.testimonials__image-container {
  flex: 0 0 45%;
  position: relative;
  order: 1; /* Ensure image is on the left */
}

.testimonials__image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.testimonials__image.active {
  opacity: 1;
}

.testimonials__image-placeholder {
  width: 100%;
  height: 400px;
  background: var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-style: italic;
  border-radius: 8px;
}

/* Content Section */
.testimonials__content {
  flex: 0 0 55%;
  position: relative;
  order: 2; /* Ensure content is on the right */
}

.testimonials__swiper {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  height: 300px;
  overflow: hidden;
}

.testimonials__content {
  position: relative;
}

.testimonials__swiper.swiper {
  position: relative;
  width: 100%;
  height: 300px;
}

.testimonials__swiper .swiper-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.testimonials__swiper .swiper-slide {
  flex-shrink: 0;
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.testimonials__slide {
  text-align: center;
  padding: 40px 20px;
}

.testimonials__content-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.testimonials__text {
  font-family: var(--typography-family-main);
  font-size: var(--typography-size-h3);
  font-weight: var(--typography-weight-regular);
  font-style: italic;
  line-height: 1.6;
  color: var(--color-text-dark);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.testimonials__quote-mark {
  position: absolute;
  z-index: 1;
}

.testimonials__quote-mark--open {
  top: -10px;
  left: -30px;
}

.testimonials__quote-mark--close {
  bottom: -20px;
  right: -30px;
}

.testimonials__quote-mark svg {
  fill: var(--color-text-dark);
  opacity: 0.3;
  width: 60px !important;
  height: 60px !important;
}

.testimonials__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.testimonials__nav--top {
  top: 20px;
}

.testimonials__nav--bottom {
  bottom: 20px;
}

.testimonials__nav-arrow {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.testimonials__nav-arrow:hover {
  background: var(--color-science-blue);
}

.testimonials__nav-arrow svg {
  fill: var(--color-science-blue);
  transition: fill 0.3s ease;
  width: 50px !important;
  height: 50px !important;
}

.testimonials__nav-arrow:hover svg {
  fill: var(--color-white);
}


/* Swiper Navigation */
.testimonials__swiper .swiper-button-prev,
.testimonials__swiper .swiper-button-next,
.testimonials__swiper .swiper-pagination {
  display: none !important;
}

/* Hide default Swiper elements for testimonials */
.testimonials__swiper .swiper-button-prev,
.testimonials__swiper .swiper-button-next,
.testimonials__swiper .swiper-pagination,
.testimonials .swiper-pagination {
  display: none !important;
}

/* Desktop - ensure row layout */
@media (min-width: 1025px) {
  .testimonials__layout {
    flex-direction: row !important;
  }
}

/* Responsive (apply mobile layout also to tablets) */
@media (max-width: 1024px) {
  
  .testimonials__layout {
    flex-direction: column;
    gap: 2rem;
    min-height: auto;
  }
  
  .testimonials__image-container {
    flex: none;
    order: 1;
    position: static;
  }
  
  .testimonials__content {
    margin-top: 80%;
    flex: none;
    order: 2;
  }
  
  .testimonials__image,
  .testimonials__image-placeholder {
    height: 250px;
  }
  
  .testimonials__swiper {
    height: 400px;
  }
  
  .testimonials__swiper.swiper {
    height: 400px;
  }
  
  .testimonials__swiper .swiper-slide {
    height: 400px;
  }
  
  .testimonials__text {
    font-size: var(--typography-size-h4);
  }
  
  .testimonials__slide {
    padding: 20px 10px;
  }
  
  .testimonials__quote-mark--open {
    top: -10px;
    left: 0px;
  }
  
  .testimonials__quote-mark--close {
    bottom: -10px;
    right: 0px;
  }
  
  .testimonials__quote-mark svg {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .testimonials__image,
  .testimonials__image-placeholder {
    height: 200px;
  }
  
  .testimonials__swiper {
    height: 350px;
  }
  
  .testimonials__swiper.swiper {
    height: 350px;
  }
  
  .testimonials__swiper .swiper-slide {
    height: 350px;
  }
  
  .testimonials__text {
    font-size: var(--typography-size-h5);
  }
  
  .testimonials__slide {
    padding: 15px 8px;
  }
}
