/* =========================================================
   ส่วนรีวิวลูกค้า — การ์ดลอย + hover + parallax
   ใช้สีแบรนด์จาก :root ใน hero.css
   ========================================================= */
.reviews {
  --rv-glass: rgba(255, 255, 255, .74);
  --rv-glass-line: rgba(255, 255, 255, .95);
  --rv-shadow: 0 24px 50px -22px rgba(30, 70, 130, .38), 0 4px 14px -6px rgba(30, 70, 130, .18);
  --rv-star-on: #F2B01E;
  --rv-star-off: #d7dce6;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 7vw, 88px) 0 clamp(190px, 16vw, 250px);
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 40% 50% at 0% 70%, rgba(255, 238, 214, .8), rgba(255, 238, 214, 0) 70%),
    linear-gradient(180deg, #dcecf9 0%, #eef5fc 35%, #f7f8fb 70%, #fdf6ee 100%);
}

/* ---------- ฉากหลัง ---------- */
.rv-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rv-deco { position: absolute; display: block; will-change: transform; }
.rv-mtn  { left: -6%; top: 20%; width: 34%; opacity: .5; filter: saturate(.7) brightness(1.12) blur(.5px); }
.rv-wall { right: -8%; top: 4%; width: 30%; opacity: .55; filter: saturate(.75) brightness(1.1) blur(.6px); }
.rv-c1 { right: 2%; top: 30%; width: 22%; opacity: .8; }
.rv-c2 { left: 4%; top: 52%; width: 26%; opacity: .75; }
.rv-c3 { left: 38%; top: 2%; width: 22%; opacity: .55; }
.rv-ghost {
  width: 230px; height: 96px; border-radius: 40px;
  background:
    radial-gradient(circle at 36px 36px, rgba(150, 175, 205, .55) 0 16px, transparent 17px),
    linear-gradient(rgba(170, 190, 215, .45), rgba(170, 190, 215, .45)) 66px 28px / 80px 8px no-repeat,
    linear-gradient(rgba(240, 190, 60, .45), rgba(240, 190, 60, .45)) 66px 44px / 60px 7px no-repeat,
    linear-gradient(rgba(170, 190, 215, .35), rgba(170, 190, 215, .35)) 24px 66px / 150px 7px no-repeat,
    rgba(255, 255, 255, .55);
  filter: blur(2.5px); opacity: .8;
}
.rv-g1 { left: 1.5%; top: 41%; }
.rv-g2 { left: 7%; top: 67%; width: 190px; }
.rv-g3 { right: 1%; top: 33%; }
.rv-g4 { right: 2%; top: 55%; width: 180px; }
.rv-bubble-heart {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: #fff; font-size: 18px; background: radial-gradient(circle at 35% 30%, #ff6b72, #d8202b);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, .75), 0 12px 24px -8px rgba(200, 30, 40, .6);
}
.rv-h1 { left: 8%; top: 61%; width: 34px; height: 34px; font-size: 14px; }
.rv-h2 { right: 6%; top: 69%; }
.rv-h3 { left: 61%; top: 23%; width: 30px; height: 30px; font-size: 12px; }
.rv-bubble-heart { animation: rv-bob 6s ease-in-out infinite alternate; }
.rv-blossom-tl { left: -3%; top: -6%; width: clamp(160px, 22vw, 360px); }
.rv-blossom-br { right: -4%; bottom: 6%; width: clamp(150px, 18vw, 300px); transform-origin: center; }
.rv-blossom-br { scale: -1 -1; }
.rv-ribbon { position: absolute; left: 0; right: 0; bottom: 40px; width: 100%; height: clamp(120px, 14vw, 220px); }
.rv-cloudbed {
  position: absolute; left: -5%; right: -5%; bottom: -30px; height: clamp(110px, 11vw, 170px);
  display: flex; align-items: flex-end; justify-content: space-between;
}
.rv-cloudbed img { width: 26%; margin: 0 -3%; filter: brightness(1.06); }
.rv-bg::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px;
  background: linear-gradient(180deg, rgba(255, 249, 237, 0), var(--ivory));
}

