/* ============================================================
   Lovestream — Testimonials / Reviews carousel
   Vanilla CSS. No build step, no dependencies.
   Brand tokens (fall back to defaults if not defined globally):
     --primary    #FF0000   (red)
     --secondary  #D9A0C8   (soft pink)
     --grey-dark  #1D1D1B   (near-black background)
   ============================================================ */

.ls-testimonials {
  /* Local aliases so the component works even outside your token scope */
  --ls-primary: var(--primary, #FF0000);
  --ls-secondary: var(--secondary, #D9A0C8);
  --ls-bg: var(--grey-dark, #1D1D1B);
  --ls-card-radius: 18px;
  --ls-gap: 24px;

  position: relative;
  overflow: hidden;
  background: var(--ls-bg);
  padding: 84px 24px;
  font-family: Montserrat, system-ui, -apple-system, sans-serif;
}

/* ---- Background glows + floating hearts -------------------- */
.ls-glow {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.ls-glow--red {
  width: 640px; height: 640px; top: -220px; left: -180px;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.20), rgba(255, 0, 0, 0) 68%);
  /* JS centres this on the cursor (desktop); transition gives a smooth trail */
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.ls-glow--pink {
  width: 620px; height: 620px; bottom: -240px; right: -180px;
  background: radial-gradient(circle, rgba(217, 160, 200, 0.18), rgba(217, 160, 200, 0) 68%);
}
.ls-hearts-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ls-heart-float {
  position: absolute;
  bottom: -14%;
  animation: ls-float linear infinite;
}
.ls-heart-float svg { display: block; width: 100%; height: 100%; }
@keyframes ls-float {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-135vh) rotate(42deg); }
}

/* ---- Inner wrapper ---------------------------------------- */
.ls-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- Heading ---------------------------------------------- */
.ls-header { text-align: center; margin-bottom: 54px; }
.ls-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ls-secondary);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase;
  margin-bottom: 18px;
}
.ls-eyebrow svg { width: 15px; height: 15px; }
.ls-title {
  margin: 0; color: #F5F2F0; font-weight: 900;
  font-size: clamp(30px, 5.2vw, 54px);
  line-height: 1.04; letter-spacing: -0.02em;
}
.ls-subtitle {
  margin: 18px auto 0; max-width: 560px;
  color: rgba(245, 242, 240, 0.55);
  font-size: 16px; line-height: 1.6;
}

/* ---- Carousel viewport + track ---------------------------- */
.ls-viewport { overflow: hidden; padding: 26px 0; }
.ls-track {
  display: flex;
  gap: var(--ls-gap);
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.ls-slide { flex: 0 0 auto; } /* width set inline by JS */

/* ---- Card ------------------------------------------------- */
.ls-card {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  border-radius: var(--ls-card-radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.ls-card:hover {
  transform: translateY(-8px);
  border-color: rgba(217, 160, 200, 0.6);
}

/* Photo */
.ls-photo {
  position: relative;
  width: 100%;
  height: 160px;
  flex: 0 0 auto;
  background: repeating-linear-gradient(45deg, #262220, #262220 11px, #201d1b 11px, #201d1b 22px);
}
.ls-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ls-photo-hint {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 12px;
  color: rgba(245, 242, 240, 0.5);
  font-size: 13px; font-weight: 500;
}
.ls-photo-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(29, 29, 27, 0) 42%, rgba(29, 29, 27, 0.92));
}

/* Body */
.ls-body {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0 26px 28px;
}
.ls-quotemark {
  position: absolute; top: 30px; right: 18px;
  font-size: 96px; line-height: 1; font-weight: 900;
  color: rgba(217, 160, 200, 0.10);
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
}
.ls-head {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 14px;
  margin-top: -30px;
}
.ls-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  border: 3px solid #221F1E;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.ls-meta { min-width: 0; padding-bottom: 3px; }
.ls-name { color: #F5F2F0; font-weight: 700; font-size: 16px; }
.ls-sub { color: rgba(245, 242, 240, 0.45); font-size: 12.5px; margin-top: 2px; }
.ls-quote {
  position: relative;
  flex: 1 1 auto;
  margin: 16px 0 0;
  color: #E7E3E0;
  font-size: 15px; line-height: 1.62; font-weight: 400;
  text-wrap: pretty;
}

/* ---- Hover-expand overlay (full comment over the image) --- */
.ls-full {
  position: absolute; inset: 0; z-index: 5;
  padding: 26px;
  background: linear-gradient(165deg, #241f1d, #1a1716);
  display: flex; flex-direction: column;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.ls-full .ls-quotemark--lg {
  position: static;
  font-size: 58px; line-height: 0.6;
  color: rgba(217, 160, 200, 0.28);
  font-weight: 900; font-family: Georgia, serif;
}
.ls-full-quote {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  margin: 12px 0 0;
  color: #F2EEEB;
  font-size: 15.5px; line-height: 1.6; font-weight: 400;
  text-wrap: pretty;
}
.ls-full-foot {
  margin-top: 16px; padding-top: 16px;
  border-top: 1px dashed rgba(217, 160, 200, 0.28);
  display: flex; align-items: center; gap: 12px;
}
.ls-full-foot .ls-avatar {
  width: 40px; height: 40px; font-size: 14px; border: none; box-shadow: none;
}

/* Collapse on devices that can hover; expand on card hover */
@media (hover: hover) {
  .ls-teaser {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
  }
  .ls-card:hover .ls-full { opacity: 1; }
}
/* Touch / mobile: comment fully visible below image, never over it */
@media (hover: none) {
  .ls-full { display: none; }
}

/* ---- Controls --------------------------------------------- */
.ls-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 22px; margin-top: 40px;
}
.ls-arrow {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1.5px solid rgba(217, 160, 200, 0.45);
  color: var(--ls-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}
.ls-arrow:hover {
  background: var(--ls-primary);
  border-color: var(--ls-primary);
  color: #fff;
}
.ls-arrow svg { width: 20px; height: 20px; }
.ls-dots { display: flex; align-items: center; gap: 9px; }
.ls-dot {
  width: 8px; height: 8px; border-radius: 99px;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.22);
  transition: width 0.3s ease, background 0.3s ease;
}
.ls-dot.is-active {
  width: 26px;
  background: var(--ls-primary);
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .ls-heart-float { animation: none; display: none; }
  .ls-track { transition: none; }
}
