/* =========================================================
   TESTIMONIALS CAROUSEL - Group-of-three slider
   - Shows 3 slides at once: left (image) | center (text+bg) | right (vimeo)
   - Moves entire groups together when navigating
   - Responsive design with mobile optimizations
   ========================================================= */

/* ============================
   Media Section (Testimonios)
   ============================ */

  .testimonials {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: transparent;
    min-height: 100vh; /* Give the section a proper height */
  
    /* variables de control */
    --media-lead-offset-y: -10px;
    --media-lead-maxw: 1500px;
    --media-lead-gap-bottom: 130px;
  }
  
  /* Fondo de ladrillos */
  .testimonials::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw + 4px);
    background: url('../images/media/bricks.png') center / cover no-repeat;
    filter: brightness(0.75);
    opacity: 1;
    z-index: 0;
    pointer-events: none;
  }
  
  /* Textura encima de ladrillos */
  .testimonials::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: url('../images/media/highlights.png') repeat;
    background-size: auto;
    opacity: 0.35;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: multiply;
  }
  
  /* Texto arriba */
  .testimonials .testimonials__lead {
    position: relative;
    z-index: 2;
    max-width: var(--media-lead-maxw);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--media-lead-gap-bottom);
    text-align: center;
    transform: translateY(var(--media-lead-offset-y));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1em;
  }
  .testimonials .testimonials__lead * { margin: 0; padding: 0; }
  
  .testimonials .section__title {
    font-size: 2.5rem;
    line-height: 1.15;
    color: #eddfcc;
  }
  .testimonials .testimonials__intro {
    font-size: 2rem;
    margin: 0;
    line-height: 1.1;
    color: #eddfcc;
  }
  .testimonials .testimonials__intro .font-signature {
    display: block;
    padding: 0;
    margin: 0;
    font-size: 5rem;
    font-weight: 500;
    line-height: 1.05;
    margin-bottom: -50px;
    color: #eddfcc;
  }

  @media (max-width: 575.98px) {
    .testimonials .section__title {
      font-size: 1.5rem;
    }
    .testimonials .testimonials__intro {
      font-size: 1.4rem;
      line-height: 1.2;
    }
    .testimonials .testimonials__intro .font-signature { 
      line-height: 1.5;
      font-size: 2.5rem;
      margin-bottom: -30px;
    }
  }

  
  /* ============================
     Responsive
     ============================ */
  @media (max-width: 991.98px){
    .testimonials { --media-lead-maxw: 760px; }
  }
  
  @media (max-width: 767.98px){
    .testimonials { --media-lead-maxw: 90vw; --media-lead-gap-bottom: 16px; }
    .testimonials__panel-inner { max-width: 92vw; text-align: left; }
    .testimonials__col--text { justify-content: flex-start; }
  }

/* Main container */
.testimonials__carousel {
  position: relative;
  z-index: 2;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  height: 990px; /* Fixed height to preserve video content */
  overflow: hidden;
  background: transparent;
}

/* Slider wrapper */
.testimonials__slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.25, 0, 1);
  /* Transform is set dynamically by JavaScript */
}

.testimonials__slider.is-ready {
  transform: translateX(0);
}

/* Group container - each group has 3 slides */
.testimonials__group {
  min-width: 100vw;
  height: 100%;
  display: flex;
  position: relative;
}


