/* ==========================================================
   หน้าเนื้อหาทั้งหมด (ยกเว้นหน้าแรก) — ThaiBoiler
   ปรับ class เดิมจาก home.css ให้เข้าชุดกับ header/footer/หน้าแรก
   ใช้ตัวแปรสีจาก layout.css
   ========================================================== */

/* ---------- ส่วนหัวหน้า (template/page-header.php) ---------- */

.tb-pagehead {
  position: relative;
  padding: 36px 0 44px;
  background: #f5f5f4;
  border-bottom: 1px solid var(--tb-line);
  font-family: "Prompt", sans-serif;
  overflow: hidden;
}

.tb-pagehead::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 38%;
  background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .035) 0 2px, transparent 2px 16px);
  pointer-events: none;
}

.tb-pagehead .container {
  position: relative;
  z-index: 1;
}

.tb-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--tb-muted);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
}

.tb-breadcrumb a {
  color: var(--tb-muted);
}

.tb-breadcrumb a:hover {
  color: var(--tb-red);
}

.tb-breadcrumb-sep {
  color: #c4c4c4;
}

.tb-breadcrumb .is-current {
  color: var(--tb-ink);
}

.tb-pagehead-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--tb-red);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
}

.tb-pagehead-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

.tb-pagehead-title {
  margin: 0;
  color: var(--tb-black);
  font-family: "Prompt", sans-serif;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

/* แท็บเมนูย่อย (template/about-nav.php) */
.tb-subnav {
  background: var(--tb-white);
  border-bottom: 1px solid var(--tb-line);
  font-family: "Prompt", sans-serif;
}

.tb-subnav ul {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.tb-subnav ul::-webkit-scrollbar {
  display: none;
}

.tb-subnav a {
  position: relative;
  display: block;
  padding: 16px 14px;
  color: var(--tb-muted);
  font-size: 15px;
  white-space: nowrap;
  transition: color .2s;
}

.tb-subnav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--tb-red);
  transform: scaleX(0);
  transition: transform .25s var(--tb-ease);
}

.tb-subnav a:hover,
.tb-subnav a.is-active {
  color: var(--tb-black);
}

.tb-subnav a.is-active::after,
.tb-subnav a:hover::after {
  transform: scaleX(1);
}

/* ---------- โครงหน้าเดิม ---------- */

.history,
.news,
.course,
.contact,
.login,
.register,
.clinic {
  padding: 40px 0 96px;
  color: #4a4a4a;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
}

/* ระยะห่างใต้ส่วนหัวมาจาก padding ด้านบนแล้ว */
.history > .area_content.top40,
.news > .area_content.top40,
.course > .area_content.top40,
.clinic > .area_content.top40,
.login > .area_content.top40 {
  margin-top: 0;
}

/* ความกว้างเท่ากับ .container ของ Bootstrap ให้ขอบตรงกับส่วนหัว */
.area_content {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

@media (min-width: 576px) {
  .area_content { max-width: 540px; }
}

@media (min-width: 768px) {
  .area_content { max-width: 720px; }
}

@media (min-width: 992px) {
  .area_content { max-width: 960px; }
}

@media (min-width: 1200px) {
  .area_content { max-width: 1140px; }
}

@media (min-width: 1400px) {
  .area_content { max-width: 1320px; }
}

.history h2,
.news h2,
.course h2,
.contact h2,
.login h2,
.register h2,
.clinic h2 {
  margin: 0 0 8px;
  color: var(--tb-black);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.course h3 {
  color: var(--tb-black);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0;
}

.history b,
.news b,
.course b,
.register b {
  color: var(--tb-black);
  font-weight: 500;
}

/* รายการแบบ bullet */
.history li,
.register-remark li {
  position: relative;
  margin-top: 12px;
  padding: 0 0 0 22px;
  background: none;
  list-style: none;
}

.history li::before,
.register-remark li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tb-red);
}

