/* ============================================================
   MyStash Testimonial Carousel — testimonials.css
   Add to: /templates/mystash/css/testimonials.css
   Load in index.php alongside template.css
   ============================================================ */

/* ── Section wrapper ── */
.ms-testimonials-section {
  padding: 80px 24px 72px;
  background: var(--ms-teal-dark, #0e4a42);
  position: relative;
  overflow: hidden;
}

.ms-testimonials-section::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.ms-testimonials-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.ms-testimonials-header {
  text-align: center;
  margin-bottom: 48px;
}

.ms-testimonials-header h2 {
  font-family: 'Nunito', sans-serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.ms-testimonials-header p {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
}

/* ── Carousel track ── */
.ms-tc-viewport {
  overflow: hidden;
  position: relative;
}

.ms-tc-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  cursor: grab;
}

.ms-tc-track:active { cursor: grabbing; }

/* ── Individual card ── */
.ms-tc-card {
  flex: 0 0 calc(33.333% - 14px);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.25s ease, background 0.25s ease;
}

.ms-tc-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-3px);
}

/* ── Stars ── */
.ms-tc-stars {
  display: flex;
  gap: 3px;
}

.ms-tc-star {
  color: #f5c842;
  font-size: 1.1rem;
  line-height: 1;
}

.ms-tc-star.empty { color: rgba(255,255,255,0.2); }

/* ── Quote ── */
.ms-tc-quote {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.9);
  font-style: italic;
  flex: 1;
  position: relative;
  padding-left: 20px;
}

.ms-tc-quote::before {
  content: '\201C';
  position: absolute;
  left: 0; top: -4px;
  font-size: 2rem;
  line-height: 1;
  color: rgba(255,255,255,0.25);
  font-style: normal;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
}

/* ── Reviewer ── */
.ms-tc-reviewer {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 14px;
}

.ms-tc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.ms-tc-reviewer-info {
  flex: 1;
  min-width: 0;
}

.ms-tc-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.875rem;
  color: #ffffff;
  line-height: 1.2;
}

.ms-tc-location {
  font-size: 0.775rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.2;
}

.ms-tc-platform {
  flex-shrink: 0;
  opacity: 0.5;
}

.ms-tc-platform svg {
  width: 16px;
  height: 16px;
  fill: white;
  display: block;
}

/* ── Dummy/placeholder badge ── */
.ms-tc-card.ms-tc-placeholder {
  background: rgba(255,255,255,0.04);
  border-style: dashed;
  border-color: rgba(255,255,255,0.08);
}

/* ── Navigation ── */
.ms-tc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.ms-tc-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: transparent;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.ms-tc-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
}

.ms-tc-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.ms-tc-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ms-tc-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 0.3s ease, background 0.3s ease;
}

.ms-tc-dot.active {
  width: 24px;
  background: white;
}

/* ── App label (home page only — shows which app the testimonial is from) ── */
.ms-tc-app-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: -8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .ms-tc-card {
    flex: 0 0 calc(50% - 10px);
  }
}

@media (max-width: 600px) {
  .ms-tc-card {
    flex: 0 0 calc(100% - 0px);
  }
  .ms-testimonials-section {
    padding: 56px 16px 48px;
  }
}

/* ── Ensure heading is always white regardless of surrounding template styles ── */
.ms-testimonials-section .ms-testimonials-header h2,
.ms-testimonials-section .ms-testimonials-header p {
  color: #ffffff !important;
}