/* Individual slides within each group */
.testimonials__slide {
  position: relative;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.testimonials__slide--left {
  width: 33.33vw;
  order: 1;
}

.testimonials__slide--center {
  width: 33.33vw;
  order: 2;
  position: relative;
  display: flex;
  align-items: start;
  justify-content: center;
  padding-top: 5.5rem;
}

.testimonials__slide--right {
  width: 33.33vw;
  order: 3;
}

/* Media elements (images, videos, iframes) */
.testimonials__slide .testimonials__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Ensure Vimeo players fill the entire right slide area */
.testimonials__slide--right .testimonials__media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

/* Make sure Vimeo iframe fills the container completely with no controls visible */
.testimonials__slide--right .testimonials__media iframe {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  border: none;
  pointer-events: none; /* Disable any interaction */
  z-index: 1;
}

/* Hide any Vimeo branding or controls that might appear */
.testimonials__slide--right .testimonials__media iframe div,
.testimonials__slide--right .testimonials__media .vp-controls,
.testimonials__slide--right .testimonials__media .vp-overlay,
.testimonials__slide--right .testimonials__media .vp-title,
.testimonials__slide--right .testimonials__media .vp-byline {
  display: none !important;
  visibility: hidden !important;
}

/* Ensure right slide container is properly positioned */
.testimonials__slide--right {
  position: relative;
  overflow: hidden;
}

/* Ensure images fill the full height */
.testimonials__slide--left .testimonials__media {
  min-height: 100%;
}

/* Background image should also fill full height */
.testimonials__slide--center .testimonials__background {
  min-height: 100%;
}

/* Text slide styles */
.testimonials__slide--center .testimonials__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/testimonies/customer-bg.png');
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: 1;
}

/* People overlay on top of entire carousel */
/* .testimonials__slide--center::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 410px;
  background-image: url('../images/testimonies/people.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 1;
  pointer-events: none;
  z-index: 10;
  bottom: 0;
} */

.testimonials__slide--center .testimonials__text-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #EDDFCC;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}

.testimonials__text-title {
  font-family: "sigurd", sans-serif;
  font-weight: 300;
  font-style: italic;
  font-size: 3.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.testimonials__text-description {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0;
  font-family: "fieldwork-hum", sans-serif;
  font-weight: 100;
  font-style: normal;
}

/* Fallback for when JS is not ready */
.testimonials__slider:not(.is-ready) {
  transform: translateX(0);
}

.testimonials__slider:not(.is-ready) .testimonials__group:not(:first-child) {
  display: none;
}

/* Navigation buttons */
.testimonials__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.25);
  color: #fff;
  display: grid;
  place-items: center;
  z-index: 10;
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, opacity 180ms ease;
  opacity: .85;
  pointer-events: auto;
}

.testimonials__btn:hover { 
  background: rgba(0,0,0,.35); 
  border-color: rgba(255,255,255,.6); 
}

.testimonials__btn:focus { 
  outline: 2px solid rgba(255,255,255,.7); 
  outline-offset: 2px; 
}

.testimonials__btn--prev { 
  left: 16px; 
}

.testimonials__btn--next {
  right: 16px;
}

/* Disabled button states */
.testimonials__btn:disabled,
.testimonials__btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: rgba(0,0,0,.15);
  border-color: rgba(255,255,255,.2);
}

.testimonials__btn:disabled:hover,
.testimonials__btn.disabled:hover {
  background: rgba(0,0,0,.15);
  border-color: rgba(255,255,255,.2);
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .testimonials__carousel { 
    height: 80vh; 
  }
  
  .testimonials__slide--left,
  .testimonials__slide--center,
  .testimonials__slide--right { 
    width: 50vw; 
  }
  
  .testimonials__slide--center {
    width: 100vw;
    order: 0;
  }
  
  .testimonials__slide--left {
    order: 1;
  }
  
  .testimonials__slide--right {
    order: 2;
  }
  
  .testimonials__text-title {
    font-size: 2rem;
  }
  
  .testimonials__text-description {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .testimonials__carousel {
    height: auto;
    min-height: 800px;
  }

  .testimonials__group {
    flex-direction: column;
    align-items: center;
  }

  /* Hide left slide (image) on mobile */
  .testimonials__slide--left {
    display: none;
  }

  /* Center slide (text) - adjust to content height */
  .testimonials__slide--center {
    width: 100vw;
    height: auto;
    min-height: auto;
    order: 1;
    min-height: 600px;
  }

  /* Right slide (video) - 800px tall and centered */
  .testimonials__slide--right {
    width: 100vw;
    height: 800px;
    order: 2;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .testimonials__text-title {
    font-size: 1.5rem;
  }

  .testimonials__text-description {
    font-size: 0.9rem;
  }

  .testimonials__slide--center .testimonials__text-content {
    padding: 1rem;
  }

  .testimonials__btn {
    top: 570px;
  }
}