/* ============================================================================
 *  list.css — หน้ารายชื่อวัด (index.html) ดีไซน์ใหม่ 2026
 *  Self-contained (ไม่พึ่ง style.css) — โทนส้มอิ่มบุญ + คราม, ฟอนต์ Prompt
 *  Layout: Nav ลอย → Hero เต็มจอ (กลีบบัวลอย + count-up) → Sticky Filter
 *          → แผนที่ → การ์ดวัด (stagger reveal + hover shine) → Footer
 * ========================================================================== */

:root {
  --pt-ink: #232838;
  --pt-ink-soft: #4c5568;
  --pt-muted: #8b93a5;
  --pt-line: #e7eaf2;
  --pt-line-soft: #f1f3f9;
  --pt-bg: #f7f8fc;
  --pt-card: #ffffff;
  --pt-primary: #ff8443;
  --pt-primary-2: #ffb36e;
  --pt-primary-deep: #f06a24;
  --pt-primary-soft: rgba(255, 132, 67, 0.1);
  --pt-grad: linear-gradient(135deg, var(--pt-primary-2) 0%, var(--pt-primary) 55%, var(--pt-primary-deep) 100%);
  --pt-accent: #3ec1f3;
  --pt-success: #2bb673;
  --pt-gold: #f5c76a;
  --pt-navy: #1d2333;
  --pt-radius: 18px;
  --pt-radius-sm: 12px;
  --pt-shadow: 0 4px 14px rgba(35, 40, 56, 0.07), 0 1px 3px rgba(35, 40, 56, 0.05);
  --pt-shadow-lg: 0 18px 44px rgba(240, 106, 36, 0.16), 0 6px 16px rgba(35, 40, 56, 0.08);
  --pt-font: "Prompt", "Sarabun", "Leelawadee UI", "Segoe UI", sans-serif;
  --pt-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 126px; }

.pt-body {
  font-family: var(--pt-font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--pt-ink-soft);
  background: var(--pt-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

.pt-container { max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 24px; }

/* ============================== Navbar =================================== */
.pt-nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  padding: 14px 0;
  transition: background 0.35s var(--pt-ease), box-shadow 0.35s, padding 0.35s;
}
.pt-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--pt-line), 0 8px 24px rgba(35, 40, 56, 0.06);
  padding: 8px 0;
}
.pt-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.pt-brand { display: inline-flex; align-items: center; gap: 10px; }
.pt-brand-mark {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.3s var(--pt-ease);
}
.pt-brand:hover .pt-brand-mark { transform: rotate(-8deg) scale(1.06); }
.pt-brand-mark svg { width: 26px; height: 26px; }
.pt-brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 11px; }
.pt-brand-text {
  display: flex; flex-direction: column; line-height: 1.2;
  font-weight: 700; font-size: 17px; color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  transition: color 0.35s, text-shadow 0.35s;
}
.pt-brand-text small { font-size: 10.5px; font-weight: 400; opacity: 0.82; letter-spacing: 0.4px; }
.pt-nav.is-scrolled .pt-brand-text { color: var(--pt-ink); text-shadow: none; }
.pt-nav.is-scrolled .pt-brand-mark { background: var(--pt-primary-soft); border-color: rgba(255, 132, 67, 0.25); }

.pt-nav-links { display: flex; align-items: center; gap: 6px; }
.pt-nav-links > a {
  font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.92);
  padding: 8px 14px; border-radius: 999px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.28);
  transition: background 0.25s, color 0.35s, text-shadow 0.35s;
}
.pt-nav-links > a:hover { background: rgba(255, 255, 255, 0.14); }
.pt-nav.is-scrolled .pt-nav-links > a { color: var(--pt-ink-soft); text-shadow: none; }
.pt-nav.is-scrolled .pt-nav-links > a:hover { background: var(--pt-line-soft); color: var(--pt-ink); }

/* ============================== Hero ===================================== */
.pt-hero {
  position: relative;
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
  color: #fff;
  padding: 120px 0 170px; /* เผื่อพื้นที่ล่างให้ scroll hint ไม่ชิดการ์ดสถิติ */
  overflow: hidden;
  isolation: isolate;
}
.pt-hero-bg {
  position: absolute; inset: 0; z-index: -3;
  background: url("../../img/Wat-Arun-Bangkok-Thailand.jpg") center 30% / cover no-repeat;
  animation: ptHeroZoom 22s var(--pt-ease) both;
}
@keyframes ptHeroZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.pt-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(23, 27, 41, 0.62) 0%, rgba(23, 27, 41, 0.45) 45%, rgba(29, 35, 51, 0.82) 100%);
}
.pt-hero-glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(52% 60% at 18% 22%, rgba(255, 158, 87, 0.32) 0%, transparent 62%),
    radial-gradient(48% 56% at 84% 74%, rgba(62, 193, 243, 0.2) 0%, transparent 60%);
  animation: ptGlowDrift 12s ease-in-out infinite alternate;
}
@keyframes ptGlowDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}