/* ---------- ปุ่ม ---------- */

.btn-news,
.btn-submit,
.btn-register,
.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 28px;
  background: var(--tb-red);
  color: var(--tb-white);
  border: 0;
  border-radius: var(--tb-radius);
  font-family: "Prompt", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  cursor: pointer;
  transition: background .2s, transform .2s var(--tb-ease);
}

.btn-news:hover,
.btn-submit:hover,
.btn-register:hover,
.btn-more:hover {
  background: var(--tb-red-dark);
  color: var(--tb-white);
  letter-spacing: 0;
  transform: translateY(-2px);
}

.btn-more {
  min-height: 36px;
  padding: 7px 18px;
  font-size: 13px;
}

.btn-submit,
.btn-register {
  min-width: 200px;
  min-height: 50px;
  font-size: 16px;
}

.btn-back,
.login .btn-secondary {
  min-height: 46px;
  padding: 11px 24px;
  background: var(--tb-white);
  color: var(--tb-black);
  border: 1px solid #cfcfcf;
  border-radius: var(--tb-radius);
  font-size: 15px;
  transition: border-color .2s;
}

.btn-back:hover,
.login .btn-secondary:hover {
  background: var(--tb-white);
  color: var(--tb-black);
  border-color: var(--tb-black);
}

.login .btn-primary {
  min-height: 48px;
  background: var(--tb-red);
  border-color: var(--tb-red);
  border-radius: var(--tb-radius);
  font-weight: 500;
}

.login .btn-primary:hover,
.login .btn-primary:focus {
  background: var(--tb-red-dark);
  border-color: var(--tb-red-dark);
  box-shadow: none;
}

.login .btn-block {
  display: block;
  width: 100%;
  margin-top: 10px;
}

/* ---------- ฟอร์ม ---------- */

.history label,
.news label,
.course label,
.contact label,
.login label,
.register label,
.clinic label {
  margin-bottom: 6px;
  color: var(--tb-black);
  font-size: 14.5px;
  font-weight: 500;
}

.form-control,
.input_contact,
.input_register {
  min-height: 48px;
  padding: 10px 14px;
  background-color: var(--tb-white);
  border: 1px solid #d9d9d9;
  border-radius: var(--tb-radius);
  color: var(--tb-ink);
  font-family: "Prompt", sans-serif;
  font-size: 15px;
  font-weight: 400;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
}

textarea.form-control,
.input_area {
  min-height: 120px;
}

.form-control:focus,
.input_contact:focus,
.input_register:focus {
  border-color: var(--tb-red);
  box-shadow: 0 0 0 3px rgba(136, 28, 28, .12);
  outline: none;
}

.form-control::placeholder {
  color: #a8a8a8;
}

.invalid-feedback {
  font-size: 13px;
}

/* ช่องติ๊กยอมรับเงื่อนไข */
.checkmark,
.container3 .checkmark {
  width: 22px;
  height: 22px;
  border: 1px solid #bdbdbd;
  border-radius: 4px;
}

.container2 .checkmark:after,
.container3 .checkmark:after {
  left: 7px;
  top: 3px;
}

.container2 input:checked ~ .checkmark,
.container3 input:checked ~ .checkmark {
  background-color: var(--tb-red);
  border-color: var(--tb-red);
}

.container2,
.container3 {
  font-size: 15px;
}

.container2 a,
.container3 a {
  color: var(--tb-red);
  border-bottom: 1px solid currentColor;
}

/* ---------- การ์ดข่าว / วิดีโอ (news.php, member/video.php) ---------- */

.news-box {
  margin: 32px 1% 0;
  padding: 0;
  background: var(--tb-white);
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: none;
  overflow: hidden;
  text-align: left;
  transition: box-shadow .3s, border-color .3s, transform .3s var(--tb-ease);
}

.news-box:hover {
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .1);
  transform: translateY(-4px);
}

