/* ------------------------
   Shared variables
------------------------ */
:root {
  --test-divider-width: min(1100px, 72%); /* consistent divider width */
}

/* Testimonials Section */
.testimonials-section {
  position: relative;
  min-height: 120vh;
  color: #fff;
  padding: 60px 0;
  width: 90%;
  margin: 0 auto;
  text-align: left;
  z-index: 0;
  background: none;
}
.testimonials-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #000428, #004e92);
}
.testimonials-header {
  padding-bottom: 40px;
  position: relative;
  z-index: 10;
  text-align: center;
}
.testimonials-title {
  font-family: 'Six Caps', sans-serif;
  font-size: 7.5rem;
  font-weight: 400;
  letter-spacing: 4px;
  margin-bottom: 15px;
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-left: 15px;
  padding-right: 15px;
  line-height: 1.2;
  overflow: visible;
}
.testimonials-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
}

/* Section boundary line (top & bottom) */
.boundary-line {
  width: var(--test-divider-width);
  margin: 30px auto;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    #666 10%,
    #999 25%,
    #cccccc 50%,
    #999 75%,
    #666 90%,
    transparent 100%
  );
  position: relative;
  box-shadow: 0 1px 3px rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}
.sentinel {
  width: 100%;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.testimonials-main {
  position: relative;
  align-items: flex-start;
  display: flex;
}
.testimonials-text-side {
  padding: 20px 30px;
  flex: 1;
}
.testimonials-scroll-container {
  min-height: 80vh;
}
.testimonial-text-item {
  min-height: 60vh;   /* equal height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  opacity: 0.3;
  transform: scale(0.9);
  transition: all 0.6s ease;
  padding: 0;
  margin: 0;
  position: relative;
}
.testimonial-text-item.active {
  opacity: 1;
  transform: scale(1);
}

/* Divider under each testimonial */
.testimonial-text-item::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: var(--test-divider-width);
  height: 2px;
  bottom: -25px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #555 10%,
    #777 30%,
    #999 50%,
    #777 70%,
    #555 90%,
    transparent 100%
  );
  box-shadow: 0 1px 2px rgba(255, 255, 255, 0.05);
}
.testimonial-text-item:last-child::after {
  display: none;
}

.testimonial-content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 90%;
}
.testimonial-content {
  font-family: 'Poppins', sans-serif;
  font-size: 4rem;  /* default big font on PC */
  font-weight: 200;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #fff;
  padding-left: 15px;
  padding-right: 15px;
  overflow: visible;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  text-align: left;
}
.testimonial-content::before {
  content: "";
  display: inline-block;
  width: 120px;
  height: 90px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 12a1 1 0 0 0 1-1V8.558a1 1 0 0 0-1-1h-1.388q0-.527.062-1.054.093-.558.31-.992t.559-.683q.34-.279.868-.279V3q-.868 0-1.52.372a3.3 3.3 0 0 0-1.085.992 4.9 4.9 0 0 0-.62 1.458A7.7 7.7 0 0 0 9 7.558V11a1 1 0 0 0 1 1zm-6 0a1 1 0 0 0 1-1V8.558a1 1 0 0 0-1-1H4.612q0-.527.062-1.054.094-.558.31-.992.217-.434.559-.683.34-.279.868-.279V3q-.868 0-1.52.372a3.3 3.3 0 0 0-1.085.992 4.9 4.9 0 0 0-.62 1.458A7.7 7.7 0 0 0 3 7.558V11a1 1 0 0 0 1 1z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.4;
  transition: all 0.6s ease;
  flex-shrink: 0;
  margin-top: -10px;
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.4));
}
.testimonial-text-item.active .testimonial-content::before {
  opacity: 0.7;
  transform: scale(1.05);
}
.testimonial-content-text {
  flex: 1;
  text-align: left;
}
.testimonial-author {
  margin-top: 15px;
  padding-left: calc(15px + 120px + 20px);
  position: relative;
  z-index: 2;
  text-align: left;
  
}
.author-name {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: #fff;
  margin-bottom: 6px;
  text-transform: uppercase;
  text-align: left;
}
.author-position {
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  color: #888;
  margin: 0;
  font-weight: 300;
  text-align: left;
}

/* Avatar stack */
#circles-container {
  position: -webkit-sticky;
  position: sticky;
  top: 120px;
  width: 180px;
  z-index: 999;
  align-self: flex-start;
}
.images-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.testimonial-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.6s ease;
  cursor: pointer;
  opacity: 0.4;
  transform: scale(0.8);
}
.testimonial-avatar.active {
  opacity: 1;
  transform: scale(1.2);
}
.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation dots */
#dots-container {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 1000;
}
.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #555;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}
.nav-dot.active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.2);
}

