/* ==========================================================================
   ข่าวสารและกิจกรรม (จากเพจ Facebook) v1.0.0 — ใช้กับหน้าแรกและโฟลเดอร์ news/
   ========================================================================== */
.fbn-sec { background: #fff; }
.fbn-sec[hidden] { display: none !important; }
.fbn-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.fbn-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fbn-card { display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(2, 44, 34, .09); border-radius: 20px; overflow: hidden; text-decoration: none; color: #33433d !important;
  box-shadow: 0 1px 2px rgba(2, 44, 34, .06), 0 8px 24px -12px rgba(2, 44, 34, .18); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .3s; min-width: 0; }
.fbn-card:hover { transform: translateY(-4px); border-color: #d4af37; box-shadow: 0 2px 6px rgba(2, 44, 34, .06), 0 24px 48px -20px rgba(2, 44, 34, .32); }
.fbn-media { position: relative; display: block; aspect-ratio: 4 / 3; background: #eef3f0; overflow: hidden; }
.fbn-media > img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.fbn-card:hover .fbn-media > img { transform: scale(1.05); }
.fbn-noimg { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(135deg, #022c22, #055a3c); }
.fbn-noimg img { width: 34%; max-width: 120px; opacity: .9; }
.fbn-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font: 500 .78rem 'Kanit', sans-serif; color: #fff; background: rgba(1, 26, 20, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fbn-vid { right: auto; left: 10px; background: rgba(220, 38, 38, .85); }
.fbn-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; min-width: 0; }
.fbn-body time { font: 500 .8rem 'Kanit', sans-serif; color: #8a6a0c; }
.fbn-title { font: 600 1.02rem/1.45 'Kanit', sans-serif; color: #10231d; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fbn-ex { font-size: .92rem; line-height: 1.6; color: #5d6d67; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.fbn-more { margin-top: auto; padding-top: 6px; font: 600 .88rem 'Kanit', sans-serif; color: #007f3d; }
.fbn-more i { transition: transform .25s; }
.fbn-card:hover .fbn-more i { transform: translateX(4px); }

/* การ์ดใหญ่ (ข่าวล่าสุด) บนหน้าแรก */
.fbn-big { grid-column: span 2; grid-row: span 2; position: relative; }
.fbn-big .fbn-media { aspect-ratio: auto; position: absolute; inset: 0; }
.fbn-big .fbn-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1, 26, 20, 0) 35%, rgba(1, 26, 20, .88) 100%); }
.fbn-big .fbn-count { top: 14px; bottom: auto; right: 14px; z-index: 2; }
.fbn-big .fbn-vid { left: 14px; right: auto; }
.fbn-big .fbn-body { position: relative; z-index: 1; margin-top: auto; flex: 0 0 auto; padding: 26px 26px 24px; min-height: 420px; justify-content: flex-end; }
.fbn-big .fbn-body time { color: #f3d774; }
.fbn-big .fbn-title { color: #fff; font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); -webkit-line-clamp: 3; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.fbn-big .fbn-ex { color: rgba(255, 255, 255, .86); }
.fbn-big .fbn-more { color: #f3d774; flex: 0 0 auto; margin-top: 4px; }
.fbn-acts-home { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* ปุ่ม (หน้าในโฟลเดอร์ news/) */
.fbn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 14px; font: 600 .97rem 'Kanit', sans-serif; text-decoration: none; border: 0; cursor: pointer; background: linear-gradient(135deg, #00924a, #022c22); color: #fff !important; transition: transform .25s, box-shadow .25s; }
.fbn-btn:hover { transform: translateY(-2px); }
.fbn-btn-fb { background: #1877f2; }
.fbn-btn-line { background: #fff; color: #022c22 !important; border: 1.5px solid rgba(2, 44, 34, .14); }
.fbn-btn-line:hover { border-color: #d4af37; }
.fbn-empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: #5d6d67; }
.fbn-empty p { margin: 12px 0 16px; }

/* ---------- หน้า news/ ---------- */
.fbn-page { font-family: 'Sarabun', system-ui, sans-serif; background: #fbf8ef; color: #33433d; }
.fbn-page h1, .fbn-page h2, .fbn-page h3 { font-family: 'Kanit', sans-serif; color: #10231d; }
.fbn-hero { background: radial-gradient(1200px 400px at 85% -20%, rgba(212, 175, 55, .28), transparent 60%), linear-gradient(135deg, #011a14, #04382b 60%, #055a3c); color: #fff; padding: 46px 0 52px; }
.fbn-hero h1 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); margin: 8px 0 6px; }
.fbn-hero h1 em { font-style: normal; color: #f3d774; }
.fbn-hero p { margin: 0; color: rgba(255, 255, 255, .8); }
.fbn-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 .78rem 'Kanit', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #f3d774; background: rgba(212, 175, 55, .16); border: 1px solid rgba(212, 175, 55, .4); padding: 4px 13px; border-radius: 999px; }
.fbn-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.fbn-main { padding: 34px 0 72px; }
.fbn-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.fbn-search { position: relative; flex: 1 1 320px; max-width: 460px; }
.fbn-search input { width: 100%; min-height: 48px; border-radius: 14px; border: 1.5px solid rgba(2, 44, 34, .14); padding: 0 16px 0 44px; font: 1rem 'Sarabun', sans-serif; background: #fff; }
.fbn-search input:focus { outline: none; border-color: #d4af37; box-shadow: 0 0 0 4px rgba(212, 175, 55, .2); }
.fbn-search i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #5d6d67; }
.fbn-info { color: #5d6d67; font-size: .95rem; }
.fbn-loadmore { display: flex; justify-content: center; margin-top: 28px; }
.fbn-loadmore[hidden] { display: none; }

/* อ่านข่าว */
.fbn-art { max-width: 920px; margin: 0 auto; background: #fff; border-radius: 28px; padding: clamp(20px, 3vw, 40px); box-shadow: 0 2px 6px rgba(2, 44, 34, .06), 0 24px 48px -20px rgba(2, 44, 34, .25); }
.fbn-art-h h1 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); line-height: 1.35; margin: 6px 0 20px; overflow-wrap: anywhere; }
.fbn-art-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; font: 500 .9rem 'Kanit', sans-serif; color: #8a6a0c; }
.fbn-text { font-size: 1.07rem; line-height: 1.85; color: #33433d; overflow-wrap: anywhere; margin-top: 22px; }
.fbn-text a { color: #007f3d; }
.fbn-note { margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: #fff7e0; color: #6b5208; }
.fbn-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(2, 44, 34, .09); }
.fbn-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.fbn-pn a { display: block; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(2, 44, 34, .09); text-decoration: none; color: #10231d; font: 500 .95rem/1.45 'Kanit', sans-serif; overflow-wrap: anywhere; }
.fbn-pn a:hover { border-color: #d4af37; }
.fbn-pn small { display: block; color: #5d6d67; font-weight: 400; margin-bottom: 2px; }
.fbn-pn-next { text-align: right; }
.fbn-others { max-width: 1240px; margin: 48px auto 0; }
.fbn-others h2 { font-size: 1.4rem; margin-bottom: 16px; }

/* แกลเลอรี */
.fbn-gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px; border-radius: 18px; overflow: hidden; }
.fbn-ph { position: relative; display: block; padding: 0; border: 0; background: #eef3f0; aspect-ratio: 1; overflow: hidden; cursor: zoom-in; min-width: 0; }
.fbn-ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.fbn-ph:hover img { transform: scale(1.04); }
.fbn-gal .fbn-ph:first-child { grid-column: span 2; grid-row: span 2; }
.fbn-gal-1 { grid-template-columns: 1fr; grid-auto-rows: auto; }
.fbn-gal-1 .fbn-ph:first-child { grid-column: auto; grid-row: auto; aspect-ratio: auto; background: #011a14; }
.fbn-gal-1 .fbn-ph img { max-height: 78vh; object-fit: contain; margin: 0 auto; }
.fbn-gal-2 { grid-template-columns: 1fr 1fr; }
.fbn-gal-2 .fbn-ph:first-child { grid-column: auto; grid-row: auto; }
.fbn-ph-n { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(1, 26, 20, .62); color: #fff; font: 600 clamp(1.4rem, 1rem + 1.5vw, 2.2rem) 'Kanit', sans-serif; }
.fbn-ph-more { display: flex; flex-direction: column; align-items: center; justify-content: center; text-decoration: none; background: linear-gradient(135deg, #022c22, #055a3c); color: #fff; font: 600 1.6rem 'Kanit', sans-serif; cursor: pointer; text-align: center; }
.fbn-ph-more small { font: 400 .78rem 'Sarabun', sans-serif; opacity: .85; padding: 0 6px; }

/* ดูภาพขนาดใหญ่ */
.fbn-lb { position: fixed; inset: 0; z-index: 3000; background: rgba(1, 12, 9, .94); display: flex; align-items: center; justify-content: center; }
.fbn-lb img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.fbn-lb button { position: absolute; width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.25rem; cursor: pointer; }
.fbn-lb button:hover { background: rgba(255, 255, 255, .26); }
.fbn-lb-x { top: 16px; right: 16px; }
.fbn-lb-p { left: 14px; top: 50%; transform: translateY(-50%); }
.fbn-lb-n { right: 14px; top: 50%; transform: translateY(-50%); }
.fbn-lb-c { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: #fff; font: 500 .9rem 'Kanit', sans-serif; background: rgba(0, 0, 0, .4); padding: 3px 12px; border-radius: 999px; }

@media (max-width: 991px) {
  .fbn-grid, .fbn-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fbn-big .fbn-body { min-height: 360px; }
}
@media (max-width: 575px) {
  .fbn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .fbn-grid-3 { grid-template-columns: 1fr; gap: 16px; }
  .fbn-grid:not(.fbn-grid-3) .fbn-card:not(.fbn-big) .fbn-body { padding: 10px 12px 12px; gap: 4px; }
  .fbn-grid:not(.fbn-grid-3) .fbn-card:not(.fbn-big) .fbn-ex { display: none; }
  .fbn-grid:not(.fbn-grid-3) .fbn-card:not(.fbn-big) .fbn-title { font-size: .92rem; -webkit-line-clamp: 3; }
  .fbn-grid:not(.fbn-grid-3) .fbn-card:not(.fbn-big) time { font-size: .72rem; }
  .fbn-grid:not(.fbn-grid-3) .fbn-card:not(.fbn-big) .fbn-count { font-size: .7rem; padding: 2px 8px; right: 6px; bottom: 6px; }
  .fbn-grid:not(.fbn-grid-3) .fbn-card:not(.fbn-big) .fbn-vid { left: 6px; right: auto; }
  .fbn-big { grid-column: 1 / -1; grid-row: auto; }
  .fbn-big .fbn-body { min-height: 340px; padding: 20px; }
  .fbn-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .fbn-pn { grid-template-columns: 1fr; }
  .fbn-pn-next { text-align: left; }
  .fbn-lb-p, .fbn-lb-n { top: auto; bottom: 10px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fbn-card, .fbn-media > img, .fbn-ph img, .fbn-btn { transition: none; }
}
