/* =====================================================================
   detail-pages.css — สไตล์ของหน้ารายละเอียด (เส้นทาง / จุดจอด)
   ใช้สีจาก theme-green.css
   ===================================================================== */
.jb-detail { margin: 0; background: var(--jb-bg, #f5faf7); color: var(--jb-text, #1e293b); }
.jb-detail *, .jb-detail *::before, .jb-detail *::after { box-sizing: border-box; }

.dp-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- ส่วนหัว ---------- */
.dp-hero {
  background: linear-gradient(135deg, var(--jb-primary-deep, #064e3b), var(--jb-primary, #059669));
  color: #fff;
  padding: 22px 0 28px;
}
.dp-hero h1 { color: #fff !important; font-size: clamp(22px, 3.4vw, 32px); margin: 0 0 6px; line-height: 1.3; }
.dp-hero p { color: #d1fae5; margin: 0; }
.dp-hero a { color: #fff; }
.dp-crumb { font-size: 14px; color: #a7f3d0; margin-bottom: 16px; }
.dp-crumb a { color: #d1fae5; text-decoration: none; }
.dp-crumb a:hover { text-decoration: underline; color: #fff; }
.dp-crumb span { margin: 0 4px; }
.dp-hero-row { display: flex; gap: 18px; align-items: center; }
.dp-logo {
  flex: 0 0 auto; width: 84px; height: 84px; border-radius: 18px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: var(--jb-primary, #059669); font-size: 34px; box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.dp-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.dp-sub { font-size: 15px; }
.dp-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dp-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 5px 12px; border-radius: 50px; color: #fff;
}
.dp-tag .fa-circle { font-size: 8px; }
.dp-tag.is-open .fa-circle { color: #6ee7b7; }
.dp-tag.is-closed .fa-circle { color: #fca5a5; }

.dp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dp-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700;
  padding: 11px 20px; border-radius: 10px; background: var(--jb-primary, #059669); color: #fff !important;
  border: 1px solid transparent; transition: background-color .2s ease, transform .2s ease;
}
.dp-btn:hover { background: var(--jb-primary-hover, #047857); transform: translateY(-1px); }
.dp-btn-white { background: #fff; color: var(--jb-primary-dark, #065f46) !important; }
.dp-btn-white:hover { background: #d1fae5; }
.dp-btn-ghost { background: transparent; border-color: rgba(255,255,255,.6); }
.dp-btn-ghost:hover { background: rgba(255,255,255,.12); }
.dp-btn-light { background: var(--jb-soft, #ecfdf5); color: var(--jb-primary-dark, #065f46) !important; border-color: var(--jb-soft-border, #a7f3d0); }
.dp-btn-light:hover { background: var(--jb-soft-2, #d1fae5); }

/* ---------- เนื้อหา ---------- */
.dp-main { padding-top: 24px; padding-bottom: 10px; }
.dp-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dp-card {
  background: #fff; border: 1px solid var(--jb-border, #e2e8f0); border-radius: 16px;
  padding: 20px; margin-bottom: 18px; box-shadow: 0 4px 16px rgba(6,78,59,.06);
}
.dp-card h2 { font-size: 19px; margin: 0 0 14px; color: var(--jb-primary-dark, #065f46); }
.dp-card h2 i { color: var(--jb-primary, #059669); margin-right: 4px; }
.dp-map-card { position: sticky; top: 76px; }
.dp-map { height: 460px; width: 100%; border-radius: 12px; overflow: hidden; background: #e5efe9; z-index: 0; }
.dp-note { font-size: 13.5px; color: var(--jb-muted, #64748b); margin: 10px 0 0; }
.dp-empty { padding: 30px 10px; text-align: center; color: var(--jb-muted, #64748b); background: var(--jb-soft, #ecfdf5); border-radius: 12px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.dot-open { background: #059669; }
.dot-closed { background: #dc2626; }

/* หมุดบนแผนที่ */
.dp-pin span {
  display: flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; color: #fff; font: 700 12px/1 var(--jb-font, sans-serif);
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

/* ลำดับจุดจอด */
.dp-timeline { list-style: none; margin: 0; padding: 0; }
.dp-timeline li { position: relative; padding: 0 0 4px 26px; border-left: 2px solid var(--jb-soft-border, #a7f3d0); margin-left: 8px; }
.dp-timeline li:last-child { border-left-color: transparent; }
.dp-timeline li::before {
  content: ""; position: absolute; left: -8px; top: 12px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--jb-primary, #059669);
}
.dp-timeline li.is-first::before, .dp-timeline li.is-last::before { background: var(--jb-primary, #059669); }
.dp-timeline li.is-closed::before { border-color: #dc2626; }
.dp-timeline a {
  display: block; text-decoration: none; padding: 8px 10px; border-radius: 10px; color: inherit;
  transition: background-color .15s ease;
}
.dp-timeline a:hover { background: var(--jb-soft, #ecfdf5); }
.dp-stop-name { display: block; font-weight: 700; color: var(--jb-text, #1e293b); }
.dp-timeline a:hover .dp-stop-name { color: var(--jb-primary, #059669); }
.dp-stop-meta { display: block; font-size: 13.5px; color: var(--jb-muted, #64748b); }
.dp-pill { display: inline-block; font-size: 12px; background: var(--jb-soft-2, #d1fae5); color: var(--jb-primary-dark, #065f46); padding: 1px 8px; border-radius: 50px; margin-right: 4px; }
.dp-closed-text { color: #dc2626; font-weight: 600; }

.dp-article p { line-height: 1.8; color: #334155; }
.dp-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.dp-links a {
  display: block; text-decoration: none; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--jb-border, #e2e8f0); color: var(--jb-text, #1e293b); font-weight: 600;
  transition: border-color .15s ease, background-color .15s ease;
}
.dp-links a small { display: block; font-weight: 400; color: var(--jb-muted, #64748b); }
.dp-links a:hover { border-color: var(--jb-primary, #059669); background: var(--jb-soft, #ecfdf5); color: var(--jb-primary-dark, #065f46); }

/* การ์ดลิงก์ทั่วไป (ใช้ในหน้าจุดจอด/จังหวัด) */
.dp-row-link {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: inherit;
}

@media (max-width: 900px) {
  .dp-grid { grid-template-columns: 1fr; }
  .dp-map-card { position: static; }
  .dp-map { height: 320px; }
}
@media (max-width: 520px) {
  .dp-hero-row { align-items: flex-start; }
  .dp-logo { width: 64px; height: 64px; font-size: 26px; border-radius: 14px; }
  .dp-actions .dp-btn { flex: 1 1 100%; justify-content: center; }
}
