/* ==========================================================================
   TESTIMONIALS SECTION - 3D GLASS CAROUSEL (MATCHING EXACT REFERENCE MOCKUP)
   Background: gallery-bg.png
   Left: Heading + Subtext + Controls (Generous breathing room, zero overlap)
   Right: 3D Multi-card Showcase with Enriched Active Center Card
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Michroma&family=Orbitron:wght@500;700;800&display=swap');

:root {
  --testi-offset: clamp(150px, 12.8vw, 195px);
}

/* --- 1. SECTION CONTAINER (LOCKED 100VH) --- */
.testi-section {
  position: relative;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  background: url('../img/gallery-bg.png') no-repeat center center;
  background-size: cover;
  font-family: 'Outfit', sans-serif;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vh, 36px) clamp(20px, 3.2vw, 50px);
  box-sizing: border-box;
  overflow: hidden;
}

/* Subtle background vignette for depth */
.testi-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(2, 6, 23, 0) 30%, rgba(2, 6, 23, 0.45) 100%);
  pointer-events: none;
  z-index: 1;
}

/* Disabled old canvas */
.testi-bg-canvas {
  display: none !important;
}

/* --- 2. TWO-COLUMN GRID LAYOUT --- */
.testi-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1360px;
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: clamp(270px, 22vw, 340px) 1fr;
  gap: clamp(35px, 4.5vw, 75px);
  align-items: center;
  box-sizing: border-box;
}

/* --- 3. LEFT PANEL: HEADLINE & CONTROLS --- */
.testi-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  z-index: 20;
  position: relative;
  max-width: 340px;
}

/* Badge: — TESTIMONIALS — */
.testi-label-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(8px, 1.4vh, 16px);
}

.testi-badge-line {
  width: 28px;
  height: 1.5px;
  background: #38bdf8;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

.testi-label {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.72rem, 0.88vw, 0.8rem);
  letter-spacing: 4px;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

/* Main Heading: WHAT OUR / CLIENTS / SAY */
.testi-heading {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 clamp(10px, 1.8vh, 18px) 0;
  display: flex;
  flex-direction: column;
  letter-spacing: 1px;
}

.testi-white-text {
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.testi-highlight {
  color: #38bdf8;
  text-shadow: 0 0 25px rgba(56, 189, 248, 0.65), 0 0 50px rgba(37, 99, 235, 0.45);
  text-transform: uppercase;
}

/* Subtitle */
.testi-subtext {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.84rem, 0.95vw, 0.94rem);
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 clamp(18px, 3vh, 28px) 0;
  max-width: 320px;
  font-weight: 400;
}

/* Navigation Controls (Arrows + Dots) */
.testi-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testi-nav-btn {
  width: clamp(40px, 4.8vh, 46px);
  height: clamp(40px, 4.8vh, 46px);
  border-radius: 50%;
  background: rgba(10, 25, 60, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: #ffffff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.25);
  outline: none;
}

.testi-nav-btn:hover {
  background: rgba(30, 64, 175, 0.65);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: scale(1.12);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 25px rgba(56, 189, 248, 0.7);
}

.testi-nav-btn:active {
  transform: scale(0.95);
}

/* Pagination Dots */
.testi-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testi-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.4);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.testi-dot:hover {
  background: rgba(56, 189, 248, 0.6);
  border-color: #38bdf8;
}

.testi-dot.active {
  width: 26px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
  border-color: #38bdf8;
}

/* --- 4. RIGHT PANEL: 3D CAROUSEL STAGE --- */
.testi-right {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.testi-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: clamp(340px, 46vh, 400px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Glowing Floor Reflection Beneath Active Card */
.testi-stage::after {
  content: '';
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  height: 24px;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.55) 0%, transparent 72%);
  filter: blur(14px);
  pointer-events: none;
  z-index: 1;
}

/* --- 5. TESTIMONIAL CARDS (3D ARCHITECTURE) --- */
.testi-card {
  position: absolute;
  width: 100%;
  max-width: clamp(440px, 36vw, 540px);
  height: clamp(320px, 44vh, 380px);
  border-radius: 24px;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

/* Glass Shell */
.testi-card-glass {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(14, 52, 130, 0.58) 0%, rgba(6, 25, 75, 0.8) 60%, rgba(3, 14, 45, 0.94) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55),
              inset 0 1.5px 2px rgba(255, 255, 255, 0.35),
              0 0 25px rgba(37, 99, 235, 0.25);
  padding: clamp(22px, 3.4vh, 32px) clamp(24px, 3vw, 36px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

/* --- 3D POSITIONING STATES --- */

/* Center (Active) Card - Sized Up and Prominent */
.testi-card.card-center {
  z-index: 10;
  opacity: 1;
  pointer-events: all;
  transform: translate3d(0, 0, 70px) scale(1.06);
}

.testi-card.card-center .testi-card-glass {
  border-color: rgba(56, 189, 248, 0.85);
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.65),
              inset 0 1.8px 3px rgba(255, 255, 255, 0.5),
              0 0 42px rgba(56, 189, 248, 0.6);
}

/* Left Peeking Card - Perfectly balanced behind active card with clear separation from left text */
.testi-card.card-left {
  z-index: 5;
  opacity: 0.36;
  pointer-events: all;
  transform: translate3d(calc(-1 * var(--testi-offset)), 0, -90px) rotateY(16deg) scale(0.82);
  filter: blur(0.5px);
}

/* Right Peeking Card */
.testi-card.card-right {
  z-index: 5;
  opacity: 0.36;
  pointer-events: all;
  transform: translate3d(var(--testi-offset), 0, -90px) rotateY(-16deg) scale(0.82);
  filter: blur(0.5px);
}

/* Offstage Hidden Cards */
.testi-card.card-hidden-left {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(calc(-2 * var(--testi-offset)), 20px, -160px) scale(0.72);
}

.testi-card.card-hidden-right {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(calc(2 * var(--testi-offset)), 20px, -160px) scale(0.72);
}

/* --- 6. CARD INNER ELEMENTS --- */

/* Top Row: Quotes & Stars */
.testi-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.testi-qmark {
  font-family: Georgia, serif;
  font-size: clamp(2.8rem, 3.8vw, 3.8rem);
  line-height: 0.7;
  color: #38bdf8;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.85);
  font-weight: 900;
  user-select: none;
}

.testi-stars {
  display: flex;
  gap: 6px;
  color: #fbbf24;
  font-size: clamp(0.95rem, 1.2vw, 1.15rem);
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.6);
}

/* Quote Body Text (Standard block flow so inline strong flows seamlessly) */
.testi-quote-text {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.96rem, 1.14vw, 1.1rem);
  color: #e2e8f0;
  line-height: 1.65;
  font-style: italic;
  font-weight: 300;
  margin: auto 0;
  display: block;
}

