@charset "utf-8";
/* ====================================================================
   Responsive สำหรับดีไซน์เดิม (gambling.css)
   - จอกว้าง 980px ขึ้นไป: หน้าตาเหมือนเดิมทุกอย่าง (ไฟล์นี้ไม่มีผล)
   - แท็บเล็ต / มือถือ: ยืดตามจอ, คอลัมน์เรียงลงล่าง, เมนูพับเก็บได้
   ==================================================================== */

.nav-toggle { display: none; }
.mn-txt { display: none; } /* ตัวหนังสือเมนู: ใช้เฉพาะมือถือ/แท็บเล็ต (จอคอมพิวเตอร์ใช้รูปเมนูเดิม) */

@media (max-width: 980px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 14px; line-height: 1.6; }

  /* ---------- กรอบหลัก ---------- */
  #Header, #Container, #Footer, #Top { width: auto !important; margin-left: 0; margin-right: 0; padding-left: 14px; padding-right: 14px; box-sizing: border-box; }
  #Container { margin-bottom: 30px; }
  img, iframe, video, embed, object { max-width: 100% !important; }
  img { height: auto; }
  .DetailNews img, .DetailRecom img, .issusedetail img { height: auto !important; }
  .DetailNews iframe, .DetailRecom iframe, .issusedetail iframe { width: 100% !important; aspect-ratio: 16 / 9; height: auto !important; }
  .DetailNews table, .DetailRecom table, .issusedetail table { display: block; overflow-x: auto; max-width: 100%; }

  /* ---------- ส่วนหัว ---------- */
  #Header { position: relative; padding-top: 6px; }
  .Logo { width: auto; float: none; margin: 0; }
  .Logo img { width: 104px; margin-top: 4px !important; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; position: absolute; right: 14px; top: 26px; background: #0070b4; color: #fff; border: 0; border-radius: 4px; padding: 8px 14px; font: bold 15px Tahoma, sans-serif; cursor: pointer; }
  .nav-toggle .bar, .nav-toggle .bar::before, .nav-toggle .bar::after { content: ''; display: block; width: 18px; height: 2px; background: #fff; position: relative; }
  .nav-toggle .bar::before { position: absolute; top: -6px; }
  .nav-toggle .bar::after { position: absolute; top: 6px; }
  .HeadRight { float: none; width: auto; display: none; padding: 6px 0 4px; }
  #Header.nav-open .HeadRight { display: block; clear: both; border-top: 3px solid #0070b4; margin-top: 12px; padding-top: 10px; }
  .BoxSearch { float: none !important; width: auto !important; text-align: left; }
  .BoxSearch { padding: 10px !important; }
  .BoxSearch table, .BoxSearch tbody, .BoxSearch tr { display: block; width: 100%; }
  .BoxSearch td { display: inline-block; padding: 3px 4px 3px 0 !important; vertical-align: middle; }
  .BoxSearch td:first-child { display: none; }
  .txt_box, .list_box { width: 100%; box-sizing: border-box; font-size: 16px; }
  .BoxSearch td:nth-child(2), .BoxSearch td:nth-child(3) { width: 100%; }
  /* เมนู: แสดงเป็นตัวหนังสือแทนรูป (รูปเมนูทำไว้สำหรับจอคอมพิวเตอร์ มีเส้นคั่น / ขอบตัด อยู่ในรูป) */
  .MnTop a img, ul.Mn a img { display: none !important; }
  .mn-txt { display: inline; }
  .MnTop { width: auto !important; float: none !important; margin: 0 !important; text-align: left; }
  .MnTop ul { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; }
  .MnTop ul li { display: block; margin: 0 !important; }
  .MnTop ul li a { display: block; padding: 8px 9px; font: 14px Tahoma, sans-serif; color: #555; text-decoration: none; }
  .MnTop ul li + li a { border-left: 1px solid #ccc; }
  .MnTop ul li:last-child { margin-left: auto !important; display: flex; align-items: center; gap: 6px; padding: 4px; }
  .MnTop ul li:last-child a { padding: 0; border: 0; }
  .MnTop ul li:last-child img { display: inline !important; margin: 0 !important; }
  ul.Mn { margin: 8px 0 0 !important; padding: 0; display: flex; flex-direction: column; align-items: stretch; float: none !important; width: 100%; border-top: 1px solid #d6d6d6; }
  ul.Mn li { float: none !important; margin: 0 !important; padding: 0 !important; border-bottom: 1px solid #e6e6e6; background: none !important; list-style: none; }
  ul.Mn li a { display: flex !important; justify-content: space-between; align-items: center; padding: 14px 6px; font: bold 17px Tahoma, sans-serif; color: #0070b4; text-decoration: none; background: none !important; }
  ul.Mn li a::after { content: '\203A'; font-size: 24px; line-height: 1; color: #999; }
  .LineHead { margin-top: 8px; }

  /* ---------- แบนเนอร์หัวหน้า ---------- */
  #ImageHeader, #BannerHeader { width: auto !important; float: none !important; margin: 0 0 8px 0 !important; }
  #ImageHeader img, #BannerHeader img { width: 100%; }

  /* ---------- คอลัมน์ทั้งหมด: เรียงลงล่าง ---------- */
  #MainTopic, #MainTopic_inner, .TopicLeft, .TopicRight, #ColLeftIndex, #ColRightIndex,
  .conleft, .conleft_big, .conleft_big span, .conright, #ColNewsDetail, #ColNewsOther, .ColNewsOther_left, .boxmn,
  .BoxReser, .BoxReser_right, .detailreser, .ColForm, .ColForm_bg, .ColForm_bg span, .Search_result, .Listload,
  .tags, ul.tags, .BoxLeft, .BoxNewsInner, .BoxNewsIndex, .BoxFb, .Titlebar, .Titlebar_left, .Titlebar_inner,
  .BoxLastIssuse, .PopupMap, .PopupMap_head, .PopupMap_map, #LastIssuseIndex {
    width: auto !important; float: none !important; height: auto !important; min-height: 0 !important; box-sizing: border-box;
  }
  .Titlebar, .Titlebar_left, .Titlebar_inner { display: block; }
  #ColLeftIndex, #ColNewsDetail { margin: 14px 0 0 0 !important; }
  #ColNewsOther, .boxmn { margin-top: 16px !important; }
  .conleft { margin: 0 0 14px 0; }
  .BoxNewsInner { border-right: 0 !important; margin-right: 0 !important; padding-right: 0 !important; border-bottom: 1px dotted #d6d6d6; }
  .BoxFb iframe { width: 100% !important; height: 420px !important; }
  #Tabtitle { height: auto !important; background-size: auto 100%; padding: 0 0 0 10px !important; margin-bottom: 16px !important; overflow: hidden; }
  #Tabtitle h1, #Tabtitle h2, #Tabtitle .tab-h1 { width: auto !important; float: none !important; }
  #Tabtitle + div[style*="margin:-25px"], #NewsInner { margin-top: 0 !important; }
  #Tabtitle ul.Submn { float: none !important; display: flex !important; flex-wrap: wrap; margin: 0 0 0 -10px !important; padding: 0 !important; }
  #Tabtitle ul.Submn li { float: none !important; display: block !important; margin: 0 !important; }
  #Tabtitle ul.Submn li img { height: 38px !important; width: auto !important; display: block; }
  #Tabtitle h1 img, #Tabtitle .tab-h1 img { max-width: 70%; }

  /* หน้าแรก: แคมเปญหลักภาพใหญ่ให้เต็มความกว้าง (รูปจริงกว้าง 628 px แท็บเล็ตเลยไม่เต็มจอ) */
  #MainTopic .TopicLeft img { width: 100% !important; height: auto !important; display: block; }

  /* หน้าแรก: คอลัมน์ซ้าย (ประกาศ / Facebook / แบนเนอร์) ไปไว้ล่างสุด ต่อจากเนื้อหาคอลัมน์ขวา (ลูกค้าขอ 30 พ.ย. 2026) */
  #Container:has(> #ColLeftIndex) { display: flex; flex-direction: column; }
  #Container:has(> #ColLeftIndex) > * { order: 1; }
  #Container > #ColRightIndex { order: 2; }
  #Container > #ColLeftIndex { order: 3; margin: 24px 0 0 0 !important; }
  #Container:has(> #ColLeftIndex) > .clear { order: 4; }

  /* ---------- ข่าว / ประเด็น / สาระ ---------- */
  .BoxMianTopic { margin: 0 !important; }
  .BoxMianTopic p.headtopic { width: auto !important; float: none; overflow: hidden; }
  .BoxLastIssuseIndex { width: calc(50% - 12px) !important; margin: 0 12px 16px 0 !important; padding: 0 !important; border: 0 !important; }
  .BoxLastIssuseIndex img { width: 100% !important; }
  .BoxLastIssuse { margin: 0 0 16px 0 !important; padding: 0 !important; border-right: 0 !important; }
  ul#BoxLeaflet li { width: 33.33% !important; box-sizing: border-box; padding: 0 4px; }
  ul.vdo li { width: calc(50% - 10px) !important; border-right: 0 !important; }
  ul.vdo li img { width: 100% !important; }
  .imgNewsAll { width: 120px !important; }
  .imgRecom { width: 40% !important; margin-right: 12px !important; }
  .boxlink a { width: auto !important; height: auto !important; float: none !important; margin: 0 0 10px !important; }
  .imgreser { width: 90px !important; }
  .Page, .paging { width: auto !important; }
  ul.NewsAll li { margin-right: 0; padding-right: 0; }
  .txtbox, .txtbox_im, .txtbox_meet { width: 100% !important; box-sizing: border-box; }

  /* สไลด์หน้าแรก (ความสูงคำนวณใน index.php) */
  .slide-wrap { height: auto !important; margin: 10px 0 14px !important; }
  .folio_block { position: relative !important; height: auto !important; }
  .main_view { float: none !important; width: 100% !important; }
  .window { width: 100% !important; overflow: hidden; }
  .image_reel img { box-sizing: border-box; max-width: none !important; }
  .paging { display: none !important; }
  #ColLeftIndex a > img { width: 100%; }
  .Titlebar img, .Titlebar_left img, .Titlebar_inner img { width: auto !important; max-width: 100%; }

  /* ---------- หน้าเนื้อหา / ติดต่อ / รายการทั้งหมด ---------- */
  .page-body { width: auto !important; }
  .page-body > div, .page-body p, .page-body h2 { max-width: 100%; }
  .brifSectionNews { width: auto !important; float: none !important; height: auto !important; overflow: hidden; }
  .imgSectionNews { float: left; margin-right: 10px; }
  .ColAddress { display: block !important; width: auto !important; margin: 10px 0 !important; }
  .ColAddress .text, .ColMap { width: auto !important; }
  .ColMap ul { flex-wrap: wrap; gap: 10px; }
  .ColMap ul li + li { margin-left: 0 !important; }
  .ColMap ul li, .viewport_map { max-width: 100%; }
  .viewport_map img { width: 100% !important; height: auto !important; }

  /* ---------- ส่วนท้าย ---------- */
  #Footer .boxfooter { width: auto !important; float: none !important; border-right: 0 !important; height: auto !important; padding: 10px 0 !important; margin: 0 !important; border-bottom: 1px solid #e6e6e6; }
  ul.Mnbtm { padding: 0; text-align: center; }
  ul.Mnbtm li { display: inline-block; float: none !important; margin: 3px 4px !important; }
  #Top { text-align: right; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .BoxLastIssuseIndex { width: 100% !important; margin-right: 0 !important; }
  ul#BoxLeaflet li { width: 50% !important; }
  .imgRecom, .imgNewsAll { width: 100% !important; float: none !important; margin: 0 0 10px !important; }
  .imgreser { float: none !important; margin: 0 0 8px !important; }
  #Tabtitle ul, #Tabtitle .submenu, #Tabtitle .MnSub { float: none !important; }
}
