/* ==========================================
   CSS Variables
   ========================================== */
.sbs-customer-reviews {
  /* Colors */
  --color-white: #fff;
  --color-black: #111;
  --color-overlay: rgba(0, 0, 0, 0.55);
  --color-white-35: rgba(255, 255, 255, 0.35);
  --color-white-12: rgba(255, 255, 255, 0.12);
  
  /* Background */
  --bg-image: url("https://images.unsplash.com/photo-1693578616322-c8abe6c7393d?q=80&w=2400&auto=format&fit=crop");
  
  /* Spacing & Dimensions */
  --dots-width: 44px;
  --card-y-step: 220;
  --card-width: min(760px, 86vw);
  
  /* Transitions */
  --transition-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-duration: 0.75s;
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
.sbs-customer-reviews,
.sbs-customer-reviews * ,
.sbs-customer-reviews *::before,
.sbs-customer-reviews *::after {
  box-sizing: border-box;
}

/* ==========================================
   Main Layout
   ========================================== */
.sbs-customer-reviews {
  min-height: 800px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  font-family: "Bai Jamjuree", sans-serif;
  color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* .sbs-customer-reviews::before, */
.sbs-customer-reviews-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* .sbs-customer-reviews::before {
  background: var(--bg-image) center / cover no-repeat;
} */

.sbs-customer-reviews-wrapper::after {
  background: var(--color-overlay);
}

.sbs-customer-reviews .left,
.sbs-customer-reviews .right {
  position: relative;
}

/* ==========================================
   Left Section
   ========================================== */
.sbs-customer-reviews .left {
  height: 800px;
  display: flex;
  align-items: center;
  /* padding: clamp(28px, 5vw, 70px); */
}

.sbs-customer-reviews .left h2 {
  color: var(--cl-1);
  margin: 0;
  font-size: clamp(44px, 5.2vw, 78px);
  line-height: 1.02;
  font-weight: 800;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ==========================================
   Right Section (Carousel)
   ========================================== */
.sbs-customer-reviews .right {
  height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 40px 36px; */
}

/* ==========================================
   Carousel Container
   ========================================== */
.sbs-customer-reviews .outer {
  position: relative;
  width: 100%;
  max-width: 980px;
  height: 720px;
  padding-right: var(--dots-width);
}

/* ==========================================
   Card Component
   ========================================== */
.sbs-customer-reviews .card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--card-width);
  transform: translate(-50%, -50%);
  will-change: transform, opacity, filter;
  transition: 
    transform var(--transition-duration) var(--transition-smooth),
    opacity var(--transition-duration) var(--transition-smooth),
    filter var(--transition-duration) var(--transition-smooth);
}

.sbs-customer-reviews .card.is-active .quoteBox {
  display: block;
}

.sbs-customer-reviews .card.is-active .name {
  color: var(--cl-1);
}

/* ==========================================
   Person Info
   ========================================== */
.sbs-customer-reviews .person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sbs-customer-reviews .avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-white-12);
  flex-shrink: 0;
}

.sbs-customer-reviews .who {
  flex: 1;
}

.sbs-customer-reviews .name {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: var(--cl-1);
  text-transform: uppercase;
}

.sbs-customer-reviews .role {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  opacity: 0.55;
  text-transform: uppercase;
  line-height: 1.1;
}

/* ==========================================
   Quote Box
   ========================================== */
.sbs-customer-reviews .quoteBox {
  display: none;
  top: -44px;
  padding: 22px 115px;
  background: var(--color-white);
  color: var(--color-black);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  position: relative;
  width: calc(100% - var(--dots-width));
  max-width: calc(600px - var(--dots-width));
}

.sbs-customer-reviews .quoteBox svg {
  display: block;
  width: 54px;
  height: auto;
}

.sbs-customer-reviews .quoteBox p {
  margin: 22px 0 0;
  font-size: 15px;
  line-height: 1.65;
  max-width: 52ch;
}

/* ==========================================
   Triangle Decorations
   ========================================== */
.sbs-customer-reviews .tri {
  position: absolute;
  width: 0;
  height: 0;
  top: 100%;
  transform: rotate(90deg);
}

.sbs-customer-reviews .tri--y {
  left: 0;
  border-left: 44px solid var(--cl-1);
  border-top: 44px solid transparent;
}

.sbs-customer-reviews .tri--d {
  right: 0;
  border-right: 70px solid rgba(0, 0, 0, 0.35);
  border-top: 70px solid transparent;
}

/* ==========================================
   Pagination Dots
   ========================================== */
.sbs-customer-reviews .dots {
  position: absolute;
  right: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sbs-customer-reviews .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--color-white-35);
  cursor: pointer;
  transition: background 0.3s ease;
}

.sbs-customer-reviews .dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.sbs-customer-reviews .dot.is-active {
  background: var(--cl-1);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 980px) {
  .sbs-customer-reviews {
    --card-y-step: 150;
    --card-width: min(92vw, 760px);
    grid-template-columns: 1fr;
  }

  .sbs-customer-reviews .left {
    height: 32dvh;
    padding: 18px 16px;
    align-items: flex-end;
  }

  .sbs-customer-reviews .left h2 {
    font-size: clamp(34px, 9vw, 46px);
  }

  .sbs-customer-reviews .right {
    height: 68dvh;
    /* padding: 12px 12px 18px; */
    align-items: flex-start;
  }

  .sbs-customer-reviews .outer {
    height: 520px;
    padding-right: var(--dots-width);
  }

  .sbs-customer-reviews .quoteBox {
    padding: 22px 24px;
    max-width: calc(560px - var(--dots-width));
  }

  .sbs-customer-reviews .quoteBox svg {
    width: 40px;
  }

  .sbs-customer-reviews .quoteBox p {
    font-size: 15px;
    line-height: 1.55;
    margin-top: 18px;
  }

  .sbs-customer-reviews .tri--y {
    border-left-width: 34px;
    border-top-width: 34px;
  }

  .sbs-customer-reviews .dots {
    right: 12px;
  }
}