/* Tablet & Small Laptop Improvements */
@media (max-width: 1199px) {
  .testimonials-section {
    width: 95%;
    min-height: 100vh;
    padding: 50px 0;
  }
  .testimonials-text-side {
    padding: 20px 25px;
  }
  .testimonials-scroll-container {
    min-height: 70vh;
  }
  .testimonial-text-item {
    min-height: 50vh;
  }
  .testimonials-title {
    font-size: 5rem;
  }
  .testimonials-header {
    padding-bottom: 35px;
  }
  .boundary-line {
    margin: 28px auto;
  }
  .testimonial-content {
    font-size: 3rem;
    gap: 18px;
    margin-bottom: 18px;
  }
  .testimonial-content::before {
    width: 100px;
    height: 80px;
  }
  .testimonial-author {
    padding-left: calc(15px + 100px + 18px);
    margin-top: 14px;
  }
  #circles-container {
    width: 160px;
  }
  .testimonial-avatar {
    width: 120px;
    height: 120px;
  }
}

/* Tablet Portrait & Large Phones */
@media (max-width: 991px) {
  .testimonials-section {
    width: 95%;
    min-height: 100vh;
    padding: 50px 0;
  }
  .testimonials-text-side {
    padding: 20px 20px;
  }
  .testimonials-scroll-container {
    min-height: 70vh;
  }
  .testimonial-text-item {
    min-height: 50vh;
  }
  .testimonials-title {
    font-size: 3.5rem;
    letter-spacing: 4px;
  }
  .testimonials-header {
    padding-bottom: 30px;
  }
  .boundary-line {
    margin: 25px auto;
  }
  .testimonial-content {
    font-size: 2.2rem;
    gap: 15px;
    margin-bottom: 15px;
  }
  .testimonial-content::before {
    width: 90px;
    height: 70px;
  }
  .testimonial-content-wrapper {
    max-width: 95%;
  }
  .testimonial-author {
    padding-left: calc(15px + 90px + 15px);
    margin-top: 12px;
  }
  #circles-container {
    position: static;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
  }
  .images-stack {
    flex-direction: row;
    gap: 15px;
  }
  .testimonial-avatar {
    width: 80px;
    height: 80px;
  }
}

/* ===== Mobile specific overrides ===== */
@media (max-width: 767px) {

  :root {
    --testimonial-mobile-height: 60vh;
    --test-divider-width-mobile: 84%;
  }

  .testimonials-section {
    min-height: auto;
    padding: 32px 16px;
    width: 100%;
  }

  .testimonials-text-side {
    padding: 12px 16px;
    flex: 1 1 auto;
  }

  .testimonials-scroll-container {
    display: block;
    min-height: calc(var(--testimonial-mobile-height) * 1);
    scroll-snap-type: y mandatory;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure each testimonial box has a deterministic height on mobile */
  .testimonial-text-item {
    height: var(--testimonial-mobile-height);
    min-height: var(--testimonial-mobile-height);
    box-sizing: border-box;
    padding: 24px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    scroll-snap-align: start;
    opacity: 0.35; /* parent transition retained */
    transform: scale(0.98);
    transition: opacity 0.45s ease, transform 0.45s ease;
    position: relative;
    margin: 0 auto;
  }

  /* Concrete, higher-specificity rules for the text and author on mobile.
     These are scoped under .testimonials-section to increase specificity. */
  .testimonials-section .testimonial-text-item .testimonial-content {
    color: var(--testimonial-color-inactive);
    font-size: var(--testimonial-font-inactive);
    opacity: 0.4; /* extra protection if some parent tries to force opacity */
    line-height: 1.35;
    margin-bottom: 12px;
    padding-left: 68px; /* space for quote icon */
    /* make sure position does not interfere with other mobile rules */
    position: relative;
  }

  .testimonials-section .testimonial-text-item .testimonial-content::before {
    width: 56px;
    height: 46px;
    margin-top: -4px;
    left: 10px;
    position: absolute;
    content: "";
  }

  .testimonials-section .testimonial-text-item .testimonial-author {
    padding-left: 68px;
    margin-top: 8px;
    color: var(--testimonial-color-inactive);
    opacity: 0.7;
  }

  .testimonials-section .testimonial-text-item .author-name {
    color: var(--testimonial-color-inactive);
    font-size: 0.95rem;
    transition: color var(--testimonial-transition), transform var(--testimonial-transition);
    transform-origin: left center;
  }

  /* ACTIVE state specifics for mobile — high specificity, no !important */
  .testimonials-section .testimonial-text-item.active .testimonial-content {
    color: var(--testimonial-color-active);
    font-size: var(--testimonial-font-active);
    opacity: 1;
  }

  .testimonials-section .testimonial-text-item.active .testimonial-author {
    color: var(--testimonial-color-active);
    opacity: 1;
  }

  .testimonials-section .testimonial-text-item.active .author-name {
    color: var(--testimonial-color-active);
    font-size: 1.05rem;
    transform: translateY(0);
  }

  /* Divider and other mobile tweaks */
  .testimonial-text-item::after {
    left: 50%;
    transform: translateX(-50%);
    width: var(--test-divider-width-mobile);
    bottom: 18px;
  }

  .boundary-line {
    width: var(--test-divider-width-mobile);
    margin: 20px auto;
    height: 2px;
  }

  /* Hide avatar stack on small screens */
  #circles-container {
    display: none !important;
  }

  /* nav-dots touch-friendly sizing */
  #dots-container { bottom: 18px; gap: 10px; }
  .nav-dot { width: 11px; height: 11px; }

  .testimonial-text-item.expanded {
    height: auto !important;
    min-height: auto !important;
    padding-bottom: 40px; /* give breathing room */
  }
.testimonials-section .testimonial-text-item.shrink-text .testimonial-content {
  font-size: 1rem !important;   /* smaller than 1.2rem */
  line-height: 1.35;
}

}

