/* =========================================================================
   MUGR Font v2 — ตามคู่มืออัตลักษณ์มหาวิทยาลัยมหิดล + ความอ่านง่าย
     หัวข้อใหญ่ (h1/h2, แบนเนอร์): DB Helvethaica X (ตัวอักษรอัตลักษณ์ มหาวิทยาลัยมหิดล)
     หัวข้อย่อย เมนู ปุ่ม:          Noto Sans Thai
     เนื้อหา:                       Sarabun
   โหลดท้ายสุดจาก metaTag.php เฉพาะเมื่อเปิดใช้ (ดูเงื่อนไขใน metaTag.php)
   ฟอนต์ทั้งสองเป็น SIL Open Font License — เก็บบนเซิร์ฟเวอร์ของเราเอง ไม่เรียก Google
   ไฟล์: /assets61/fonts/mugr-v2/  (ตัดเหลือเฉพาะอักษรไทย อังกฤษ ตัวเลข เครื่องหมาย)
   ========================================================================= */
/* ขนาดและระยะบรรทัดเทียบฟอนต์เดิม (size-adjust / *-override) เพื่อไม่ให้ตำแหน่งบนหน้าขยับ:
   - MUGR Sarabun: Sarabun แคบกว่า dtac2013 ราว 4% → ขยาย 104%; ระยะบรรทัดเท่า dtac2013 (1.17 / 0.32 / 0.35 em)
   - MUGR Noto Sans Thai: ขนาดเท่าเดิม; ระยะบรรทัดเท่า dtac2013
   - MUGR DBH: DB Helvethaica X ขนาดจริง สำหรับหัวข้อแบนเนอร์ที่เดิมใช้ฟอนต์นี้อยู่แล้ว (หน้าตาเหมือนเดิมทุกอย่าง)
   - MUGR DBH Head: DB Helvethaica X สำหรับ h1/h2 ที่เดิมเป็น dtac2013 — ฟอนต์นี้ตัวเล็กและแคบ จึงขยาย 148%
     ให้ความกว้างและความสูงตัวอักษรเท่าเดิม ระยะบรรทัดเท่า dtac2013
   มีไฟล์ Medium (500) ไฟล์เดียว: ใช้กับทุกน้ำหนัก ไม่ให้เบราว์เซอร์ทำตัวหนาปลอม; ระยะบรรทัดเท่า DB Helvethaica X
   ค่า override หารด้วย size-adjust แล้ว (เบราว์เซอร์คูณ size-adjust ให้อีกที) */
@font-face{font-family:"MUGR Sarabun";src:url("../fonts/mugr-v2/sarabun-400.woff") format("woff");font-weight:400;font-style:normal;font-display:swap;size-adjust:104%;ascent-override:112.5%;descent-override:30.77%;line-gap-override:33.65%;}
@font-face{font-family:"MUGR Sarabun";src:url("../fonts/mugr-v2/sarabun-400i.woff") format("woff");font-weight:400;font-style:italic;font-display:swap;size-adjust:104%;ascent-override:112.5%;descent-override:30.77%;line-gap-override:33.65%;}
@font-face{font-family:"MUGR Sarabun";src:url("../fonts/mugr-v2/sarabun-600.woff") format("woff");font-weight:500 600;font-style:normal;font-display:swap;size-adjust:104%;ascent-override:112.5%;descent-override:30.77%;line-gap-override:33.65%;}
@font-face{font-family:"MUGR Sarabun";src:url("../fonts/mugr-v2/sarabun-700.woff") format("woff");font-weight:700 900;font-style:normal;font-display:swap;size-adjust:104%;ascent-override:112.5%;descent-override:30.77%;line-gap-override:33.65%;}
/* ฟอนต์เดิมของเมนู/ปุ่ม (dtac2013_bl) เป็นตัวหนักกว่าปกติ จึงเลื่อนน้ำหนัก Noto ขึ้นหนึ่งขั้น: ปกติ→Medium, 500→SemiBold, 600+→Bold */
@font-face{font-family:"MUGR Noto Sans Thai";src:url("../fonts/mugr-v2/noto-sans-thai-500.woff") format("woff");font-weight:100 400;font-style:normal;font-display:swap;ascent-override:117%;descent-override:32%;line-gap-override:35%;}
@font-face{font-family:"MUGR Noto Sans Thai";src:url("../fonts/mugr-v2/noto-sans-thai-600.woff") format("woff");font-weight:500;font-style:normal;font-display:swap;ascent-override:117%;descent-override:32%;line-gap-override:35%;}
@font-face{font-family:"MUGR Noto Sans Thai";src:url("../fonts/mugr-v2/noto-sans-thai-700.woff") format("woff");font-weight:600 900;font-style:normal;font-display:swap;ascent-override:117%;descent-override:32%;line-gap-override:35%;}
@font-face{font-family:"MUGR DBH";src:url("../fonts/DB-Helvethaica-X-Med-v3.2.ttf?v=20260921") format("truetype");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"MUGR DBH Head";src:url("../fonts/DB-Helvethaica-X-Med-v3.2.ttf?v=20260921") format("truetype");font-weight:100 900;font-style:normal;font-display:swap;size-adjust:148%;ascent-override:79.05%;descent-override:21.62%;line-gap-override:23.65%}


