/**
 * assets/css/testimonials-text-page.css
 * หน้า Testimonials Text — แสดงรีวิวทั้งหมดแบบ masonry columns
 * ใช้ design tokens จาก main.css
 */

/* ════════════════════════════════════════
   PAGE HERO
════════════════════════════════════════ */
.page-hero--testi {
  text-align: center;
  padding: 6rem 2.4rem 5rem;
  border-bottom: 1px solid var(--color-border-secondary);
}

.page-hero--testi .page-hero__label {
  display: inline-block;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
}

.page-hero--testi .page-hero__title {
  font-size: clamp(3.2rem, 5vw, 5rem);
  font-weight: 600;
  color: var(--color-emphasis);
  margin-bottom: 1.2rem;
  line-height: 1.2;
}

.page-hero--testi .page-hero__desc {
  font-size: var(--font-size-md);
  color: var(--color-text-subtle);
  max-width: 56rem;
  margin: 0 auto;
}

.page-hero--testi .page-hero__desc span {
  display: block;
}

/* ════════════════════════════════════════
   SECTION WRAPPER
════════════════════════════════════════ */
.testi-page {
  position: relative;
  padding: 7.2rem 0 12rem;
  overflow: hidden;
}

/* Background image ด้านล่าง */
.testi-page__bg {
  position: absolute;
  inset: 0;
  background-image: url("../images/background-mnm-blue-tone.webp");
  background-size: contain;
  background-position: left bottom;
  background-repeat: no-repeat;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.testi-page__inner {
  position: relative;
  z-index: 1;
  max-width: 128rem;
  margin: 0 auto;
}

/* ════════════════════════════════════════
   MASONRY GRID
════════════════════════════════════════ */
.testi-grid {
  columns: 48rem;
  column-gap: 3.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 600px) {
  .testi-grid {
    columns: 1;
  }
}

/* ════════════════════════════════════════
   CARD
════════════════════════════════════════ */
.testi-card {
  position: relative;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--radius-lg);
  padding: 4rem 3.2rem 3.2rem;
  box-shadow: 0 0 24px 0 rgba(82, 156, 219, 0.16);
  margin-bottom: 3.2rem;
  break-inside: avoid;
  page-break-inside: avoid;
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.testi-card:hover {
  box-shadow: 0 8px 32px rgba(82, 156, 219, 0.2);
  transform: translateY(-3px);
}

/* หางกล่อง (speech bubble tail) */
.testi-card::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 3.2rem;
  width: 5.6rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.82);
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

/* ════════════════════════════════════════
   QUOTE ICON " 
════════════════════════════════════════ */
.testi-card__quote-icon {
  font-family: "Britannic", "Georgia", serif;
  font-size: 12rem;
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 2px var(--color-primary);
  line-height: 0.8;
  opacity: 0.45;
  display: block;
  text-align: center;
  user-select: none;
}

/* ════════════════════════════════════════
   BOOK REFERENCE
════════════════════════════════════════ */
.testi-card__book {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  margin-top: 0;
}

/* ════════════════════════════════════════
   QUOTE TEXT
════════════════════════════════════════ */
.testi-card__body {
  font-size: var(--font-size-md);
  color: var(--color-text-base);
  line-height: 1.85;
  margin: 0 0 2.4rem;
  font-style: normal;
}

/* ════════════════════════════════════════
   STARS
════════════════════════════════════════ */
.testi-card__stars {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 2rem;
}

.testi-card__star {
  font-size: 2rem;
  color: #d0d0d0;
  line-height: 1;
  transition: color 0.15s;
}

.testi-card__star.is-filled {
  color: #d9a106; /* --br-accent / gold */
}

/* ════════════════════════════════════════
   AUTHOR
════════════════════════════════════════ */
.testi-card__author {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-secondary);
}

/* Avatar */
.testi-card__avatar {
  flex-shrink: 0;
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border-secondary);
}

.testi-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar placeholder (ตัวอักษรแรก) */
.testi-card__avatar-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Author info */
.testi-card__author-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.testi-card__author-name {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.testi-card__author-country {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

/* ════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════ */
.testi-page__empty {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-md);
  padding: 6rem 0;
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 768px) {
  .testi-page {
    padding: 4.8rem 0 8rem;
  }

  .testi-card {
    padding: 3.6rem 2.4rem 2.8rem;
  }

  .testi-card__quote-icon {
    font-size: 8rem;
  }
}