.news-box a {
  color: var(--tb-ink);
}

.news-img {
  height: 230px;
  border-radius: 0;
  background: #eee;
}

.news-img img {
  transition: transform .5s var(--tb-ease);
}

.news-box:hover .news-img img {
  transform: scale(1.05);
}

.news-date {
  z-index: 2;
  margin: 14px 0 0 14px;
  padding: 6px 10px;
  background: var(--tb-red);
  border-radius: 4px;
  color: var(--tb-white);
  font-size: 11px;
  line-height: 1.2;
}

.news-date span {
  font-size: 22px;
  font-weight: 600;
}

.news-box .text {
  margin: 0;
  padding: 20px 22px 24px;
}

.news-title {
  display: -webkit-box;
  min-height: 0;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--tb-black);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  transition: color .2s;
}

.news-box:hover .news-title {
  color: var(--tb-red);
}

.news-box .btn-more {
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--tb-muted);
  font-size: 13.5px;
  font-weight: 400;
}

.news-box .btn-more:hover,
.news-box:hover .btn-more {
  background: none;
  color: var(--tb-red);
  transform: none;
}

/* เลขหน้า */
.page-split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 56px;
  color: var(--tb-muted);
  font-size: 14px;
}

.page-split li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  color: var(--tb-ink);
  list-style: none;
  transition: border-color .2s, color .2s;
}

.page-split a:hover li {
  border-color: var(--tb-red);
  color: var(--tb-red);
}

.page-split .active {
  width: auto;
  height: 40px;
  background: var(--tb-red);
  border-color: var(--tb-red);
  border-radius: var(--tb-radius);
  color: var(--tb-white);
}

/* ตัวคั่น "|" ระหว่างเลขหน้า */
.page-split > li {
  display: none;
}

/* ---------- เอกสารประเมินปัญหา (assess-problem.php) ---------- */

.problem-box {
  display: flex;
  flex-direction: column;
  height: calc(100% - 32px);
  margin-top: 32px;
  padding: 0 0 24px;
  background: var(--tb-white);
  border: 1px solid var(--tb-line) !important;
  border-radius: var(--tb-radius);
  overflow: hidden;
  text-align: left;
  transition: box-shadow .3s, border-color .3s, transform .3s var(--tb-ease);
}

.problem-box:hover {
  border-color: transparent !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .1);
  transform: translateY(-4px);
}

.problem-box img {
  display: block;
  width: 100%;
  height: 220px;
  padding: 16px;
  object-fit: contain;
  background: #fafafa;
  border-bottom: 1px solid var(--tb-line);
}

.problem-box .text {
  flex: 1;
  padding: 20px 24px 0;
}

.problem-box h1,
.problem-box .title-h {
  min-height: 0;
  color: var(--tb-black);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
}

.problem-box .top10 {
  min-height: 0;
  margin-top: 8px;
  color: var(--tb-muted);
  font-size: 14px;
  line-height: 1.6;
}

.problem-box .btn-news {
  align-self: flex-start;
  margin: 20px 24px 0;
}

/* ---------- การ์ดคอร์ส / ชำระเงิน / ขอบคุณ ---------- */

.course .area,
.contact .area,
.course-sub {
  margin-top: 56px;
  padding: 40px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
  color: var(--tb-ink);
  font-size: 15px;
  line-height: 1.7;
}

.course-sub {
  background: var(--tb-white);
  border: 1px solid var(--tb-line);
  padding: 24px 32px;
}

.course-detail {
  padding: 32px 0;
}

.course-detail a {
  color: var(--tb-red);
}

.course .description,
.course .date,
.course .price {
  margin-top: 16px;
}

.course .price .specialprice {
  color: var(--tb-red);
  font-weight: 600;
}

.payment_box .price-old {
  color: var(--tb-muted);
}

.payment_box .price-discount {
  color: var(--tb-red);
}