:root{
  --mugr-font-display:"MUGR DBH","DB Helvethaica X","MUGR Noto Sans Thai",Tahoma,sans-serif;
  --mugr-font-title:"MUGR DBH Head","MUGR Noto Sans Thai","Noto Sans Thai",Tahoma,sans-serif;
  --mugr-font-body:"MUGR Sarabun","Sarabun",Tahoma,"Leelawadee UI","Noto Sans Thai",sans-serif;
  --mugr-font-head:"MUGR Noto Sans Thai","Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;
}

/* ---------- 1) ทุกข้อความ = Sarabun (ไม่แตะฟอนต์ไอคอน) ---------- */
html body,
html body :where(p,li,dd,dt,td,th,caption,blockquote,figcaption,address,label,legend,small,strong,b,em,i,u,span,div,a,input,textarea,select,option,section,article,aside,main,footer):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons){
  font-family:var(--mugr-font-body)!important;
}
html body{font-family:var(--mugr-font-body)!important}

/* ---------- 2) หัวข้อ เมนู ปุ่ม แถบหัวเว็บ = Noto Sans Thai ---------- */
html body :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,button,.btn,[role="button"],[role="tab"],nav,.header,.mugr-mnav32,.mugr-header-search-v6,[class*="title"],[class*="heading"],[class*="__head"],[class*="-head"],.nav,.navbar,.dropdown-menu,.badge,.mugr-ac,.mugr-tour):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons),
html body :is(h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6,button,.btn,[role="button"],[role="tab"],nav,.header,.mugr-mnav32,.mugr-header-search-v6,[class*="title"],[class*="heading"],[class*="__head"],[class*="-head"],.nav,.navbar,.dropdown-menu,.badge,.mugr-ac,.mugr-tour) *:not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons){
  font-family:var(--mugr-font-head)!important;
}
/* หัวข้อใหญ่ h1/h2 = DB Helvethaica X (ขยายให้ขนาดเท่าเดิม) */
html body :is(h1,h2,.h1,.h2):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons):not(#x),
html body :is(h1,h2,.h1,.h2) *:not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons):not(#x){
  font-family:var(--mugr-font-title)!important;font-synthesis:none;
}
/* ข้อความรายละเอียดในหน้าต่างค้นหา/การ์ดแนะนำ กลับเป็น Sarabun ให้อ่านง่าย */
html body .mugr-ac :is(.mugr-ac__item-meta,.mugr-ac__answer-sub,.mugr-ac__item-title):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons):not(#x),html body .mugr-tour .mugr-tour__list li:not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons):not(#x){font-family:var(--mugr-font-body)!important}

/* ---------- 3) ความอ่านง่ายของเนื้อหายาว ---------- */
html body :is(article,.content,#panel) :is(p,li){line-height:1.75}

/* ---------- 4) ข้อความที่เดิมใช้ DB Helvethaica X อยู่แล้ว (หัวข้อแบนเนอร์) — คงขนาดจริงของฟอนต์ ---------- */
html body :is(
  .mugr-v11-slide-title,#mugrGraduation h1,
  .mugr-admission-copy-v70 h2,.mugr-admission-copy-v70 h3,.mugr-admission-main2570 h2,.mugr-admission-panel2570 h3,.mugr-admission-action-v70,
  .mugr-home-admission__card h2,.mugr-home-admission__apply,
  .mugr-admission-center-card h2,.mugr-admission-center-card__panel-action,
  #mugr-admission-2570-details .mugr-gsi-v3__shortcuts strong,.mugr-gsi-contact__title,.mugr-contact-heading,
  .mugr-gsi-v3__admission h2,.mugr-gsi-v3__admission .mugr-gsi-v3__panel h3,.mugr-gsi-v3__admission .mugr-gsi-v3__actions a
):not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons):not(#x):not(#y),
html body :is(
  .mugr-v11-slide-title,#mugrGraduation h1,
  .mugr-admission-copy-v70 h2,.mugr-admission-copy-v70 h3,.mugr-admission-main2570 h2,.mugr-admission-panel2570 h3,.mugr-admission-action-v70,
  .mugr-home-admission__card h2,.mugr-home-admission__apply,
  .mugr-admission-center-card h2,.mugr-admission-center-card__panel-action,
  #mugr-admission-2570-details .mugr-gsi-v3__shortcuts strong,.mugr-gsi-contact__title,.mugr-contact-heading,
  .mugr-gsi-v3__admission h2,.mugr-gsi-v3__admission .mugr-gsi-v3__panel h3,.mugr-gsi-v3__admission .mugr-gsi-v3__actions a
) *:not(.fa):not([class^="fa-"]):not([class*=" fa-"]):not([class*="icon"]):not([class*="flaticon"]):not(.ti):not([class^="ti-"]):not([class*=" ti-"]):not(.glyphicon):not(.material-icons):not(#x):not(#y){font-family:var(--mugr-font-display)!important;font-synthesis:none}

/* ---------- 5) เมนูหลักแถวบน (ผู้สนใจเข้าศึกษา – เกี่ยวกับเรา) ----------
   จอกว้าง ≥1440px: 18px | 1366–1439px: 17px | ต่ำกว่านั้นคง 16px (ไม่งั้นปุ่มระบบสารสนเทศตกแถว)
   1200–1279px: ลดช่องว่างของ "ติดต่อเรา" "ร้องเรียนการทุจริต" ลงเล็กน้อย
   1200–1365px: ปุ่ม "ระบบสารสนเทศ" แสดงเฉพาะไอคอน (ข้อความยังอยู่ให้โปรแกรมอ่านหน้าจอ) — เดิมปุ่มนี้ตกลงไปทับแถวล่าง
   ต่ำกว่า 1200px เว็บใช้เมนูมือถือ ไม่เกี่ยวกับส่วนนี้ */
@media (min-width:1440px){
  html body .top.header-logo .box-link a.list-link:not(.mugr-static-nav-link):not(#x):not(#y):not(#z){font-size:18px!important}
}
@media (min-width:1366px) and (max-width:1439.98px){
  html body .top.header-logo .box-link a.list-link:not(.mugr-static-nav-link):not(#x):not(#y):not(#z){font-size:17px!important}
}
@media (min-width:1200px) and (max-width:1365.98px){
  html body .top.header-logo .box-member .text-signin:not(#x):not(#y){font-size:0!important;padding-left:10px!important;padding-right:10px!important}
  html body .top.header-logo .box-member .text-signin .material-icons:not(#x):not(#y){font-size:20px!important;margin:0!important}
}
@media (min-width:1200px) and (max-width:1279.98px){
  html body .top.header-logo .box-link a.list-link.mugr-static-nav-link:not(#x):not(#y){padding-left:5px!important;padding-right:5px!important}
}

/* ---------- 6) เมนูย่อย (Mega Menu) ใหญ่ขึ้น 1 ขั้น ----------
   น้ำหนักปกติ (400) แสดงเป็น Noto Sans Thai Medium ตามข้อ 1 จึงหนาขึ้นจากเดิมแล้ว */
@media (min-width:1400px){
  html body .mugr-nav2-panel .mugr-nav2-links a:not(#x):not(#y){font-size:15px!important}
  html body .mugr-nav2-panel--alumni .mugr-nav2-group--alumni-opportunities .mugr-nav2-links a:not(#x):not(#y){font-size:14.5px!important}
}
@media (min-width:992px) and (max-width:1399.98px){
  html body .mugr-nav2-panel .mugr-nav2-links a:not(#x):not(#y){font-size:13.5px!important}
  html body :is(.mugr-nav2-panel--current,.mugr-nav2-panel--staff) .mugr-nav2-links a:not(#x):not(#y){font-size:13px!important}
}
