/* ===== หน้าติดต่อเรา ===== */
.ct { background: var(--cream-2); padding: 10px clamp(16px, 5vw, 64px) 70px; }
.ct-grid { max-width: 1240px; margin: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.ct-card { --accent: var(--orange); position: relative; display: flex; flex-direction: column; gap: 16px; padding: 22px; background: #fff;
  border: 3px solid var(--brown); border-radius: 24px; box-shadow: 8px 9px 0 var(--brown); transition: transform .25s, box-shadow .25s; }
.ct-card:hover { transform: translateY(-5px); box-shadow: 10px 13px 0 var(--brown); }
.ct-card::before { content: ""; position: absolute; left: 22px; right: 22px; top: -3px; height: 7px; border-radius: 0 0 8px 8px; background: var(--accent); }
.ct-line { --accent: #06c755; }
.ct-fb { --accent: #1877f2; }
.ct-card header { display: flex; align-items: center; gap: 12px; }
.ct-card header b { display: block; font: 700 22px "Mali", cursive; color: var(--brown); line-height: 1.2; }
.ct-card header small { color: #7a5f49; font-size: 14px; }
.ct-badge { flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); border: 2.5px solid var(--brown); box-shadow: 3px 4px 0 var(--brown); }
.ct-badge svg { width: 27px; height: 27px; fill: #fff; }

/* LINE: QR พร้อมเส้นสแกนวิ่ง */
.ct-qr { position: relative; margin: 0 auto; width: min(100%, 230px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #fff; border: 2px dashed #06c75580; }
.ct-qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ct-scan { position: absolute; left: 8%; right: 8%; height: 3px; top: 10%; border-radius: 3px; background: #06c755; box-shadow: 0 0 12px 3px #06c75580; animation: ctScan 2.6s ease-in-out infinite; }
@keyframes ctScan { 50% { top: 88%; } }
.ct-corner { position: absolute; width: 22px; height: 22px; border: 4px solid #06c755; }
.c1 { left: 6px; top: 6px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.c2 { right: 6px; top: 6px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.c3 { left: 6px; bottom: 6px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.c4 { right: 6px; bottom: 6px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.ct-hint { margin: -4px 0 0; text-align: center; font-size: 14px; color: #5d4634; font-weight: 500; }

/* ปุ่ม */
.ct-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 20px; border-radius: 99px; cursor: pointer;
  font: 600 16px "Prompt", sans-serif; color: #fff; background: var(--accent); border: 2.5px solid var(--brown); box-shadow: 0 5px 0 var(--brown);
  transition: transform .15s, box-shadow .15s, filter .15s; text-decoration: none; }
.ct-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.ct-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--brown); filter: brightness(1.05); }
.ct-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--brown); }
.ct-card > .ct-btn { margin-top: auto; }
.ct-btn-call { color: var(--brown); background: var(--orange); }
.ct-btn-call svg { fill: currentColor; stroke: none; }
.ct-btn-ghost { color: var(--brown); background: var(--cream-2); }
.ct-btn-copy { color: var(--brown); background: var(--orange); }

/* โทร: เบอร์ตัวใหญ่ + ไอคอนสั่น */
.ct-number { display: block; text-align: center; padding: 22px 8px; border-radius: 18px; text-decoration: none;
  font: 700 clamp(24px, 2.4vw, 34px) "Mali", cursive; letter-spacing: .02em; white-space: nowrap; color: var(--brown);
  background: repeating-linear-gradient(-45deg, #fff4dd 0 12px, #ffefcf 12px 24px); border: 2px dashed #f9a11b; }
.ct-number:hover { color: var(--red); }
.ct-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ct-topics li { padding: 8px 12px; border-radius: 12px; background: #fff8e8; border: 1.5px solid #ecdcc0; font-size: 14.5px; font-weight: 500; color: #5d4634; }
.ct-ring { animation: ctRing 2.2s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes ctRing { 0%, 60%, 100% { transform: rotate(0); } 64%, 72%, 80% { transform: rotate(-14deg); } 68%, 76%, 84% { transform: rotate(14deg); } }
.ct-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; margin-top: auto; }
.ct-actions .ct-btn { padding: 0 12px; white-space: nowrap; }

/* Facebook: หน้าเพจจำลอง + ปุ่มไลก์เด้ง */
.ct-fb-preview { position: relative; height: 150px; border-radius: 18px; overflow: hidden; background: #f0f4fb; border: 2px solid #d5def0; }
.ct-fb-cover { position: absolute; inset: 0 0 52% 0; background: url("images/land/ck-new-01-thumb.jpg") center / cover, #9ec3f5; }
.ct-fb-avatar { position: absolute; left: 16px; top: 38%; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  font: 700 26px "Mali", cursive; color: #fff; background: var(--red); border: 4px solid #fff; }
.ct-fb-lines { position: absolute; left: 86px; right: 60px; bottom: 26px; display: grid; gap: 8px; }
.ct-fb-lines i { height: 10px; border-radius: 6px; background: #c9d5ea; }
.ct-fb-lines i + i { width: 60%; }
.ct-like { position: absolute; right: 14px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #1877f2; animation: ctLike 2.6s ease-in-out infinite; }
.ct-like svg { width: 20px; height: 20px; fill: #fff; }
@keyframes ctLike { 0%, 70%, 100% { transform: none; } 78% { transform: scale(1.3) rotate(-12deg); } 86% { transform: scale(.95); } }

/* ตัวช่วยเขียนข้อความ */
.ct-msg { max-width: 1240px; margin: 38px auto 0; display: grid; grid-template-columns: .8fr 1.2fr; gap: 26px; align-items: center;
  padding: 26px 28px; border-radius: 24px; background: var(--orange); border: 3px solid var(--brown); box-shadow: 8px 9px 0 var(--brown); }
.ct-msg h2 { font: 700 clamp(24px, 2.6vw, 30px) "Mali", cursive; color: var(--cream-2); paint-order: stroke fill; -webkit-text-stroke: 3px var(--brown); text-shadow: 2px 3px var(--brown); margin: 0 0 6px; }
.ct-msg-head p { margin: 0; color: var(--brown); font-weight: 500; }
.ct-msg-body { display: grid; gap: 12px; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chips button { padding: 8px 16px; border-radius: 99px; cursor: pointer; font: 600 14.5px "Prompt", sans-serif; color: var(--brown);
  background: #fff8e8cc; border: 2px solid var(--brown); transition: transform .15s, background .15s; }
.ct-chips button:hover { transform: translateY(-2px); }
.ct-chips button.is-on { background: var(--brown); color: var(--cream-2); }
.ct-preview { margin: 0; padding: 14px 16px; border-radius: 16px; background: #fff; border: 2px solid var(--brown); line-height: 1.65; color: var(--brown); position: relative; }
.ct-preview::before { content: "ตัวอย่างข้อความ"; position: absolute; top: -11px; left: 14px; padding: 0 8px; font-size: 12px; font-weight: 600; color: var(--red); background: #fff; border-radius: 6px; }
.ct-btn-copy { justify-self: start; }

@media (max-width: 1180px) { .ct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .ct-msg { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .ct-grid { grid-template-columns: 1fr; }
  .ct-line { grid-row: auto; }
  .ct-msg { padding: 22px 18px; }
  .ct-btn-copy { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .ct-scan, .ct-ring, .ct-like { animation: none; } }

/* Gmail: ซองจดหมายเปิดแล้วจดหมายเลื่อนขึ้น */
.ct-mail { --accent: #ea4335; }
.ct-mail .ct-badge { background: #fff; }
.ct-mail .ct-badge svg { width: 30px; height: 30px; }
.ct-envelope { display: block; width: min(100%, 210px); height: auto; margin: 0 auto; overflow: visible; }
.env-back { fill: #f2c6be; stroke: var(--brown); stroke-width: 3; }
.env-letter > rect:first-child { fill: #fff; stroke: var(--brown); stroke-width: 2.5; }
.env-letter .l1 { fill: #ea4335; } .env-letter .l2 { fill: #ead7cc; }
.env-letter .heart { fill: #ea4335; }
.env-letter { animation: ctLetter 3.6s ease-in-out infinite; }
.env-front { fill: #fbe8e4; stroke: var(--brown); stroke-width: 3; stroke-linejoin: round; }
.env-fold { fill: none; stroke: #3a221240; stroke-width: 2; stroke-linecap: round; }
@keyframes ctLetter { 0%, 12%, 88%, 100% { transform: translateY(22px); } 38%, 66% { transform: translateY(-14px); } }
.ct-mail:hover .env-letter { animation-duration: 1.4s; }.ct-email { display: block; text-align: center; padding: 10px 8px; border-radius: 14px; text-decoration: none; word-break: break-all;
  font: 700 16px "Prompt", sans-serif; color: var(--brown); background: #fff3f1; border: 2px dashed #ea433580; }
.ct-email:hover { color: #ea4335; }
.ct-btn-mail { background: #ea4335; }
.ct-msg-body .ct-btn-sendmail { justify-self: start; }
.ct-msg-body { grid-template-columns: 1fr; }
.ct-msg-body:has(#ctMail) .ct-btn-copy { justify-self: start; }
@media (prefers-reduced-motion: reduce) { .env-letter { animation: none; } }
@media (max-width: 620px) { .ct-msg-body .ct-btn-sendmail { justify-self: stretch; } }
/* ===== ส่วนหัวหน้าติดต่อเรา: สีส้ม + รูปเจ้าของ 2 ฝั่ง ===== */
.page-hero.ch { min-height: clamp(440px, 46vw, 560px); padding: 40px clamp(16px, 5vw, 64px) 150px; display: grid; place-items: center; isolation: isolate;
  background: radial-gradient(rgba(58, 34, 18, .1) 2px, transparent 2px) 0 0 / 26px 26px, var(--orange); color: var(--brown); }
.ch .wave { z-index: 3; }
.ch-copy { position: relative; z-index: 4; max-width: 560px; }
.ch .crumbs, .ch .crumbs a { color: var(--brown); }
.ch-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 4px; padding: 6px 16px 7px 12px; border-radius: 99px;
  font: 700 15px "Mali", cursive; background: var(--cream-2); border: 3px solid var(--brown); box-shadow: 3px 4px 0 var(--brown); }
.ch-dot { width: 10px; height: 10px; border-radius: 50%; background: #2fae55; box-shadow: 0 0 0 0 #2fae5599; animation: chPulse 1.8s infinite; }
@keyframes chPulse { 70%, 100% { box-shadow: 0 0 0 9px #2fae5500; } }
.ch h1 { margin: 8px 0 6px; color: var(--cream-2); font: 700 clamp(48px, 7.5vw, 96px)/1.15 "Mali", cursive;
  paint-order: stroke fill; -webkit-text-stroke: 5px var(--brown); text-shadow: 4px 6px var(--brown); animation: chTitle .8s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes chTitle { from { transform: scale(.6) rotate(-4deg); opacity: 0; } }
.ch-lead { margin: 0 auto; font-size: clamp(16px, 1.6vw, 19px); font-weight: 600; line-height: 1.6; }
.ch-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.ch-quick a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 99px; text-decoration: none; font: 600 15px "Prompt", sans-serif; color: #fff;
  border: 2.5px solid var(--brown); box-shadow: 0 5px 0 var(--brown); transition: transform .15s, box-shadow .15s;
  animation: chPill .6s cubic-bezier(.3, 1.6, .5, 1) both; }
.ch-quick a:nth-child(2) { animation-delay: .08s; } .ch-quick a:nth-child(3) { animation-delay: .16s; } .ch-quick a:nth-child(4) { animation-delay: .24s; }
@keyframes chPill { from { transform: translateY(20px) scale(.8); opacity: 0; } }
.ch-quick a:hover { transform: translateY(-3px); box-shadow: 0 8px 0 var(--brown); }
.ch-quick a:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brown); }
.ch-quick svg { width: 19px; height: 19px; fill: currentColor; }
.ch-quick .q-mail svg { fill: none; stroke: currentColor; stroke-width: 2; }
.q-line { background: #06c755; } .q-call { background: var(--red); } .q-fb { background: #1877f2; } .q-mail { background: #fff; color: #ea4335 !important; }
.q-call svg { animation: chRing 2.2s ease-in-out infinite; }
@keyframes chRing { 0%, 60%, 100% { transform: rotate(0); } 64%, 72%, 80% { transform: rotate(-15deg); } 68%, 76%, 84% { transform: rotate(15deg); } }

.ch-person { position: absolute; bottom: 40px; z-index: 2; margin: 0; width: clamp(220px, 25vw, 340px); }
.ch-person img { display: block; width: 100%; height: auto; filter: drop-shadow(6px 8px 0 rgba(58, 34, 18, .35)); }
.ch-left { left: clamp(0px, 3vw, 60px); animation: chInL .9s .1s cubic-bezier(.2, .8, .2, 1) both; }
.ch-right { right: clamp(0px, 3vw, 60px); animation: chInR .9s .2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes chInL { from { transform: translateX(-40px); opacity: 0; } }
@keyframes chInR { from { transform: translateX(40px); opacity: 0; } }
.ch-bubble { position: absolute; top: 4%; white-space: nowrap; padding: 8px 16px 9px; border-radius: 18px; font: 700 15px "Mali", cursive; color: var(--brown);
  background: var(--cream-2); border: 3px solid var(--brown); box-shadow: 3px 4px 0 var(--brown); animation: chBubble 4s ease-in-out infinite; }
.ch-bubble::after { content: ""; position: absolute; bottom: -12px; width: 16px; height: 16px; background: var(--cream-2);
  border-right: 3px solid var(--brown); border-bottom: 3px solid var(--brown); transform: rotate(45deg); }
.ch-left .ch-bubble { left: 22%; top: -9%; rotate: 4deg; } .ch-left .ch-bubble::after { left: 18px; }
.ch-right .ch-bubble { right: 22%; top: -9%; rotate: -4deg; animation-delay: -2s; } .ch-right .ch-bubble::after { right: 18px; }
.ch-bubble span { display: inline-block; }
@keyframes chBubble { 50% { transform: translateY(-6px); } }

/* กดลิงก์ด่วนแล้วการ์ดที่ไปถึงกระพริบให้เห็น */
.ct-card:target { animation: ctFlash 1.2s ease-out; }
@keyframes ctFlash { 0%, 40% { box-shadow: 8px 9px 0 var(--brown), 0 0 0 8px var(--accent); } }
html { scroll-padding-top: 90px; }

@media (max-width: 1100px) {
  .ch-person { width: clamp(170px, 22vw, 240px); }
  .ch-bubble { font-size: 13px; }
}
@media (max-width: 820px) {
  .page-hero.ch { padding-bottom: 300px; }
  .ch-person { width: 190px; bottom: 30px; }
  .ch-left { left: calc(50% - 200px); } .ch-right { right: calc(50% - 200px); }

}
@media (max-width: 420px) {
  .ch-person { width: 160px; }
  .ch-left { left: 4px; } .ch-right { right: 4px; }
  .ch-bubble { font-size: 12px; padding: 6px 10px 7px; }
  .ch-left .ch-bubble { left: 6%; } .ch-right .ch-bubble { right: 6%; }
  .ch-quick a { padding: 8px 13px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .ch h1, .ch-quick a, .ch-person, .ch-bubble, .ch-dot, .q-call svg { animation: none; } }
/* มือถือ: ปุ่มติดต่อด่วนเรียง 2x2 เท่ากัน */
@media (max-width: 760px) { .ch-quick { display: grid; grid-template-columns: 1fr 1fr; max-width: 340px; margin-inline: auto; } .ch-quick a { justify-content: center; padding: 11px 10px; font-size: 15px; } }