.payment_box .price-total b {
  color: var(--tb-black);
  font-size: 17px;
}

.payment_box .price-total td:last-child b {
  color: var(--tb-red);
}

.course .price-note {
  margin-top: 4px;
  color: var(--tb-muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.payment_box {
  padding: 32px;
  background: var(--tb-white);
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  box-shadow: none;
}

.payment_box2 {
  padding: 32px 0;
  border-bottom: 1px solid var(--tb-line);
}

.course-thank,
.register-thank {
  max-width: 720px;
  margin: 24px auto;
  padding: 48px 40px;
  background: var(--tb-white);
  border: 1px solid var(--tb-line);
  border-top: 3px solid var(--tb-red);
  border-radius: var(--tb-radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .06);
}

.course-thank .title {
  color: var(--tb-black);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
}

.course-thank .title > div:first-child {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 600;
}

.course-thank .remark {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--tb-line);
  color: var(--tb-muted);
  font-size: 14px;
  line-height: 1.7;
}

.history-tab {
  margin-top: 0;
  padding: 32px 0;
  background: #f5f5f4;
  color: var(--tb-black);
  font-size: 16px;
}

.history-tab .btn-news {
  margin-top: 14px;
}

/* ---------- เข้าสู่ระบบ / สมัครสมาชิก ---------- */

.login .card {
  border: 1px solid var(--tb-line) !important;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .06) !important;
}

.login .card h1,
.login .card .h4 {
  color: var(--tb-black);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
}

.login .card a,
.register a u {
  color: var(--tb-red);
}

.register_tab {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
}

.register_tab li {
  width: 240px;
  margin: 0;
  padding: 12px 0;
  background: var(--tb-white);
  border: 1px solid #d9d9d9;
  border-radius: var(--tb-radius);
  box-shadow: none;
  color: var(--tb-ink);
  font-size: 15px;
  list-style: none;
  transition: border-color .2s, color .2s;
}

.register_tab li:hover {
  border: 1px solid var(--tb-red);
  color: var(--tb-red);
}

.register_tab .active,
.register_tab .active:hover {
  background: var(--tb-red);
  border-color: var(--tb-red);
  color: var(--tb-white);
}

.register-remark {
  margin-top: 48px;
  padding: 24px 28px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
  text-align: left;
}

/* ---------- นัดหมายผู้เชี่ยวชาญ ---------- */

.clinic-area {
  margin-top: 40px;
  padding: 40px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
  color: var(--tb-ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .tb-pagehead {
    padding: 28px 0 32px;
  }

  .tb-pagehead::after {
    width: 50%;
  }

  .history,
  .news,
  .course,
  .contact,
  .login,
  .register,
  .clinic {
    padding: 48px 0 72px;
  }
}

@media (max-width: 767.98px) {
  .tb-breadcrumb {
    margin-bottom: 12px;
    font-size: 12.5px;
  }

  .history,
  .news,
  .course,
  .contact,
  .login,
  .register,
  .clinic {
    padding: 36px 0 56px;
    font-size: 15px;
  }

  .news-box {
    max-width: 100%;
    margin: 20px 0 0;
  }

  .course .area,
  .contact .area,
  .clinic-area {
    padding: 28px 20px;
  }

  .payment_box {
    padding: 22px 18px;
  }

  .course-thank,
  .register-thank {
    max-width: 100%;
    padding: 36px 22px;
  }

  .register_tab li {
    width: calc(50% - 5px);
    font-size: 14px;
  }

  .login .p-5 {
    padding: 28px 20px !important;
  }
}

/* ==========================================================
   ส่วนประกอบของหน้าที่เขียนใหม่ (pg-*)
   ========================================================== */

.pg-section {
  padding: 64px 0 96px;
  background: var(--tb-white);
  color: #4a4a4a;
  font-family: "Prompt", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
}

.pg-section svg,
.pg-band svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}