/* ---------- หัวเรื่อง ---------- */
.rv-inner { position: relative; max-width: 1480px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.rv-header { text-align: center; display: grid; justify-items: center; }
.rv-eyebrow { margin: 0 0 10px; font-size: 13px; letter-spacing: .55em; color: #4b5568; font-weight: 500; }
.rv-header h2 {
  display: flex; align-items: center; gap: clamp(10px, 2vw, 28px); margin: 0;
  font-family: var(--font-display); font-style: italic; font-weight: 800;
  font-size: clamp(30px, 3.6vw, 52px); color: var(--navy); line-height: 1.15; text-wrap: balance;
}
.rv-header h2 em { font-style: inherit; color: var(--red); }
.rv-header h2 span { font-family: var(--font-th); font-style: normal; font-weight: 700; letter-spacing: -.01em; }
.rv-laurel { width: clamp(26px, 2.6vw, 40px); height: auto; flex-shrink: 0; fill: none; stroke: var(--gold); stroke-width: 2; }
.rv-laurel .leaf { fill: var(--gold); stroke: none; opacity: .9; }
.rv-laurel.is-right { transform: scaleX(-1); }
.rv-swoosh { width: min(440px, 70vw); height: 34px; margin-top: -8px; }
.rv-swoosh path { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.rv-swoosh .plane { fill: var(--red); stroke: none; }
.rv-sub { margin: 6px 0 0; font-size: clamp(14px, 1.15vw, 17px); color: #33415a; }
.rv-sample-note {
  margin: 10px 0 0; padding: 3px 12px; border-radius: 999px; font-size: 11.5px;
  color: var(--red); border: 1px dashed rgba(142, 16, 24, .45); background: rgba(255, 255, 255, .6);
}

/* ---------- เลย์เอาต์การ์ด ---------- */
.rv-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr) minmax(0, 1fr);
  gap: clamp(12px, 1.6vw, 28px); align-items: start; margin-top: clamp(18px, 2.5vw, 36px);
}
.rv-col { display: grid; gap: clamp(18px, 2.2vw, 34px); min-width: 0; }
.rv-l0 { margin-left: 16%; }
.rv-l1 { margin-right: 6%; margin-left: -4%; }
.rv-l2 { margin-left: 18%; }
.rv-r0 { margin-right: 10%; margin-top: 10px; }
.rv-r1 { margin-left: 12%; margin-right: -4%; }
.rv-r2 { margin-right: 14%; }
.rv-center { display: grid; justify-items: center; gap: 14px; margin-top: clamp(40px, 6vw, 90px); min-width: 0; }

.rv-card { position: relative; will-change: transform; min-width: 0; }
.rv-float { animation: rv-float 7s ease-in-out infinite alternate; animation-delay: var(--float-delay, 0s); }
@keyframes rv-float {
  0%   { transform: translate3d(0, 0, 0) rotate(-.4deg); }
  100% { transform: translate3d(0, -12px, 0) rotate(.4deg); }
}
@keyframes rv-bob { to { transform: translateY(-14px); } }
.reviews.is-scrolling .rv-float,
.reviews.is-scrolling .rv-bubble-heart { animation-play-state: paused; }

/* ---------- การ์ด (ฟองคำพูดกระจกฝ้า) ---------- */
.rv-bubble {
  position: relative;
  min-height: 150px;
  padding: 20px 46% 24px 24px;
  border-radius: 44px;
  background: var(--rv-glass);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1.5px solid var(--rv-glass-line);
  box-shadow: var(--rv-shadow), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease;
  cursor: default;
}
/* หางฟองคำพูด */
.rv-bubble::after {
  content: ""; position: absolute; bottom: -14px; width: 30px; height: 30px;
  background: inherit; border: inherit; border-top: 0; border-left: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  transform: rotate(45deg) skew(10deg, 10deg); border-radius: 0 0 8px 0;
}
.rv-col[data-rv-col="left"] .rv-bubble::after { left: 34%; }
.rv-col[data-rv-col="right"] .rv-bubble::after { left: 18%; }
.rv-featured .rv-bubble::after { left: 14%; bottom: -18px; width: 40px; height: 40px; }

.rv-card:hover .rv-bubble {
  transform: translateY(-10px) scale(1.035);
  box-shadow: 0 36px 60px -24px rgba(30, 70, 130, .5), 0 0 0 4px rgba(214, 173, 101, .35), inset 0 1px 0 #fff;
  z-index: 5;
}
.rv-card:hover { z-index: 5; }

.rv-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.rv-avatar {
  width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
  display: grid; place-items: center;
  font-weight: 600; font-size: 20px; color: #fff;
  background: linear-gradient(140deg, #2c5aa0, var(--navy));
  box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--gold), 0 8px 16px -8px rgba(16, 45, 89, .6);
}
.rv-l1 .rv-avatar, .rv-r1 .rv-avatar { background: linear-gradient(140deg, #c8303a, var(--red)); }
.rv-name { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.rv-stars { display: inline-flex; gap: 1px; font-size: 16px; line-height: 1; }
.rv-star {
  background: linear-gradient(90deg, var(--rv-star-on) var(--fill), var(--rv-star-off) var(--fill));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rv-text { position: relative; z-index: 2; margin: 12px 0 0; padding-left: 32px; font-size: 15px; line-height: 1.6; color: #1f2a3d; }
.rv-quote { position: absolute; left: 0; top: -8px; font-family: var(--font-display); font-size: 44px; line-height: 1; color: rgba(16, 45, 89, .25); }

.rv-photo {
  position: absolute; top: 8px; right: 8px; bottom: 8px; width: 44%;
  border-radius: 36px; overflow: hidden;
  background: linear-gradient(180deg, #a8d1f2 0%, #d7ebf8 60%, #f3f8fc 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 26%);
}
.rv-photo img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.rv-card:hover .rv-photo img { transform: scale(1.12); }

.rv-heart {
  position: absolute; z-index: 3; right: 22px; bottom: -14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px 7px 11px; border-radius: 999px;
  background: #fff; color: #333; font-weight: 500; font-size: 14px; font-variant-numeric: tabular-nums;
  box-shadow: 0 10px 22px -10px rgba(30, 70, 130, .55);
  transition: transform .25s ease, box-shadow .25s ease;
}
.rv-heart svg { width: 17px; height: 17px; fill: #e0303a; transition: transform .3s; }
.rv-heart:hover { transform: translateY(-2px); box-shadow: 0 14px 24px -10px rgba(200, 30, 40, .55); }
.rv-heart.is-liked { background: #e0303a; color: #fff; }
.rv-heart.is-liked svg { fill: #fff; }
.rv-heart.is-pop svg { animation: rv-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rv-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.45); } 100% { transform: scale(1); } }
.rv-burst { position: absolute; left: 10px; top: -4px; color: #e0303a; font-size: 18px; pointer-events: none; animation: rv-burst .9s ease-out forwards; }
@keyframes rv-burst { to { transform: translate(-6px, -46px) scale(1.4); opacity: 0; } }

/* การ์ดเด่นตรงกลาง */
.rv-featured { width: 100%; }
.rv-featured .rv-bubble { min-height: 270px; padding: 30px 50% 40px 32px; border-radius: 56px; }
.rv-featured .rv-avatar { width: 68px; height: 68px; font-size: 26px; }
.rv-featured .rv-name { font-size: 20px; }
.rv-featured .rv-stars { font-size: 24px; }
.rv-featured .rv-text { font-size: clamp(15px, 1.2vw, 19px); padding-left: 44px; margin-top: 18px; }
.rv-featured .rv-quote { font-size: 64px; }
.rv-featured .rv-photo { width: 54%; border-radius: 48px; top: 10px; bottom: 10px; right: 10px; }
.rv-featured .rv-heart { font-size: 18px; padding: 9px 18px 9px 14px; right: 30px; bottom: -18px; }
.rv-featured .rv-heart svg { width: 22px; height: 22px; }
.rv-featured .rv-bubble { transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease, opacity .32s ease, filter .32s ease; }
.rv-featured.is-swapping .rv-bubble { opacity: 0; filter: blur(6px); transform: translateY(10px) scale(.98); }

/* คะแนนรวม */
.rv-score { text-align: center; margin-top: 22px; }
.rv-score-label { margin: 0; font-size: 15px; color: #33415a; }
.rv-score-row { display: flex; align-items: center; gap: 18px; justify-content: center; }
.rv-score-num { margin: 0; font-family: var(--font-display); font-style: italic; color: var(--navy); line-height: 1; }
.rv-score-num b { font-size: clamp(56px, 5.4vw, 84px); font-weight: 800; color: var(--red); }
.rv-score-num span { font-size: clamp(28px, 2.4vw, 38px); }
.rv-stars.is-big { font-size: clamp(30px, 2.6vw, 40px); gap: 4px; }
.rv-score-from { margin: 4px 0 0; font-size: 13px; color: #4b5563; text-align: left; }

.rv-nav { display: flex; align-items: center; gap: clamp(24px, 6vw, 90px); margin-top: 8px; }
.rv-nav button {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--navy); color: var(--navy); background: rgba(255, 255, 255, .7);
  transition: background .25s, color .25s, transform .25s;
}
.rv-nav button:hover { background: var(--navy); color: #fff; transform: scale(1.06); }
.rv-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rv-dots { display: flex; gap: 10px; }
.rv-dots button { width: 10px; height: 10px; border: 0; padding: 0; border-radius: 999px; background: #c5ccd8; transition: width .3s, background .3s; }
.rv-dots button.is-active { width: 26px; background: var(--navy); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rv-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rv-center { grid-column: 1 / -1; grid-row: 1; margin-top: 10px; max-width: 760px; justify-self: center; width: 100%; }
  .rv-l0, .rv-l1, .rv-l2, .rv-r0, .rv-r1, .rv-r2 { margin: 0; }
  .rv-ghost { display: none; }
}
@media (max-width: 700px) {
  .rv-grid { grid-template-columns: minmax(0, 1fr); }
  .rv-col { gap: 30px; }
  .rv-bubble { padding: 18px 47% 26px 16px; border-radius: 34px; }
  .rv-text { padding-left: 26px; font-size: 14px; }
  .rv-featured .rv-bubble { padding: 22px 18px 210px; border-radius: 40px; }
  .rv-featured .rv-photo { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; height: 190px; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%); mask-image: linear-gradient(180deg, transparent 0%, #000 30%); }
  .rv-featured .rv-text { padding-left: 34px; }
  .rv-header h2 { font-size: 26px; gap: 8px; }
  .rv-eyebrow { letter-spacing: .4em; font-size: 11px; }
  .rv-score-row { flex-direction: column; gap: 6px; }
  .rv-score-from { text-align: center; }
  .rv-blossom-tl { width: 140px; }
  .rv-mtn, .rv-wall { width: 60%; opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
  .rv-float, .rv-bubble-heart { animation: none !important; }
}
