/*--------------------------------------------------------------
# Journal content pages (About menu) — shared template
# ใช้ร่วมกันในหน้า About, Submissions, Author Guidelines,
# Announcements, Privacy, Contact, Editorial Team
--------------------------------------------------------------*/
.jp-page { display: flex; flex-direction: column; gap: 24px; margin: 1.5rem 0 30px; }

.jp-card {
  padding: 28px 32px 30px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eee3e1;
  box-shadow: 0 6px 22px rgba(76, 14, 9, 0.07);
  scroll-margin-top: 100px;
}
.jp-card-intro { border-top: 4px solid var(--brand, #4c0e09); padding-top: 32px; }

.jp-title { margin: 0 0 14px; font-size: 2rem; font-weight: 800; line-height: 1.3; color: var(--brand, #4c0e09); }
.jp-divider {
  width: 52px; height: 4px; border-radius: 2px; margin: 0 0 22px;
  background: linear-gradient(90deg, var(--brand, #4c0e09), var(--accent, #ffc107));
}
.jp-subtitle {
  margin: 0 0 18px; padding-left: 12px;
  border-left: 4px solid var(--accent, #ffc107);
  font-size: 1.2rem; font-weight: 700; line-height: 1.45;
  color: var(--brand, #4c0e09);
}
.jp-subtitle .bi { color: #b07a00; margin-right: 6px; }
.jp-lead { margin: 0 0 14px; color: #444; font-size: 16px; line-height: 1.85; }
.jp-lead:last-child { margin-bottom: 0; }
.jp-card > p, .jp-text { margin: 0 0 14px; color: #444; font-size: 15px; line-height: 1.85; }
.jp-card > p:last-child { margin-bottom: 0; }
.jp-card a:not([class]) { color: var(--brand, #4c0e09); font-weight: 600; }
.jp-card a:not([class]):hover { color: var(--brand-hover, #6e1a12); }

.jp-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px;
  padding: 6px 14px; border-radius: 4px;
  background: var(--brand-soft, #f7eeec); color: var(--brand, #4c0e09);
  font-size: 14px; font-weight: 700; text-decoration: none;
}

/* ลิงก์ "ดูเพิ่มเติม" และปุ่ม */
.jp-more {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--brand, #4c0e09); font-size: 14px; font-weight: 600; text-decoration: none;
  transition: gap .2s, color .2s;
}
.jp-more:hover { color: var(--brand-hover, #6e1a12); gap: 9px; }
.jp-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 6px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  background: var(--brand, #4c0e09); border: 2px solid var(--brand, #4c0e09); color: #fff;
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.jp-btn:hover { background: var(--brand-hover, #6e1a12); border-color: var(--brand-hover, #6e1a12); color: #fff; transform: translateY(-1px); }
.jp-btn-outline { background: #fff; color: var(--brand, #4c0e09); }
.jp-btn-outline:hover { background: var(--brand, #4c0e09); color: #fff; }
.jp-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* สารบัญ */
.jp-toc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.jp-toc a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  background: #faf7f6; border: 1px solid #eee3e1;
  color: #333; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none;
  transition: border-color .2s, background .2s, color .2s;
}
.jp-toc a:hover { background: var(--brand-soft, #f7eeec); border-color: #d9bfba; color: var(--brand, #4c0e09); }
.jp-toc .bi { color: var(--brand, #4c0e09); }

/* รายการหัวข้อ + คำอธิบาย */
.jp-items { list-style: none; margin: 0; padding: 0; }
.jp-items > li { padding: 12px 0 12px 16px; border-left: 3px solid #ead7d3; transition: border-color .2s; }
.jp-items > li + li { margin-top: 12px; }
.jp-items > li:hover { border-left-color: var(--brand, #4c0e09); }
.jp-items h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: var(--brand, #4c0e09); }
.jp-items p { margin: 0; color: #444; font-size: 15px; line-height: 1.8; }

/* รายการมีไอคอนเครื่องหมายถูก */
.jp-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.jp-checks li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border-radius: 8px;
  background: #faf7f6; border: 1px solid #eee3e1;
  font-size: 15px; color: #333; line-height: 1.65;
}
.jp-checks .bi { color: #1e7a4c; font-size: 18px; line-height: 1.4; }

/* รายการมีเลขลำดับ */
.jp-numbered { list-style: none; margin: 0; padding: 0; counter-reset: jp-num; }
.jp-numbered > li {
  counter-increment: jp-num; position: relative;
  padding: 10px 0 10px 46px; border-bottom: 1px solid #f3eceb;
  font-size: 15px; color: #444; line-height: 1.75;
}
.jp-numbered > li:last-child { border-bottom: none; }
.jp-numbered > li::before {
  content: counter(jp-num); position: absolute; left: 0; top: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand, #4c0e09); color: #fff; font-size: 13px; font-weight: 700;
}
.jp-numbered strong { color: var(--brand, #4c0e09); }

/* กล่องตัวเลข / ข้อมูลสั้น */
.jp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.jp-tiles-2 { grid-template-columns: repeat(2, 1fr); }
.jp-tiles-4 { grid-template-columns: repeat(4, 1fr); }
.jp-tile {
  display: block; padding: 16px 18px; border-radius: 10px;
  background: var(--brand-soft, #f7eeec); border: 1px solid #ead7d3;
  text-decoration: none; color: inherit;
}
.jp-tile-value { font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--brand, #4c0e09); }
.jp-tile-value small { font-size: 13px; font-weight: 600; }
.jp-tile-label { margin-top: 4px; font-size: 14px; font-weight: 600; color: #333; }
.jp-tile p { margin: 8px 0 0; font-size: 14px; color: #555; line-height: 1.7; }
.jp-tile .bi { color: var(--brand, #4c0e09); margin-right: 4px; }

/* กล่องหมายเหตุ */
.jp-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 18px; border-radius: 8px;
  background: var(--accent-soft, #fff4d6); border: 1px solid #f3dc9a;
}
.jp-note > .bi { color: #b07a00; font-size: 20px; line-height: 1.3; }
.jp-note p { margin: 0; font-size: 14.5px; color: #4d3a00; line-height: 1.75; }

/* กล่องเรียกให้ทำ (CTA) */
.jp-cta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 16px 24px; padding: 22px 26px; border-radius: 10px;
  background: linear-gradient(90deg, var(--brand, #4c0e09), var(--brand-hover, #6e1a12)); color: #fff;
}
.jp-cta h2 { margin: 0 0 4px; font-size: 1.15rem; font-weight: 700; color: #fff; }
.jp-cta p { margin: 0; font-size: 14px; opacity: .9; }
.jp-cta .jp-btn { background: var(--accent, #ffc107); border-color: var(--accent, #ffc107); color: #2b1a00; }
.jp-cta .jp-btn:hover { background: #ffcd38; border-color: #ffcd38; color: #2b1a00; }
.jp-cta .jp-btn-outline { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.jp-cta .jp-btn-outline:hover { background: #fff; color: var(--brand, #4c0e09); }

/* ตาราง */
.jp-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; border: 1px solid #eee3e1; border-radius: 10px; overflow: hidden; }
.jp-table th { background: var(--brand, #4c0e09); color: #fff; font-weight: 700; font-size: 14px; padding: 12px 16px; }
.jp-table td { padding: 11px 16px; font-size: 14.5px; color: #444; line-height: 1.6; border-top: 1px solid #f1e8e6; vertical-align: top; }
.jp-table tbody tr:nth-child(even) td { background: #fbf8f7; }
.jp-table td:first-child { font-weight: 700; color: var(--brand, #4c0e09); white-space: nowrap; }

/* ตัวอย่างการอ้างอิง */
.jp-refs { display: grid; gap: 12px; }
.jp-ref { padding: 14px 18px; border-radius: 8px; background: #faf7f6; border: 1px solid #eee3e1; }
.jp-ref-type { display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: #b07a00; }
.jp-ref p { margin: 0; padding-left: 2em; text-indent: -2em; font-size: 14.5px; color: #333; line-height: 1.75; word-break: break-word; }
.jp-ref p + p { margin-top: 6px; }

/* ที่อยู่ / ข้อมูลติดต่อ */
.jp-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.jp-contact li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: #444; line-height: 1.6; }
.jp-contact .bi { color: var(--brand, #4c0e09); font-size: 16px; line-height: 1.5; }

/* เนื้อหาจากระบบหลังบ้าน (HTML) */
.jp-prose { color: #444; font-size: 15px; line-height: 1.85; overflow-wrap: break-word; }
.jp-prose img { max-width: 100%; height: auto; border-radius: 6px; }
.jp-prose table { max-width: 100%; }
.jp-prose a { color: var(--brand, #4c0e09); font-weight: 600; }

/* รายการโพสต์ (Announcements / Awards) */
.jp-posts { display: grid; gap: 18px; }
.jp-post {
  display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: center;
  padding: 18px; border-radius: 10px; background: #faf7f6; border: 1px solid #eee3e1;
  transition: border-color .2s, box-shadow .2s;
}
.jp-post:hover { border-color: #d9bfba; box-shadow: 0 6px 18px rgba(76, 14, 9, .08); }
.jp-post-thumb { display: block; border-radius: 8px; overflow: hidden; background: #fff; }
.jp-post-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s; }
.jp-post:hover .jp-post-thumb img { transform: scale(1.04); }
.jp-post-date { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #b07a00; }
.jp-post-title { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; line-height: 1.45; }
.jp-post-title a { color: var(--brand, #4c0e09); text-decoration: none; }
.jp-post-title a:hover { color: var(--brand-hover, #6e1a12); text-decoration: underline; }
.jp-post-details {
  margin: 0 0 10px; font-size: 14.5px; color: #555; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* หน้าอ่านโพสต์ */
.jp-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 14px; color: #777; }
.jp-crumb a { color: var(--brand, #4c0e09); font-weight: 600; text-decoration: none; }
.jp-crumb a:hover { text-decoration: underline; }
.jp-post-cover { display: block; width: 100%; border-radius: 10px; margin-bottom: 24px; border: 1px solid #eee; }
.jp-title-sm { font-size: 1.6rem; }

/* ไม่มีข้อมูล */
.jp-empty { padding: 28px 20px; border-radius: 10px; background: #faf7f6; border: 1px dashed #e0cfcb; text-align: center; color: #777; }
.jp-empty .bi { display: block; margin-bottom: 8px; font-size: 28px; color: #c9b1ac; }

@media (max-width: 767.98px) {
  .jp-post { grid-template-columns: 1fr; }
  .jp-title-sm { font-size: 1.35rem; }
}

@media (max-width: 991.98px) {
  .jp-toc { grid-template-columns: repeat(2, 1fr); }
  .jp-tiles, .jp-tiles-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
  .jp-page { gap: 16px; }
  .jp-card { padding: 22px 20px 24px; }
  .jp-title { font-size: 1.5rem; }
  .jp-toc, .jp-tiles, .jp-tiles-2, .jp-tiles-4 { grid-template-columns: 1fr; }
  .jp-table td:first-child { white-space: normal; }
}

/* จอ 992–1199px: เนื้อหาอยู่คู่แถบ Journal Metrics จึงแคบ — ลดกล่อง 4 คอลัมน์เหลือ 2 */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .jp-tiles-4 { grid-template-columns: repeat(2, 1fr); }
}
