/* Bc — ส่วนบทความ (หน้าแรก / หน้ารวม / หน้าอ่าน) โทนดำ-ทองให้เข้ากับธีมเดิม */
.x-bc-articles,
.x-bc-articles *,
.x-bc-page,
.x-bc-page * { box-sizing: border-box; }

.x-bc-articles {
  position: relative;
  padding: 46px 0 52px;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.82) 100%);
  font-family: inherit;
}
.x-bc-articles .container { max-width: 1200px; }

/* ---------- หัวข้อส่วน ---------- */
.x-bc-arthead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.x-bc-arthead .-h {
  margin: 0; font-size: 28px; font-weight: 800; line-height: 1.25; color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.x-bc-arthead .-h::after {
  content: ''; display: block; width: 68px; height: 3px; margin-top: 10px; border-radius: 3px;
  background: linear-gradient(90deg, #f7d774, #b8860b);
}
.x-bc-arthead .-sub { margin: 10px 0 0; color: #b9b9c2; font-size: 14px; }
.x-bc-arthead .-more {
  color: #f0c14b; font-size: 14px; font-weight: 700; border: 1px solid rgba(240,193,75,.45);
  border-radius: 999px; padding: 8px 18px; white-space: nowrap; transition: .15s; text-decoration: none;
}
.x-bc-arthead .-more:hover { background: rgba(240,193,75,.14); color: #ffdf8a; text-decoration: none; }
.x-bc-arthead .-more i { font-style: normal; }

/* ---------- แถวบน: สไลด์ใหญ่ + การ์ดกลาง ---------- */
.x-bc-arttop { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }

.x-bc-hero {
  position: relative; border-radius: 14px; overflow: hidden; background: #0d0d0d;
  border: 1px solid rgba(255,255,255,.08);
  /* ยืดสูงเท่าคอลัมน์การ์ดฝั่งขวา — ห้ามใส่ aspect-ratio คู่กับ height:100%
     ไม่งั้นเบราว์เซอร์จะคำนวณความกว้างจากความสูงแล้วล้นคอลัมน์ */
  width: 100%; height: 100%; min-height: 340px;
}
.x-bc-hero .-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease;
  text-decoration: none; color: #fff; display: block;
}
.x-bc-hero .-slide.is-on { opacity: 1; visibility: visible; }
.x-bc-hero .-pic { display: block; height: 68%; overflow: hidden; background: #14140f; }
.x-bc-hero .-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.x-bc-hero:hover .-slide.is-on .-img { transform: scale(1.03); }
.x-bc-hero .-body {
  display: flex; flex-direction: column; justify-content: center; height: 32%;
  padding: 16px 22px; background: #0d0d0d;
}
.x-bc-hero .-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 22px; font-weight: 800; line-height: 1.45; color: #fff;
}
.x-bc-hero .-slide:hover .-title { color: #f0c14b; }
.x-bc-hero .-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.x-bc-hero .-cat {
  background: rgba(255,255,255,.13); color: #fff;
  font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 999px;
}
.x-bc-hero .-time { color: #9a9aa4; font-size: 12px; }
.x-bc-hero .-time::before { content: '🕒'; margin-right: 5px; font-size: 11px; }

.x-bc-hero .-dots {
  position: absolute; right: 18px; bottom: 16px; display: flex; gap: 4px; z-index: 3;
}
.x-bc-hero .-dots button {
  width: 24px; height: 24px; border-radius: 5px; border: 0; cursor: pointer;
  background: transparent; color: #7e7e88; font-size: 13px; font-weight: 700; line-height: 1;
  transition: .15s; padding: 0;
}
.x-bc-hero .-dots button:hover { color: #fff; background: rgba(255,255,255,.1); }
.x-bc-hero .-dots button.is-on { background: #f0c14b; color: #1a1200; }

.x-bc-artside { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ---------- การ์ด ---------- */
.x-bc-card { display: block; text-decoration: none; color: #e9e9ee; }
.x-bc-card:hover { text-decoration: none; color: #fff; }
.x-bc-card .-thumb {
  display: block; position: relative; border-radius: 10px; overflow: hidden;
  background: #14140f; border: 1px solid rgba(255,255,255,.07); aspect-ratio: 16 / 10;
}
.x-bc-card .-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.x-bc-card:hover .-thumb img { transform: scale(1.06); }
.x-bc-card .-title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 10px; font-size: 15px; font-weight: 600; line-height: 1.55; color: #eaeaef;
}
.x-bc-card:hover .-title { color: #f0c14b; }
.x-bc-card .-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; color: #9a9aa4; }
.x-bc-card .-date::before { content: '🕒'; margin-right: 5px; font-size: 11px; }
.x-bc-card .-tag { color: #f0c14b; }
.x-bc-card.-md .-title { font-size: 16px; -webkit-line-clamp: 3; }

/* แถวล่าง: การ์ดเล็ก + กล่องแบนเนอร์ฝั่งขวา (ถ้าตั้งไว้) */
.x-bc-artbottom { margin-top: 26px; }
.x-bc-artbottom.-has-aside {
  display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); gap: 22px; align-items: start;
}
.x-bc-artgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.x-bc-artaside {
  border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08); position: sticky; top: 90px;
}
.x-bc-artaside img { width: 100%; height: auto; display: block; }

/* ---------- หน้ารวมบทความ / หน้าอ่าน ---------- */
.x-bc-page { padding: 34px 0 60px; color: #e9e9ee; }
.x-bc-page .container { max-width: 1140px; }
.x-bc-crumb { font-size: 13px; color: #9a9aa4; margin-bottom: 18px; }
.x-bc-crumb a { color: #c9a94e; text-decoration: none; }
.x-bc-crumb a:hover { color: #f0c14b; text-decoration: none; }
.x-bc-crumb span { margin: 0 6px; opacity: .6; }

.x-bc-pagehead { text-align: center; margin-bottom: 26px; }
.x-bc-pagehead h1 {
  font-size: 30px; font-weight: 800; color: #fff; margin: 0 0 10px;
  background: linear-gradient(90deg, #fff 15%, #f0c14b 55%, #fff 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.x-bc-pagehead p { color: #a9a9b3; font-size: 14px; margin: 0; }

.x-bc-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 26px; }
.x-bc-chips a {
  font-size: 13px; padding: 7px 16px; border-radius: 999px; text-decoration: none;
  border: 1px solid rgba(255,255,255,.14); color: #cfcfd6; transition: .15s;
}
.x-bc-chips a:hover { border-color: rgba(240,193,75,.6); color: #f0c14b; text-decoration: none; }
.x-bc-chips a.is-on { background: #f0c14b; border-color: transparent; color: #1a1200; font-weight: 700; }

.x-bc-listgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.x-bc-empty { text-align: center; color: #9a9aa4; padding: 60px 0; font-size: 15px; }

.x-bc-pager { display: flex; justify-content: center; gap: 8px; margin-top: 36px; flex-wrap: wrap; }
.x-bc-pager a, .x-bc-pager span {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; border: 1px solid rgba(255,255,255,.14); color: #cfcfd6; font-size: 14px;
  text-decoration: none; padding: 0 12px; transition: .15s;
}
.x-bc-pager a:hover { border-color: rgba(240,193,75,.6); color: #f0c14b; text-decoration: none; }
.x-bc-pager .is-on { background: #f0c14b; border-color: transparent; color: #1a1200; font-weight: 800; }

/* ---------- บทความเดี่ยว ---------- */
.x-bc-article { max-width: 880px; margin: 0 auto; }
.x-bc-article h1 {
  font-size: 32px; line-height: 1.4; font-weight: 800; color: #fff; margin: 0 0 14px;
}
.x-bc-artmeta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  color: #9a9aa4; font-size: 13px; padding-bottom: 18px; margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.x-bc-artmeta .-cat {
  background: rgba(240,193,75,.14); color: #f0c14b; padding: 4px 12px; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
.x-bc-artmeta .-cat:hover { background: rgba(240,193,75,.24); text-decoration: none; }
.x-bc-artcover { border-radius: 14px; overflow: hidden; margin-bottom: 26px; border: 1px solid rgba(255,255,255,.08); }
.x-bc-artcover img { width: 100%; height: auto; display: block; }

.x-bc-artbody { font-size: 17px; line-height: 1.95; color: #dcdce3; word-break: break-word; }
.x-bc-artbody p { margin: 0 0 18px; }
.x-bc-artbody h2 { font-size: 24px; font-weight: 800; color: #f0c14b; margin: 34px 0 14px; line-height: 1.5; }
.x-bc-artbody h3 { font-size: 20px; font-weight: 700; color: #fff; margin: 28px 0 12px; line-height: 1.5; }
.x-bc-artbody a { color: #f0c14b; text-decoration: underline; }
.x-bc-artbody img { max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0 20px; }
.x-bc-artbody ul, .x-bc-artbody ol { margin: 0 0 20px; padding-left: 26px; }
.x-bc-artbody li { margin-bottom: 9px; }
.x-bc-artbody blockquote {
  margin: 0 0 20px; padding: 14px 20px; border-left: 3px solid #f0c14b;
  background: rgba(255,255,255,.04); border-radius: 0 10px 10px 0; color: #cfcfd6;
}
.x-bc-artbody table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 15px; }
.x-bc-artbody th, .x-bc-artbody td { border: 1px solid rgba(255,255,255,.13); padding: 10px 12px; }
.x-bc-artbody th { background: rgba(240,193,75,.12); color: #f0c14b; }
.x-bc-artbody iframe { max-width: 100%; border-radius: 12px; }

/* ---------- CTA ---------- */
.x-bc-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin: 34px 0 10px; padding: 22px 26px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(240,193,75,.15), rgba(0,0,0,.25));
  border: 1px solid rgba(240,193,75,.32);
}
.x-bc-cta .-txt b { display: block; font-size: 19px; color: #fff; margin-bottom: 4px; }
.x-bc-cta .-txt span { color: #c6c6cf; font-size: 14px; }
.x-bc-cta .-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.x-bc-cta .-btn {
  padding: 12px 26px; border-radius: 999px; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.x-bc-cta .-gold { background: linear-gradient(180deg, #f7d774, #c99a1e); color: #241a00; }
.x-bc-cta .-line { background: #06c755; color: #fff; }
.x-bc-cta .-btn:hover { filter: brightness(1.07); text-decoration: none; }

/* ---------- บทความที่เกี่ยวข้อง ---------- */
.x-bc-related { margin-top: 46px; }
.x-bc-related h2 {
  font-size: 22px; font-weight: 800; color: #fff; margin: 0 0 20px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.x-bc-related .x-bc-listgrid { grid-template-columns: repeat(4, 1fr); }

/* ---------- จอเล็ก ---------- */
@media (max-width: 1024px) {
  .x-bc-artbottom.-has-aside { grid-template-columns: 1fr; }
  .x-bc-artgrid, .x-bc-artbottom:not(.-has-aside) .x-bc-artgrid { grid-template-columns: repeat(3, 1fr); }
  .x-bc-artaside { position: static; max-width: 520px; margin: 0 auto; }
  .x-bc-listgrid, .x-bc-related .x-bc-listgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .x-bc-articles { padding: 32px 0 36px; }
  .x-bc-arthead .-h { font-size: 22px; }
  .x-bc-arthead .-more { padding: 6px 14px; font-size: 13px; }
  .x-bc-arttop { grid-template-columns: 1fr; gap: 16px; }
  .x-bc-hero { height: auto; aspect-ratio: 16 / 14; min-height: 240px; }
  /* แบนเนอร์ไลน์ลอยอยู่ขอบขวา — ย้ายเลขสไลด์มากลางล่างไม่ให้โดนบัง */
  .x-bc-hero .-dots { left: 0; right: 0; bottom: 8px; justify-content: center; }
  .x-bc-hero .-pic { height: 62%; }
  .x-bc-hero .-body { height: 38%; padding: 12px 16px 26px; }
  .x-bc-hero .-title { font-size: 17px; }
  .x-bc-hero .-meta { margin-top: 8px; }
  .x-bc-artbottom { margin-top: 18px; }
  .x-bc-artgrid, .x-bc-artbottom:not(.-has-aside) .x-bc-artgrid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .x-bc-listgrid, .x-bc-related .x-bc-listgrid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .x-bc-card .-title { font-size: 14px; }
  .x-bc-card.-md .-title { font-size: 14px; }
  .x-bc-article h1 { font-size: 23px; }
  .x-bc-artbody { font-size: 16px; line-height: 1.85; }
  .x-bc-pagehead h1 { font-size: 24px; }
  .x-bc-cta { padding: 18px; }
  .x-bc-cta .-btn { padding: 11px 20px; font-size: 14px; }
}