/* กลีบบัวลอย */
.pt-petals { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pt-petals span {
  --size: 14px;
  position: absolute; bottom: -40px;
  width: var(--size); height: calc(var(--size) * 1.25);
  background: linear-gradient(160deg, rgba(255, 200, 150, 0.85), rgba(255, 132, 67, 0.55));
  border-radius: 80% 4px 80% 4px;
  opacity: 0;
  animation: ptPetal var(--dur, 16s) linear infinite;
  animation-delay: var(--delay, 0s);
  filter: blur(0.3px);
}
.pt-petals span:nth-child(1)  { left: 6%;  --size: 13px; --dur: 17s; --delay: 0s; }
.pt-petals span:nth-child(2)  { left: 16%; --size: 9px;  --dur: 21s; --delay: 3.2s; }
.pt-petals span:nth-child(3)  { left: 27%; --size: 15px; --dur: 15s; --delay: 6.5s; }
.pt-petals span:nth-child(4)  { left: 38%; --size: 8px;  --dur: 23s; --delay: 1.4s; }
.pt-petals span:nth-child(5)  { left: 49%; --size: 12px; --dur: 18s; --delay: 8.8s; }
.pt-petals span:nth-child(6)  { left: 60%; --size: 10px; --dur: 20s; --delay: 4.6s; }
.pt-petals span:nth-child(7)  { left: 70%; --size: 16px; --dur: 14s; --delay: 10.5s; }
.pt-petals span:nth-child(8)  { left: 79%; --size: 9px;  --dur: 22s; --delay: 2.3s; }
.pt-petals span:nth-child(9)  { left: 88%; --size: 13px; --dur: 16s; --delay: 7.7s; }
.pt-petals span:nth-child(10) { left: 95%; --size: 11px; --dur: 19s; --delay: 12s; }
@keyframes ptPetal {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.9; }
  85%  { opacity: 0.5; }
  100% { transform: translateY(-108vh) translateX(40px) rotate(300deg); opacity: 0; }
}

.pt-hero-inner { position: relative; z-index: 1; }

/* จังหวะเข้า (staggered) */
.pt-up { opacity: 0; animation: ptUp 0.9s var(--pt-ease) forwards; animation-delay: var(--d, 0s); }
@keyframes ptUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pt-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.6px;
  padding: 8px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  margin-bottom: 22px;
}
.pt-eyebrow-lotus { width: 17px; height: 17px; color: var(--pt-gold); flex: none; }
.pt-hero h1 {
  font-size: clamp(32px, 5.4vw, 58px);
  font-weight: 700; line-height: 1.22;
  margin: 0 0 18px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.pt-grad-text {
  background: linear-gradient(120deg, var(--pt-gold) 0%, var(--pt-primary-2) 30%, var(--pt-primary) 55%, var(--pt-gold) 85%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: ptGradSlide 5.5s ease-in-out infinite;
}
@keyframes ptGradSlide {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.pt-hero-sub {
  font-size: clamp(14.5px, 1.6vw, 17px);
  color: rgba(255, 255, 255, 0.88);
  max-width: 660px; margin: 0 auto 34px; line-height: 1.85;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

/* Search */
.pt-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 640px; margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), 0 0 0 6px rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.3s var(--pt-ease), transform 0.3s var(--pt-ease);
}
.pt-search:focus-within {
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3), 0 0 0 6px rgba(255, 132, 67, 0.35);
  transform: translateY(-2px);
}
.pt-search > svg { width: 21px; height: 21px; color: var(--pt-muted); flex: none; }
.pt-search input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: 15.5px; color: var(--pt-ink); padding: 8px 0;
}
.pt-search input::placeholder { color: var(--pt-muted); }
.pt-search input::-webkit-search-cancel-button { display: none; }
.pt-search-clear {
  border: 0; background: var(--pt-line-soft); color: var(--pt-muted);
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; flex: none;
  display: grid; place-items: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.pt-search-clear svg { width: 13px; height: 13px; }
.pt-search-clear:hover { background: var(--pt-line); color: var(--pt-ink); transform: rotate(90deg); }
.pt-search-btn {
  border: 0; cursor: pointer; flex: none;
  background: var(--pt-grad); color: #fff;
  font-size: 14.5px; font-weight: 600;
  padding: 12px 28px; border-radius: 999px;
  transition: transform 0.25s var(--pt-ease);
}
.pt-search-btn:hover { transform: translateY(-2px); }
.pt-search-btn:active { transform: translateY(0); }

/* ชิปจังหวัดยอดนิยม */
.pt-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 9px;
  margin-top: 22px;
}
.pt-chip {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.94);
  font-size: 13px; font-weight: 400;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--pt-ease);
}
.pt-chip small { opacity: 0.75; margin-left: 5px; font-size: 11.5px; }
.pt-chip:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-2px); }
.pt-chip.is-active {
  background: var(--pt-grad); border-color: transparent;
  font-weight: 500;
}