/* Small phones slight reduction */
@media (max-width: 420px) {
  :root {
    --testimonial-mobile-height: 52vh;
    --test-divider-width-mobile: 86%;
  }
  .testimonials-section .testimonial-text-item .testimonial-content {
    font-size: 1.4rem;
  }
  .testimonials-section .testimonial-text-item .testimonial-content::before {
    width: 48px;
    height: 40px;
  }
  .testimonials-section .testimonial-text-item .testimonial-author {
    padding-left: 60px;
  }
}







/* === Testimonial navigation buttons === */
.testimonial-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.testimonial-nav button {
  background: #fff;
  color: #000;
  border: none;
  padding: 10px 25px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.testimonial-nav button:hover:not(:disabled) {
  background: #004e92;
  color: #fff;
}

.testimonial-nav button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Hide inactive groups */
.testimonial-group {
  display: none;
}
.testimonial-group.active {
  display: block;
}

/* Read more / Read less styles */
.testimonial-content {
  transition: font-size 0.28s ease, line-height 0.28s ease;
  /* keep existing big default (already set in original CSS).
     We'll ensure expanded state reduces the size */
}

/* Collapsed (default) - big text already defined in your CSS */
/* Expanded state: smaller, compact type */
.testimonial-text-item.expanded .testimonial-content {
  /* choose a smaller size so expanded text fits — tweak if you want */
  font-size: 1.3rem;           /* reduced from default (4rem) */
  line-height: 1.3;
}

/* The "more" block is hidden until expanded */
.testimonial-text-item .more {
  display: none;
}

/* show more when expanded */
.testimonial-text-item.expanded .more {
  display: inline;
}

/* the short excerpt (visible when collapsed) */
.testimonial-text-item .short {
  display: inline;
}

/* hide short when expanded */
.testimonial-text-item.expanded .short {
  display: none;
}

/* Read toggle button (basic styling, match to your theme as needed) */
.read-toggle {
  display: inline-block;
  margin-top: 12px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 16px;
  border-radius: 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}
.read-toggle:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.04);
}


/* === Line Clamp for Read More === */
.testimonial-content-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;   /* number of lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonial-text-item.expanded .testimonial-content-text {
  -webkit-line-clamp: unset;
  display: block;
}

/* ========================================
   Button Container & Click on Link Button
   (Only for the Click on Link button)
   ======================================== */

.testimonial-buttons {
  display: flex;
  gap: 12px;
  margin-top: 0px;
  flex-wrap: wrap;
  align-items: center;
}

/* Click on Link button styling - matches Read More button */
/* (Only for the Click on Link button) */
.link-button {
  display: inline-block;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px 16px;
  border-radius: 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  margin-top: 9px !important;
  vertical-align: middle;
}

.link-button:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.04);
}

/* Responsive adjustments for mobile */
@media (max-width: 767px) {
  .testimonial-buttons {
    gap: 10px;
    flex-direction: column;
    width: 100%;
  }

  .link-button {
    width: 100%;
    text-align: center;
    margin-top: 0;
  }
}