.pg-h2 {
  margin: 0 0 16px;
  color: var(--tb-black);
  font-family: "Prompt", sans-serif;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.pg-lead {
  margin: 0 0 40px;
  color: var(--tb-black);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.8;
}

.pg-empty {
  padding: 48px 0;
  color: var(--tb-muted);
  text-align: center;
}

/* สองคอลัมน์ เนื้อหา + ข้าง */
.pg-split {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.pg-split-center {
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
}

.pg-aside {
  position: sticky;
  top: 150px;
  display: grid;
  gap: 24px;
}

.pg-figure {
  margin: 0;
  background: var(--tb-white);
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
  overflow: hidden;
}

.pg-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.pg-figure figcaption {
  padding: 14px 18px;
  border-top: 1px solid var(--tb-line);
  color: var(--tb-muted);
  font-size: 13px;
  line-height: 1.6;
}

.pg-figure-wide {
  max-width: 1000px;
  margin: 0 auto;
}

.pg-card {
  padding: 28px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
}

.pg-card h3 {
  margin: 0 0 16px;
  color: var(--tb-black);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.pg-list {
  margin: 0;
}

.pg-list > div + div {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e4e4e2;
}

.pg-list dt {
  color: var(--tb-muted);
  font-size: 13px;
  font-weight: 400;
}

.pg-list dd {
  margin: 0;
  color: var(--tb-black);
  font-size: 15px;
  font-weight: 500;
}

/* ไทม์ไลน์ (ประวัติ) */
.pg-timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 32px;
  list-style: none;
}

.pg-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--tb-line);
}

.pg-timeline > li {
  position: relative;
  padding-bottom: 40px;
}

.pg-timeline > li:last-child {
  padding-bottom: 0;
}

.pg-timeline > li::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--tb-red);
  border-radius: 50%;
  background: var(--tb-white);
}

.pg-timeline-year {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 10px;
  background: var(--tb-red-soft);
  border-radius: 4px;
  color: var(--tb-red);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.pg-timeline h3 {
  margin: 0 0 8px;
  color: var(--tb-black);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
}

.pg-timeline p {
  margin: 0;
}

.pg-timeline b {
  color: var(--tb-black);
  font-weight: 500;
}

/* รายการแบบมีเลข (วัตถุประสงค์) */
.pg-numbered {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pg-numbered > li {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
  border-left: 3px solid var(--tb-red);
}

.pg-numbered > li:last-child:nth-child(odd) {
  grid-column: span 2;
}

.pg-numbered-no {
  color: var(--tb-red);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}

.pg-numbered p {
  margin: 0;
  color: var(--tb-ink);
}

/* รายการ bullet */
.pg-bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pg-bullets li {
  position: relative;
  padding: 14px 0 14px 24px;
  border-bottom: 1px solid var(--tb-line);
}

.pg-bullets li:last-child {
  border-bottom: 0;
}

.pg-bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tb-red);
}

.pg-logo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
}

.pg-logo-frame img {
  width: 100%;
  max-width: 320px;
}

/* แถบดาวน์โหลด */
.pg-band {
  padding: 40px 0;
  background: #f5f5f4;
  border-top: 1px solid var(--tb-line);
  font-family: "Prompt", sans-serif;
}

.pg-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pg-band h2 {
  margin: 0;
  color: var(--tb-black);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.pg-band p {
  margin: 4px 0 0;
  color: var(--tb-muted);
  font-size: 14px;
}

.pg-band .btn-news {
  margin: 0;
}

/* บทความข่าว */
.pg-article-inner {
  max-width: 880px;
  margin: 0 auto;
}

.pg-article-head {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--tb-line);
}

.pg-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--tb-red);
  font-size: 14px;
  font-weight: 500;
}

.pg-meta svg {
  width: 15px;
  height: 15px;
}

.pg-article-title {
  margin: 0 0 18px;
  color: var(--tb-black);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
}

