/* --- GLOBAL FIX --- */
/* This ensures padding doesn't expand width for ANY element in this module */
.tdg-testimonial-section,
.tdg-testimonial-section * {
  box-sizing: border-box;
}

/* --- SECTION BASE --- */
.tdg-testimonial-section {
  background-color: #fff; 
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
  
  /* REMOVED "width: 100%" - This was the cause of the overflow! */
  
  padding: 80px 20px;
  
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-center {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%; /* Ensure this stays full width within max */
}

/* --- TYPOGRAPHY --- */
.difference-headline {
  text-align: center;
  margin-bottom: 60px;
}

.difference-headline h2 {
  font: normal normal normal 42px/52px 'Outfit', sans-serif;
  color: #073345;
  font-weight: 400;
  margin: 0;
}

.difference-headline .accent {
  display: block;
  margin-top: 10px;
  font-size: 22px;
  line-height: 38px;
  color: #c29f6b; 
}

/* --- 1. UNIFIED CONTAINER --- */
.unified-card-container {
  background: #FFFFFF;
  border-radius: 24px;
  box-shadow: 0px 10px 40px rgba(0,0,0,0.06);
  padding: 23px 40px 60px 40px; 
  position: relative;
}

/* --- 2. TIMELINE LINE --- */
.timeline-connector {
  position: absolute;
  top: 42px; 
  left: 3%; 
  right: 3%;
  height: 1px;
  z-index: 1;
  background-image: linear-gradient(to right, #e7e7e7 60%, rgba(255,255,255,0) 0%);
  background-position: bottom;
  background-size: 45px 1px; 
  background-repeat: repeat-x;
}

/* --- GRID LAYOUT --- */
.unified-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.journey-column {
  display: flex;
  flex-direction: column;
}

/* --- 3. LABEL PILL --- */
.journey-header {
  text-align: center;
  margin-bottom: 13px; 
  height: 32px; 
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-pill {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 6px; 
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: capitalize;
  background-color: #859caa; 
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 8px #FFFFFF; 
}

/* --- 4. INNER CARD BOX --- */
.inner-card-box {
  background: #FFFFFF;
  border: 1px solid #E5E7EB; 
  border-radius: 16px;
  padding: 12px; 
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative; 
  z-index: 1; 
}

.inner-card-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: #D1D5DB;
  z-index: 10; 
}

/* --- VIDEO THUMBNAIL --- */
.video-portrait-wrapper {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3; 
  background: #F3F4F6; 
  border-radius: 8px; 
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 15px;
  text-decoration: none;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: saturate(0.95);
}

.play-btn-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px;
  background: rgba(0,0,0,0.5); 
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  z-index: 10;
}
.play-btn-circle svg { margin-left: 3px; width: 18px; height: 18px; }

.inner-card-box:hover .video-thumb-img { transform: scale(1.05); }

/* --- VIDEO OVERLAY --- */
.video-meta-overlay {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: auto;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 20;
}

/* --- CONTENT --- */
.column-content {
  text-align: left;
  flex-grow: 1;
  padding: 0 5px;
}

.card-quote, 
.card-quote p, 
.card-quote span, 
.card-quote h3 {
  font-family: 'Outfit', sans-serif !important; 
  font-size: 20px !important;
  line-height: 24px !important;
  font-weight: 500 !important;
  color: #3e3e3f !important; 
  margin-bottom: 15px;
}
.card-quote p { margin-top: 0; }

.client-info {
  border-top: 1px solid #F3F4F6;
  padding-top: 12px;
  margin-top: auto; 
}

.client-name {
  font: normal normal 500 19px/24px 'Outfit', sans-serif;
  color: #374151; 
  margin: 0 0 2px 0;
}

.client-role {
  font: normal normal 400 17px/16px 'Outfit', sans-serif;
  color: #9CA3AF;
  display: block;
}

/* --- COLOR LOGIC --- */
.color-gold .journey-pill, 
.color-construction .journey-pill { background-color: #c29f6b !important; }
.color-gold .play-btn-circle, 
.color-construction .play-btn-circle { background-color: rgba(194, 159, 107, 0.9) !important; }
.color-gold .inner-card-box:hover .play-btn-circle { background-color: #c29f6b !important; }
.color-gold .client-name { color: #c29f6b !important; }
.color-gold .video-meta-overlay { background: rgba(194, 159, 107, 0.85) !important; }

.color-blue .journey-pill, 
.color-healthcare .journey-pill { background-color: #8cafc5 !important; }
.color-blue .play-btn-circle, 
.color-healthcare .play-btn-circle { background-color: rgba(140, 175, 197, 0.9) !important; }
.color-blue .inner-card-box:hover .play-btn-circle { background-color: #8cafc5 !important; }
.color-blue .client-name { color: #8cafc5 !important; }
.color-blue .video-meta-overlay { background: rgba(140, 175, 197, 0.85) !important; }

.color-gray .journey-pill, 
.color-grey .journey-pill, 
.color-professional .journey-pill { background-color: #859caa !important; }
.color-gray .play-btn-circle, 
.color-grey .play-btn-circle { background-color: rgba(133, 156, 170, 0.9) !important; }
.color-gray .inner-card-box:hover .play-btn-circle { background-color: #859caa !important; }
.color-gray .client-name { color: #859caa !important; }
.color-gray .video-meta-overlay { background: rgba(133, 156, 170, 0.85) !important; }


/* --- CTA BUTTON --- */
.testimonial-cta-row {
  margin-top: 50px;
  display: flex;
  justify-content: center;
}

.btn-theme-primary {
  display: flex; align-items: center; justify-content: center;
  width: 287px; height: 61px;
  border-radius: 31px;
  font-family: 'Outfit', sans-serif;
  font-size: 18px; font-weight: 600;
  text-decoration: none;
  color: #FFFFFF;
  background: #c29f6b; 
  transition: all 0.3s ease;
  box-shadow: 0px 5px 15px rgba(0,0,0,0.1);
}
.btn-theme-primary:hover {
  background: #a88a5d; 
  transform: translateY(-3px);
}


@media (max-width: 992px) {

  /* 1. FORCE THE SECTION TO BE THE VIEWPORT WIDTH */
  .tdg-testimonial-section {
    padding: 40px 0 !important; /* Remove horizontal padding here to prevent double-stacking */
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important; 
    display: block !important;
  }
  .difference-headline h2 {
  font: normal normal normal 36px/42px 'Outfit', sans-serif;
  max-width: 280px;
  margin: 0 auto; 
  text-align: center;
  }
.difference-headline .accent {
   font: normal normal normal 18px/28px 'Outfit', sans-serif;
  }
.difference-headline {
    margin-bottom: 30px;
  }
.testimonial-cta-row {
    margin-top: 20px;
  }

  /* 2. CENTER THE HEADLINE */
  .page-center {
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
  }

  .unified-card-container { 
    padding: 0 !important; 
    margin: 0 !important;
    width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important; /* Allow the track to peek out */
  }
  
  .timeline-connector, .journey-header { display: none !important; }
  
  /* 3. THE "STABLE" TRACK */
  .unified-track {
    display: flex !important; 
    flex-wrap: nowrap !important; /* Prevent cards from ever wrapping */
    overflow-x: auto !important; 
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; 
    
    /* This creates the "peek" effect without using width/padding that breaks things */
    padding: 10px 12.5vw 40px 12.5vw !important; /* 12.5 + 12.5 = 25% empty space */
    gap: 15px;
    
    /* Reset all width constraints */
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  
  /* 4. THE "STABLE" CARD */
  .journey-column {
    /* Use 'calc' to be precise: Screen width minus the gutters you want to see */
    flex: 0 0 75vw !important; 
    min-width: 75vw !important;
    max-width: 75vw !important;
    scroll-snap-align: center;
    box-sizing: border-box !important;
  }
    
    scroll-snap-align: center;
    box-sizing: border-box !important;
  }
  
  .inner-card-box {
    width: 100% !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    /* Prevent the hover transform from shaking the layout */
    transform: none !important; 
  }

  /* Hide scrollbar for a cleaner look while testing */
  .unified-track::-webkit-scrollbar {
    display: none;
  }

}