/* ===================================================================
   หน้ารายการ: ข่าวทั้งหมด (welcome/news_all) และ ภาพกิจกรรมทั้งหมด (welcome/event_all)
   ทุกคลาสขึ้นต้น ls-   ใช้ร่วมกับ home-v2.css (hm-page / hm-sec / hm-w / hm-chip / hm-btn)
   หมายเหตุ: .hm-page * ถูกตั้งเป็น content-box จึงต้องกำหนด border-box ให้ส่วนของเราเอง
   =================================================================== */
.ls-crumb,.ls-crumb *,.ls-tabs,.ls-tabs *,.ls-bar,.ls-bar *,.ls-table,.ls-table *,
.ls-grid,.ls-grid *,.ls-foot,.ls-foot *,.ls-empty{box-sizing:border-box}

/* ---------- หัวหน้า ---------- */
.ls-crumb{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px;font-size:14px;color:#6b5a5f}
.hm-page .ls-crumb a{color:#8f1230;font-weight:600}
.ls-title{margin:0 0 16px;text-align:center;font-size:clamp(24px,3vw,32px);font-weight:700;line-height:1.3;color:#3a0f1a}
.ls-title .fa{color:#b3173d;margin-right:6px}

/* ---------- แท็บประเภทข่าว ---------- */
.ls-tabs{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 0 16px}
.hm-page a.ls-tab{display:inline-block;padding:6px 16px;font-size:14px;font-weight:500;color:#6b2a3b;background:#fff;border:1px solid #f0d5dc;border-radius:99px;text-decoration:none}
.hm-page a.ls-tab:hover{border-color:#e9b8c4;background:#fbeff2;text-decoration:none}
.hm-page a.ls-tab.is-on{color:#fff;background:#b3173d;border-color:#b3173d}

/* ---------- แถบเครื่องมือ (แสดง n รายการ / ค้นหา) ---------- */
.ls-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:0 0 14px;font-size:14px;color:#4a2a33}
.ls-bar-card{padding:12px;background:#fff;border:1px solid #f0d5dc;border-radius:14px;margin-bottom:20px}
.ls-per{display:flex;align-items:center;gap:8px;margin:0;font-weight:400}
.ls-per select{margin:0;padding:7px 10px;font:inherit;font-size:14px;color:#2a1a1e;background:#fff;border:1px solid #e9b8c4;border-radius:8px}
.ls-total{color:#6b5a5f}
.ls-search{display:flex;margin-left:auto;min-width:0}
.ls-search.ls-grow{flex:1 1 260px;margin-left:0}
.ls-search input[type=search]{flex:1 1 auto;width:240px;min-width:0;margin:0;padding:8px 12px;font:inherit;font-size:14px;color:#2a1a1e;background:#fff;border:1px solid #e9b8c4;border-right:0;border-radius:8px 0 0 8px;-webkit-appearance:none;appearance:none}
.ls-search.ls-grow input[type=search]{width:auto}
.ls-search input[type=search]:focus{outline:2px solid #b3173d;outline-offset:-2px}
.ls-search button{flex:none;margin:0;padding:8px 14px;font:inherit;font-size:14px;color:#fff;background:#b3173d;border:1px solid #b3173d;border-radius:0 8px 8px 0;cursor:pointer}
.ls-search button:hover{background:#8f1230}

/* ---------- ตารางข่าว ---------- */
.ls-table{overflow:hidden;background:#fff;border:1px solid #f0d5dc;border-radius:14px}
.ls-row{display:grid;grid-template-columns:56px minmax(0,1fr) 130px;gap:14px;align-items:center;padding:14px 18px;border-top:1px solid #f4e3e8;font-size:15px}
.ls-row:hover:not(.ls-head){background:#fdf6f8}
.ls-head{font-weight:700;color:#6b5a5f;background:#fbeff2;border-top:0;font-size:14px}
.ls-no{color:#6b5a5f;font-weight:600}
.ls-name{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;min-width:0}
.hm-page a.ls-link{flex:0 1 auto;min-width:0;color:#2a1a1e;font-weight:500;line-height:1.5;text-decoration:none;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hm-page a.ls-link:hover{color:#b3173d;text-decoration:underline}
.ls-views{flex:none;font-size:13px;color:#6b5a5f;white-space:nowrap}
.ls-views .fa{color:#8f1230}
.ls-type{flex:0 0 100%;font-size:12px;color:#8a7a80}
.ls-new{flex:none;display:inline-block;padding:1px 8px;font-size:11px;font-weight:700;line-height:1.5;color:#fff;background:#e11d48;border-radius:5px}
.ls-date{text-align:right;color:#b3173d;font-weight:600;font-size:14px;white-space:nowrap}
.ls-head .ls-date{color:#6b5a5f}

/* ---------- การ์ดกิจกรรม ---------- */
.ls-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:20px}
.ls-card{display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid #f0d5dc;border-radius:14px;transition:box-shadow .15s,border-color .15s,transform .15s}
.ls-card:hover{border-color:#e9b8c4;box-shadow:0 8px 22px rgba(58,15,26,.1);transform:translateY(-2px)}
.ls-thumb{position:relative;display:block;aspect-ratio:4/3;background:#f6e4e9;overflow:hidden}
.ls-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.ls-count{position:absolute;right:8px;bottom:8px;padding:2px 9px;font-size:12px;font-weight:600;color:#fff;background:rgba(58,15,26,.72);border-radius:99px}
.ls-cbody{display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:8px;padding:14px}
.ls-ctitle{margin:0;font-size:15px;font-weight:600;line-height:1.5}
.hm-page .ls-ctitle a{color:#2a1a1e;text-decoration:none;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.hm-page .ls-ctitle a:hover{color:#b3173d;text-decoration:underline}
.ls-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin-top:auto;font-size:12.5px;color:#6b5a5f}
.ls-meta .fa{color:#8f1230;margin-right:2px}

/* ---------- ไม่พบข้อมูล ---------- */
.ls-empty{padding:44px 10px;text-align:center;color:#6b5a5f;background:#fff;border:1px solid #f0d5dc;border-radius:14px}
.ls-empty .fa{display:block;margin-bottom:8px;font-size:44px;color:#e9b8c4}
.ls-empty p{margin:0 0 14px;font-size:16px}

/* ---------- แบ่งหน้า ---------- */
.ls-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 0;font-size:14px;color:#6b5a5f}
.ls-pager{display:flex;flex-wrap:wrap;gap:6px}
.hm-page a.ls-pg,.ls-pg{display:inline-block;min-width:38px;padding:7px 12px;text-align:center;font-weight:600;color:#8f1230;background:#fff;border:1px solid #e9b8c4;border-radius:8px;text-decoration:none}
.hm-page a.ls-pg:hover{background:#fbeff2;text-decoration:none}
.ls-pg.is-on{color:#fff;background:#3a0f1a;border-color:#3a0f1a}
.ls-pg.is-off{color:#b9a6ab;border-color:#f0d5dc;background:#fdf8f9}
.ls-pg.is-gap{border-color:transparent;background:transparent;color:#6b5a5f;min-width:0;padding-left:4px;padding-right:4px}

/* ---------- มือถือ / แท็บเล็ต ---------- */
@media (max-width:767px){
  .ls-head{display:none}
  .ls-row{grid-template-columns:34px minmax(0,1fr);gap:4px 10px;padding:12px 14px;align-items:start}
  .ls-date{grid-column:2;text-align:left;font-size:13px}
  .ls-search{flex:1 1 100%;margin-left:0}
  .ls-search input[type=search]{width:auto}
  .ls-total{margin-left:auto}
  .ls-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .ls-cbody{padding:10px}
  .ls-ctitle{font-size:14px}
  .ls-foot{justify-content:center}
}
@media (max-width:340px){
  .ls-grid{grid-template-columns:1fr}
}
