/*
 * Testimonials section — testimonial cards, star ratings, trust bar.
 * Depends on: variables.css, layout.css
 *
 * @package Vinelec
 */

.testimonials-section {
  position: relative;
  background: var(--clr-bg);
  padding: 0;
  overflow: hidden;
}

.testimonials-card {
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: 44px 48px 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.004));
}

.testimonials-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.testimonials-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: var(--ls-tight);
}

.testimonials-row {
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.testimonial {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--clr-border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(10, 16, 32, 0.5);
  transition: border-color var(--ease);
}

.testimonial:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.stars {
  display: flex;
  gap: 4px;
}

.stars svg {
  width: 18px;
  height: 18px;
  color: #ffc400;
  fill: #ffc400;
}

.testimonial-quote {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--clr-text);
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-muted);
  flex-shrink: 0;
}

.author-avatar svg {
  width: 24px;
  height: 24px;
}

.author-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  line-height: 1.3;
}

.author-role {
  font-size: var(--fs-xs);
  color: var(--clr-muted);
  font-weight: var(--fw-regular);
}

.testimonials-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--clr-border);
  color: var(--clr-white);
  align-self: center;
  transition: border-color var(--ease), background var(--ease);
  cursor: pointer;
}

.testimonials-arrow:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.testimonials-arrow svg {
  width: 18px;
  height: 18px;
}

/* =================================================================
   SLIDER
   ================================================================= */

.tslider {
  position: relative;
  outline: none;
}

.tslider-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.tslider-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
  will-change: transform;
  cursor: grab;
}

.tslider-track .tq-readmore {
  cursor: pointer;
  user-select: text;
}

.tslider-track:active {
  cursor: grabbing;
}

.tslider-slide {
  flex-shrink: 0;
  box-sizing: border-box;
  padding: 0 10px;
}

.tslider-slide:first-child {
  padding-left: 0;
}

.tslider-slide:last-child {
  padding-right: 0;
}

/* Nav row */
.tslider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}

/* Prev / next buttons */
.tslider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--clr-border);
  background: transparent;
  color: var(--clr-white);
  cursor: pointer;
  flex-shrink: 0;
  transition:
    border-color var(--ease),
    background var(--ease),
    opacity var(--ease);
}

.tslider-btn svg {
  width: 18px;
  height: 18px;
}

.tslider-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

.tslider-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

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

.tslider-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--clr-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background var(--ease),
    transform var(--ease),
    width var(--ease);
}

.tslider-dot.is-active {
  background: var(--clr-primary);
  width: 20px;
  border-radius: 4px;
}

/* Avatar image in CPT testimonials */
.author-avatar img {
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

/* Initials fallback */
.author-initial {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--clr-primary-soft);
  text-transform: uppercase;
}

/* =================================================================
   READ MORE INLINE BUTTON
   ================================================================= */

.tq-readmore {
  display: inline;
  color: var(--clr-primary-soft);
  font-size: inherit;
  font-weight: var(--fw-medium);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--ease);
}

.tq-readmore:hover,
.tq-readmore:focus-visible {
  color: var(--clr-white);
  outline: none;
}

/* =================================================================
   TESTIMONIAL READ-MORE MODAL
   ================================================================= */

.tq-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tq-modal[hidden] {
  display: none;
}

.tq-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.tq-modal-box {
  position: relative;
  background: var(--clr-surface, #0d1526);
  border: 1px solid var(--clr-border);
  border-radius: 20px;
  padding: 40px 44px 44px;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: tqModalIn 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes tqModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.tq-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--clr-border);
  background: transparent;
  color: var(--clr-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}

.tq-modal-close:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--clr-white);
  background: rgba(255, 255, 255, 0.05);
}

.tq-modal-close svg {
  width: 16px;
  height: 16px;
}

.tq-modal-stars {
  display: flex;
  gap: 4px;
}

.tq-modal-stars svg {
  width: 18px;
  height: 18px;
  color: #ffc400;
  fill: #ffc400;
}

.tq-modal-quote {
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--clr-text);
  margin: 0;
}

.tq-modal-author {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-light);
}

/* =================================================================
   TRUST BAR
   ================================================================= */

.trust-bar {
  margin-top: 28px;
  border-radius: var(--radius-lg);
  padding: 28px 40px;
  background: linear-gradient(269.43deg, #0B4A44 0.5%, #0B4A44 0.5%, #062451 51.41%, #0D2E6C 99.5%);
  border: 1px solid rgba(44, 91, 255, 0.15);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-bar-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.trust-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-text-light);
}

.trust-bar-icon img {
  min-width: 40px;
  height: 50px;
}

.trust-bar-label {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: #3491F5;
  line-height: 1.3;
  margin-bottom: 2px;
}

.trust-bar-desc {
  font-size: var(--fs-md);
  color: var(--clr-text);
  line-height: 1.4;
}
