/* test-detail-news — หน้ารายละเอียดข่าว + ปุ่มแชร์ + แกลเลอรี */
.pn2-testbar { background: #fff7e6; border-bottom: 2px solid #f59e0b; color: #92400e; text-align: center; padding: 6px 12px; font-size: 14px; }

.pn2-article { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 28px 30px; margin: 30px 0; width: 100%; }
.pn2-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: #64748b; font-size: .92rem; margin-bottom: 8px; }
.pn2-badge { background: #e0edff; color: #003c71; padding: 2px 12px; border-radius: 999px; font-weight: 600; }
.pn2-title { color: #003c71; font-weight: 700; line-height: 1.4; margin: 6px 0 14px; }
.pn2-cover { margin: 18px 0; }
.pn2-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #e2e8f0; display: block; }
.pn2-lead { font-size: 1.1rem; color: #334155; border-left: 4px solid #0b5ca8; padding-left: 14px; }
.pn2-body { line-height: 1.85; font-size: 1.02rem; overflow-wrap: anywhere; }
.pn2-body img { max-width: 100%; height: auto; border-radius: 8px; }
.pn2-body table { max-width: 100%; border-collapse: collapse; }
.pn2-body table td, .pn2-body table th { border: 1px solid #cbd5e1; padding: 6px 10px; }
.pn2-body figure { margin: 1rem 0; }
.pn2-h { color: #003c71; font-weight: 600; margin: 28px 0 12px; }
.pn2-h small { color: #64748b; font-weight: 400; }

/* ปุ่มแชร์ */
.pn2-share { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 18px; }
.pn2-sh { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; cursor: pointer; font: inherit; font-size: .9rem; line-height: 1;
    padding: 9px 16px; border-radius: 999px; color: #fff !important; text-decoration: none !important; transition: transform .12s, filter .12s; }
.pn2-sh:hover { transform: translateY(-1px); filter: brightness(1.08); }
.pn2-sh[hidden] { display: none; }
.pn2-sh-native { background: #003c71; }
.pn2-sh-fb { background: #1877f2; }
.pn2-sh-line { background: #06c755; }
.pn2-sh-x { background: #111827; }
.pn2-sh-msg { background: #0084ff; }
.pn2-sh-wa { background: #25d366; }
.pn2-sh-mail { background: #6b7280; }
.pn2-sh-copy { background: #475569; }
.pn2-sh-copy.done { background: #15803d; }




/* แกลเลอรี */
.pn2-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 110px)); gap: 8px; }
.pn2-gallery a { display: block; border-radius: 10px; overflow: hidden; background: #e2e8f0; }
.pn2-gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform .2s; }
.pn2-gallery a:hover img { transform: scale(1.05); }

.pn2-files { list-style: none; padding: 0; }
.pn2-files li { padding: 8px 12px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 6px; }

/* ข้อความแจ้ง (toast) */
.pn2-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 999px;
    opacity: 0; transition: all .25s; z-index: 99999; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: .92rem; }
.pn2-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Lightbox */
.pn2-lightbox { position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 99998; display: flex; align-items: center; justify-content: center; }
.pn2-lightbox[hidden] { display: none; }
.pn2-lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; border-radius: 6px; }
.pn2-lightbox button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; cursor: pointer; border-radius: 999px; width: 46px; height: 46px; font-size: 22px; line-height: 1; }
.pn2-lightbox button:hover { background: rgba(255, 255, 255, .3); }
.pn2-lb-close { top: 16px; right: 18px; }
.pn2-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.pn2-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.pn2-lb-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #e2e8f0; font-size: .9rem; }
body.pn2-lb-open { overflow: hidden; }

@media (max-width: 767px) {
    .pn2-article { padding: 18px 16px; border-radius: 10px; }
    .pn2-sh { padding: 9px 13px; font-size: .86rem; }
}

/* วันที่/ผู้ลงข่าว (ท้ายบทความ ก่อนปุ่มแชร์) */
.pn2-meta-foot { margin: 6px 0 0; }
.pn2-ic { flex: 0 0 auto; }

/* แกลเลอรีแยกจากเนื้อหาให้ห่างกัน */
.pn2-gallery-sec { margin-top: 56px; padding-top: 28px; border-top: 1px solid #e2e8f0; }
.pn2-gallery-sec .pn2-h { margin-top: 0; }
.pn2-gallery a { cursor: zoom-in; }