.testi-quote-text strong {
  color: #ffffff;
  font-weight: 600;
  font-style: normal;
  display: inline;
}

/* Bottom Client Info Row */
.testi-client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding-top: 12px;
}

.testi-avatar-wrap {
  width: clamp(48px, 5.6vh, 54px);
  height: clamp(48px, 5.6vh, 54px);
  border-radius: 50%;
  border: 1.5px solid rgba(56, 189, 248, 0.65);
  background: #091730;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
  flex-shrink: 0;
}

.testi-avatar {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.testi-client-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  flex: 1;
}

.testi-name {
  font-family: 'Michroma', sans-serif;
  font-size: clamp(0.85rem, 1.05vw, 0.98rem);
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
}

.testi-role {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.62rem, 0.75vw, 0.72rem);
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.testi-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(0.68rem, 0.8vw, 0.76rem);
  font-weight: 600;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* --- 7. RESPONSIVE DESIGN --- */

/* Laptops / Smaller Desktops */
@media (max-width: 1200px) {
  :root {
    --testi-offset: clamp(140px, 12vw, 175px);
  }
  .testi-inner {
    grid-template-columns: clamp(260px, 25vw, 300px) 1fr;
    gap: 30px;
  }
  .testi-stage {
    max-width: 540px;
    height: clamp(320px, 42vh, 370px);
  }
  .testi-card {
    max-width: 480px;
    height: clamp(300px, 40vh, 350px);
  }
}

/* Tablets & Mobile Devices (Stacked View) */
@media (max-width: 992px) {
  .testi-section {
    padding: 30px 20px;
    height: auto;
    min-height: 100vh;
  }
  .testi-inner {
    grid-template-columns: 1fr;
    gap: 35px;
    text-align: center;
  }
  .testi-left {
    align-items: center;
    text-align: center;
    max-width: 100%;
  }
  .testi-subtext {
    text-align: center;
    margin: 0 0 18px 0;
    max-width: 460px;
  }
  .testi-stage {
    max-width: 520px;
    height: 360px;
  }
  .testi-card {
    max-width: 460px;
    height: 340px;
  }
  .testi-card.card-center {
    transform: translate3d(0, 0, 50px) scale(1.02);
  }
  .testi-card.card-left {
    transform: translate3d(-170px, 0, -80px) scale(0.82);
    opacity: 0.25;
  }
  .testi-card.card-right {
    transform: translate3d(170px, 0, -80px) scale(0.82);
    opacity: 0.25;
  }
}

/* Mobile Screens */
@media (max-width: 576px) {
  .testi-section {
    padding: 24px 16px;
  }
  .testi-card-glass {
    padding: 22px 18px;
  }
  .testi-stage {
    height: 330px;
    max-width: 340px;
  }
  .testi-card {
    height: 310px;
    max-width: 320px;
  }
  .testi-qmark {
    font-size: 2.6rem;
  }
  .testi-stars {
    font-size: 0.9rem;
  }
  .testi-quote-text {
    font-size: 0.92rem;
    line-height: 1.55;
  }
  .testi-card.card-left {
    transform: translate3d(-110px, 0, -90px) scale(0.75);
    opacity: 0.15;
  }
  .testi-card.card-right {
    transform: translate3d(110px, 0, -90px) scale(0.75);
    opacity: 0.15;
  }
  .testi-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
}