.pg-article-head .social {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.pg-article-media {
  margin-bottom: 36px;
  border-radius: var(--tb-radius);
  overflow: hidden;
  background: #f5f5f4;
}

.pg-article-media > img {
  display: block;
  width: 100%;
}

.pg-article-media .flexslider {
  margin: 0;
  border: 0;
  background: transparent;
}

.pg-article-body {
  padding: 0;
  color: #3d3d3d;
  font-size: 17px;
  line-height: 1.9;
}

.pg-article-body .description {
  margin: 0;
}

.pg-article-body img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--tb-radius);
}

.pg-article-body a {
  color: var(--tb-red);
  text-decoration: underline;
}

.pg-article-foot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--tb-line);
}

.pg-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tb-red);
  font-size: 15px;
  font-weight: 500;
}

.pg-back svg {
  transition: transform .2s var(--tb-ease);
}

.pg-back:hover {
  color: var(--tb-red-dark);
}

.pg-back:hover svg {
  transform: translateX(-4px);
}

/* รายการคอร์ส */
.pg-course {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 40px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
}

.pg-course + .pg-course {
  margin-top: 28px;
}

.pg-course-media {
  display: block;
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}

.pg-course-media img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .5s var(--tb-ease);
}

.pg-course-media:hover img {
  transform: scale(1.03);
}

.pg-course-desc {
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.8;
}

.pg-course-meta {
  display: grid;
  gap: 14px;
  margin: 0 0 28px;
  padding: 20px 0 0;
  border-top: 1px solid #e2e2e0;
  list-style: none;
}

.pg-course-meta li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--tb-black);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.pg-course-meta svg {
  width: 36px;
  height: 36px;
  margin-top: 2px;
  padding: 8px;
  background: var(--tb-white);
  border-radius: 50%;
  color: var(--tb-red);
  box-sizing: border-box;
}

.pg-course-meta small {
  display: block;
  color: var(--tb-muted);
  font-size: 12.5px;
  font-weight: 300;
}

.pg-course .btn-news {
  margin: 0;
}

/* หน้าติดต่อ */
.pg-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: stretch;
}

.pg-contact-list {
  display: grid;
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.pg-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  color: var(--tb-black);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
}

.pg-contact-list small,
.pg-contact-line small {
  display: block;
  color: var(--tb-muted);
  font-size: 12.5px;
  font-weight: 300;
}

.pg-contact-list a,
.pg-contact-line a {
  color: var(--tb-black);
}

.pg-contact-list a:hover,
.pg-contact-line a:hover {
  color: var(--tb-red);
}

.pg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--tb-red-soft);
  border-radius: 50%;
  color: var(--tb-red);
  flex: none;
}

.pg-contact-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius);
}

.pg-contact-line img {
  width: 112px;
  height: 112px;
  border-radius: 4px;
}

.pg-contact-line span {
  color: var(--tb-black);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
}