/* สถิติ count-up */
.pt-hero-stats {
  margin: 40px auto 0;
  display: inline-flex; align-items: center; gap: clamp(18px, 4vw, 44px);
  padding: 18px clamp(22px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.pt-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 74px; }
.pt-stat strong {
  font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.15;
  background: linear-gradient(120deg, #fff 20%, var(--pt-gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pt-stat span { font-size: 12.5px; color: rgba(255, 255, 255, 0.82); }
.pt-stat-divider { width: 1px; height: 40px; background: rgba(255, 255, 255, 0.22); }

/* Scroll hint */
.pt-scroll-hint {
  position: absolute; left: 50%; bottom: 96px; z-index: 2;
  width: 28px; height: 46px; margin-left: -14px;
  border: 2px solid rgba(255, 255, 255, 0.55); border-radius: 999px;
  display: flex; justify-content: center;
  opacity: 0; animation: ptUp 1s var(--pt-ease) 1.3s forwards;
}
.pt-scroll-hint span {
  width: 4px; height: 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85); margin-top: 8px;
  animation: ptScrollDot 1.8s ease-in-out infinite;
}
@keyframes ptScrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* คลื่นเชื่อมเข้าเนื้อหา */
.pt-hero-wave {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1;
  color: var(--pt-bg); line-height: 0;
}
.pt-hero-wave svg { width: 100%; height: clamp(30px, 6vw, 84px); display: block; }

/* ============================== Filter bar =============================== */
.pt-filter {
  position: sticky; top: 56px; z-index: 90; /* ใต้ nav ที่ fixed อยู่ (สูง 56px ตอน scroll) */
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--pt-line);
  padding: 12px 0;
}
.pt-filter-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pt-filter-count { font-size: 14px; color: var(--pt-muted); display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.pt-filter-count strong { color: var(--pt-primary-deep); font-size: 18px; font-weight: 700; }
.pt-filter-hint { font-size: 12.5px; color: var(--pt-muted); }
.pt-filter-hint:not(:empty)::before { content: "· "; }

.pt-filter-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pt-select-wrap { display: flex; align-items: center; gap: 8px; }
.pt-select-wrap label { font-size: 13px; color: var(--pt-muted); font-weight: 500; }
.pt-select-wrap select {
  appearance: none; -webkit-appearance: none;
  font-family: inherit; font-size: 14px; color: var(--pt-ink);
  background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b93a5'%3e%3cpath stroke-width='2' stroke-linecap='round' d='m7 10 5 5 5-5'/%3e%3c/svg%3e") no-repeat right 9px center/15px;
  border: 1px solid var(--pt-line); border-radius: 10px;
  padding: 8px 32px 8px 13px; cursor: pointer; max-width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pt-select-wrap select:focus { outline: none; border-color: var(--pt-primary); box-shadow: 0 0 0 3px var(--pt-primary-soft); }

.pt-view-toggle { display: flex; gap: 4px; padding: 3px; background: var(--pt-line-soft); border-radius: 11px; }
.pt-view-toggle button {
  border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--pt-muted);
  padding: 7px 13px; border-radius: 8px;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.pt-view-toggle button svg { width: 16px; height: 16px; }
.pt-view-toggle button:hover { color: var(--pt-ink); }
.pt-view-toggle button.is-active { background: #fff; color: var(--pt-primary-deep); box-shadow: 0 2px 8px rgba(35, 40, 56, 0.1); }

/* ============================== Map ====================================== */
.pt-main { flex: 1; padding-top: 26px; padding-bottom: 70px; }
.pt-map-wrap {
  position: relative; margin-bottom: 30px;
  border-radius: var(--pt-radius); overflow: hidden;
  border: 1px solid var(--pt-line);
  box-shadow: var(--pt-shadow);
  height: 400px;
  transition: height 0.3s var(--pt-ease);
  background: linear-gradient(135deg, #eef2f7 0%, #eaefec 100%);
}
.pt-map { width: 100%; height: 100%; }
.pt-map-wrap.is-active { height: 600px; }
.pt-map-toggle { display: none; }

/* Leaflet pin */
.pt-pin { background: transparent !important; border: 0 !important; }
.pt-pin-inner {
  transform-origin: 17px 44px; cursor: pointer;
  transition: transform 0.2s var(--pt-ease);
  filter: drop-shadow(0 4px 6px rgba(35, 40, 56, 0.25));
  animation: ptPinDrop 0.5s var(--pt-ease) both;
}
@keyframes ptPinDrop {
  from { transform: translateY(-14px) scale(0.7); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.pt-pin-inner:hover { transform: scale(1.15); }
.pt-pin-inner.is-online { animation: ptPinDrop 0.5s var(--pt-ease) both, ptPinPulse 2.4s ease-in-out 0.6s infinite; }
@keyframes ptPinPulse {
  0%, 100% { filter: drop-shadow(0 4px 6px rgba(35, 40, 56, 0.25)); }
  50% { filter: drop-shadow(0 4px 12px rgba(255, 132, 67, 0.6)); }
}

.leaflet-popup-content-wrapper { border-radius: 14px !important; box-shadow: var(--pt-shadow-lg) !important; }
.leaflet-popup-content { margin: 12px 16px !important; font-family: var(--pt-font) !important; }
.pt-popup { min-width: 220px; }
.pt-popup h3 {
  font-size: 15.5px; font-weight: 600; margin: 0; color: var(--pt-ink);
  line-height: 1.35; flex: 1 1 auto; min-width: 0;
}
/* ชื่อวัด + ป้ายสถานะ อยู่บรรทัดเดียวกัน ป้ายไม่หด */
.pt-popup-row {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 2px; flex-wrap: nowrap;
}
.pt-popup-loc { font-size: 12.5px; color: var(--pt-muted); margin: 2px 0 0; }
.pt-popup-badge {
  font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  line-height: 1.5; flex: 0 0 auto; white-space: nowrap;
}
.pt-popup-badge.is-online { background: rgba(43, 182, 115, 0.14); color: #1a9457; }
.pt-popup-badge.is-basic { background: var(--pt-line-soft); color: var(--pt-ink-soft); }

/* แถวปุ่ม — 2 ปุ่มกว้างเท่ากัน อยู่บรรทัดเดียว */
.pt-popup-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--pt-line-soft);
}
.pt-popup-actions > a {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 34px; padding: 0 10px; border-radius: 9px;
  font-size: 13px; font-weight: 600; line-height: 1;
  text-decoration: none !important; white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
/* ปุ่มรอง — เข้าชมเว็บวัด */
.pt-popup-cta {
  border: 1.5px solid var(--pt-line);
  color: var(--pt-ink) !important; background: #fff;
}
.pt-popup-cta:hover {
  border-color: var(--pt-primary); color: var(--pt-primary-deep) !important;
  background: rgba(255, 132, 67, 0.06);
}
/* ปุ่มหลัก — นำทาง */
.pt-popup-nav {
  background: var(--pt-primary-deep); color: #fff !important; border: 1.5px solid transparent;
}
.pt-popup-nav:hover { background: #d9591a; }
.pt-popup-nav svg { flex: none; }

/* จอแคบ — ให้ปุ่มซ้อนกันแทนที่จะบีบจนอ่านไม่ออก */
@media (max-width: 380px) {
  .pt-popup-actions { grid-template-columns: 1fr; }
}

.leaflet-control-zoom a { border-radius: 8px !important; color: var(--pt-ink) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--pt-shadow) !important; }

/* ============================== Results head ============================= */
.pt-results-head { margin-bottom: 22px; }
.pt-results-head h2 {
  font-size: 24px; font-weight: 700; color: var(--pt-ink); margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
}
.pt-results-head h2::before {
  content: ""; width: 5px; height: 24px; border-radius: 999px;
  background: var(--pt-grad); display: inline-block;
}
.pt-results-sub { font-size: 13.5px; color: var(--pt-muted); margin: 6px 0 0; }

/* ============================== Skeleton ================================= */
.pt-skeleton-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
}
.pt-skel {
  background: var(--pt-card); border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius); padding: 18px;
}
.pt-skel-top { display: flex; align-items: center; gap: 14px; }
.pt-skel-top > div:last-child { flex: 1; }
.pt-skel-avatar { width: 54px; height: 54px; border-radius: 14px; flex: none; }
.pt-skel-line { height: 13px; border-radius: 6px; margin-top: 13px; }
.pt-skel-top .pt-skel-line:first-child { margin-top: 0; }
.pt-skel-line.w60 { width: 60%; }
.pt-skel-line.w85 { width: 85%; }
.pt-skel-line.w40 { width: 40%; }
.pt-skel-avatar, .pt-skel-line {
  background: linear-gradient(90deg, var(--pt-line-soft) 25%, #e9edf5 45%, var(--pt-line-soft) 65%);
  background-size: 400% 100%;
  animation: ptShimmer 1.3s ease-in-out infinite;
}
@keyframes ptShimmer {
  from { background-position: 100% 0; }
  to   { background-position: -100% 0; }
}

/* ============================== Cards ==================================== */
.pt-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
}

/* การ์ดแบบคลีน — ขาวเรียบ ไม่มีแบนเนอร์สี */
.pt-card {
  background: var(--pt-card);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius);
  position: relative;
  box-shadow: var(--pt-shadow);
  transition:
    transform 0.3s var(--pt-ease),
    box-shadow 0.3s var(--pt-ease),
    border-color 0.3s;
}
.pt-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(35, 40, 56, 0.1), 0 4px 10px rgba(35, 40, 56, 0.05);
  border-color: #d9deea;
}
.pt-card.is-highlight {
  border-color: var(--pt-primary);
  box-shadow: 0 0 0 3px var(--pt-primary-soft), 0 14px 32px rgba(35, 40, 56, 0.1);
  transform: translateY(-2px);
}

/* reveal เมื่อเลื่อนถึง (stagger ผ่าน --d) */
.pt-reveal {
  opacity: 0; transform: translateY(30px);
  transition:
    opacity 0.65s var(--pt-ease) var(--d, 0s),
    transform 0.65s var(--pt-ease) var(--d, 0s),
    box-shadow 0.3s var(--pt-ease), border-color 0.3s;
}
.pt-reveal.is-in { opacity: 1; transform: translateY(0); }
.pt-reveal.is-in:hover { transform: translateY(-4px); }

.pt-card-link {
  display: flex; flex-direction: column; height: 100%; color: inherit;
  padding: 18px 18px 16px;
}

.pt-btn-locate {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  border: 1px solid var(--pt-line); cursor: pointer;
  width: 32px; height: 32px; border-radius: 10px;
  background: #fff; color: var(--pt-muted);
  display: grid; place-items: center;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--pt-ease);
}
.pt-btn-locate svg { width: 15px; height: 15px; }
.pt-btn-locate:hover { background: var(--pt-navy); border-color: var(--pt-navy); color: #fff; transform: scale(1.08); }

/* แถวบน: โลโก้ + ชื่อ/ที่ตั้ง */
.pt-card-top {
  display: flex; align-items: center; gap: 14px;
  padding-right: 36px; /* กันชนปุ่มดูแผนที่มุมขวา */
  margin-bottom: 10px;
}
.pt-card-avatar {
  width: 54px; height: 54px; flex: none;
  border-radius: 14px; overflow: hidden;
  background: var(--pt-line-soft);
  border: 1px solid var(--pt-line);
  display: grid; place-items: center;
}
.pt-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pt-card-avatar svg { width: 30px; height: 30px; }
.pt-card-info { min-width: 0; }

.pt-card-info h3 {
  font-size: 16px; font-weight: 600; color: var(--pt-ink);
  line-height: 1.4; margin: 0 0 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.pt-card-meta {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 13px; color: var(--pt-muted); line-height: 1.55;
  margin-bottom: 4px;
}
.pt-card-meta svg { width: 14px; height: 14px; flex: none; margin-top: 3px; color: var(--pt-muted); }
.pt-card-meta span {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.pt-card-top .pt-card-meta { margin-bottom: 0; }

.pt-card-foot {
  margin-top: auto; padding-top: 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-top: 1px solid var(--pt-line-soft);
}
.pt-btn-visit {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500; color: var(--pt-ink-soft);
  transition: color 0.25s;
}
.pt-btn-visit svg { width: 15px; height: 15px; transition: transform 0.3s var(--pt-ease); }
.pt-card:hover .pt-btn-visit { color: var(--pt-primary-deep); }
.pt-card:hover .pt-btn-visit svg { transform: translateX(4px); }
.pt-card-prov {
  font-size: 11.5px; font-weight: 500; color: var(--pt-ink-soft);
  background: var(--pt-line-soft);
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}

/* ============================== Empty state ============================== */
.pt-empty { text-align: center; padding: 80px 24px; color: var(--pt-muted); }
.pt-empty-icon { font-size: 52px; margin-bottom: 14px; animation: ptBob 3s ease-in-out infinite; display: inline-block; }
@keyframes ptBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-9px) rotate(3deg); }
}
.pt-empty h3 { font-size: 19px; color: var(--pt-ink); margin: 0 0 6px; font-weight: 600; }
.pt-empty p { margin: 0 0 20px; }
.pt-empty-reset {
  border: 1.5px solid var(--pt-primary); background: transparent; cursor: pointer;
  color: var(--pt-primary-deep); font-size: 14px; font-weight: 500;
  padding: 9px 26px; border-radius: 999px;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--pt-ease);
}
.pt-empty-reset:hover { background: var(--pt-grad); border-color: transparent; color: #fff; transform: translateY(-2px); }

/* ============================== Footer =================================== */
.pt-footer {
  background: var(--pt-navy);
  margin-top: 20px;
}
.pt-footer-bottom {
  padding: 18px 0; font-size: 12.5px; color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

/* ============================== Back to top ============================== */
.pt-totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 46px; height: 46px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: var(--pt-grad); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 0.3s var(--pt-ease), transform 0.3s var(--pt-ease);
}
.pt-totop.is-show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.pt-totop:hover { transform: translateY(-4px); }
.pt-totop svg { width: 20px; height: 20px; }

/* ============================== Responsive =============================== */
@media (max-width: 900px) {
  .pt-hero { min-height: 86vh; padding: 110px 0 96px; }
  .pt-hero-bg { background-attachment: scroll; }
  .pt-search { padding: 6px 6px 6px 16px; }
  .pt-search-btn { padding: 11px 20px; font-size: 13.5px; }
  .pt-hero-stats { gap: 18px; padding: 14px 20px; }
  .pt-scroll-hint { display: none; }

  /* แผนที่พับเก็บบนมือถือ */
  .pt-map-wrap { height: 0; border-width: 0; margin-bottom: 0; box-shadow: none; }
  .pt-map-wrap.is-open { height: 360px; border-width: 1px; margin-bottom: 8px; box-shadow: var(--pt-shadow); }
  .pt-view-toggle { display: none; }
  .pt-map-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px 0; margin-bottom: 24px;
    background: #fff; border: 1px solid var(--pt-line); border-radius: 12px;
    font-family: inherit; font-size: 14px; font-weight: 500; color: var(--pt-primary-deep);
    cursor: pointer; box-shadow: var(--pt-shadow);
    transition: border-color 0.25s, box-shadow 0.25s;
  }
  .pt-map-toggle svg { width: 17px; height: 17px; }
  .pt-map-toggle:hover { border-color: rgba(255, 132, 67, 0.45); }
}

@media (max-width: 560px) {
  .pt-container { padding: 0 18px; }
  .pt-hero h1 { font-size: clamp(28px, 8.4vw, 36px); }
  .pt-br-desktop { display: none; }
  .pt-grid, .pt-skeleton-grid { grid-template-columns: 1fr; gap: 16px; }
  .pt-chips { gap: 7px; }
  .pt-chip { font-size: 12px; padding: 6px 13px; }
  .pt-hero-stats { width: 100%; justify-content: space-around; gap: 8px; padding: 14px 10px; }
  .pt-stat { min-width: 0; }
  .pt-stat-divider { height: 34px; }
  .pt-filter-inner { gap: 10px; }
  .pt-select-wrap label { display: none; }
  .pt-select-wrap select { max-width: 150px; font-size: 13px; }
  .pt-footer-inner { flex-direction: column; gap: 20px; }
  .pt-totop { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ============================== Reduced motion =========================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .pt-up, .pt-reveal { opacity: 1; transform: none; }
  .pt-petals { display: none; }
}