.pg-contact-line em {
  display: block;
  color: var(--tb-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 300;
}

.pg-contact-map {
  min-height: 420px;
  border-radius: var(--tb-radius);
  overflow: hidden;
  background: #f5f5f4;
}

.pg-contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

/* การ์ดฟอร์ม */
.pg-formcard {
  margin-top: 64px;
  padding: 48px;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
}

.pg-formcard-head {
  margin-bottom: 28px;
  text-align: center;
}

.pg-formcard-head p {
  margin: 0;
  color: var(--tb-muted);
  font-size: 15px;
}

.pg-formcard label {
  margin-bottom: 6px;
  color: var(--tb-black);
  font-size: 14.5px;
  font-weight: 500;
}

.pg-formcard label span {
  color: var(--tb-red);
}

.pg-formcard-foot {
  margin-top: 28px;
  text-align: center;
}

/* สถานะการรับสมัคร (course.php, course-detail.php) */
.pg-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 12px 12px 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.pg-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pg-status.is-closed {
  background: #ececea;
  color: var(--tb-muted);
}

.pg-course-info .pg-status {
  display: flex;
  width: max-content;
}

.course-closed {
  text-align: center;
}

.course-closed-inner {
  max-width: 560px;
  margin: 0 auto;
}

.course-closed h2 {
  margin: 4px 0 10px;
}

.course-closed p {
  margin: 0 0 24px;
  color: var(--tb-muted);
  font-size: 15px;
}

.course-closed p a {
  color: var(--tb-red);
}

.course-closed .btn-news {
  margin-top: 0;
}

/* คณะกรรมการสมาคม (board.php) */
.pg-board {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.pg-board-nav {
  position: sticky;
  top: 150px;
  padding: 24px 0;
  background: #f5f5f4;
  border-radius: var(--tb-radius);
}

.pg-board-nav h3 {
  margin: 0 0 10px;
  padding: 0 24px;
  color: var(--tb-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .3px;
  line-height: 1.4;
}

.pg-board-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pg-board-nav a {
  position: relative;
  display: block;
  padding: 10px 24px;
  color: var(--tb-ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  transition: color .2s, background .2s;
}

.pg-board-nav a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--tb-red);
  transform: scaleY(0);
  transition: transform .2s var(--tb-ease);
}

.pg-board-nav a:hover {
  color: var(--tb-red);
}

.pg-board-nav a.is-active {
  background: var(--tb-white);
  color: var(--tb-red);
  font-weight: 500;
}

.pg-board-nav a.is-active::before {
  transform: scaleY(1);
}

.pg-board-figure > a {
  display: block;
  background: #fafafa;
}

.pg-board-figure img {
  margin: 0 auto;
}

.pg-board-figure figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--tb-black);
  font-size: 14px;
  font-weight: 500;
}

.pg-board-zoom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tb-red);
  font-size: 13.5px;
  white-space: nowrap;
}

.pg-board-zoom:hover {
  color: var(--tb-red-dark);
}

.pg-board-body {
  margin-top: 32px;
}

/* หน้าข้อมูลสมาชิก */
.member-profile {
  padding: 48px 0 96px;
}

@media (max-width: 991.98px) {
  .pg-section {
    padding: 48px 0 72px;
  }

  .pg-split,
  .pg-split-center,
  .pg-contact,
  .pg-course {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pg-aside {
    position: static;
  }

  .pg-board {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .pg-board-nav {
    position: static;
    padding: 0;
    background: none;
  }

  .pg-board-nav h3 {
    display: none;
  }

  .pg-board-nav ul {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pg-board-nav ul::-webkit-scrollbar {
    display: none;
  }

  .pg-board-nav a {
    padding: 8px 16px;
    border: 1px solid var(--tb-line);
    border-radius: 999px;
    font-size: 14px;
    white-space: nowrap;
  }

  .pg-board-nav a::before {
    display: none;
  }

  .pg-board-nav a.is-active {
    background: var(--tb-red);
    border-color: var(--tb-red);
    color: var(--tb-white);
  }

  .pg-course {
    padding: 28px;
  }
}

@media (max-width: 767.98px) {
  .pg-section {
    padding: 36px 0 56px;
    font-size: 15px;
  }

  .pg-lead {
    font-size: 16px;
  }

  .pg-numbered {
    grid-template-columns: 1fr;
  }

  .pg-numbered > li:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .pg-numbered > li {
    padding: 22px 20px;
    gap: 14px;
  }

  .pg-band-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .pg-course {
    padding: 18px 18px 24px;
    gap: 24px;
  }

  .pg-article-body {
    font-size: 16px;
  }

  .pg-formcard {
    margin-top: 40px;
    padding: 28px 20px;
  }

  .pg-contact-map,
  .pg-contact-map iframe {
    min-height: 300px;
  }

  .pg-logo-frame {
    padding: 28px;
  }
}
