/* ตัวเชื่อม: ใช้ layout/สไตล์ expat กับเนื้อหา economic (โหลดหลัง expat.css + styles.css) และปุ่มสลับ template ที่ footer ทุกแบบ */
body.ec-t1,body.ec-t2{font-family:'Anuphan','Noto Sans Thai','Leelawadee UI',Tahoma,system-ui,sans-serif;color:#082443}
body.tpl2.ec-t2{font-family:'Anuphan','Noto Sans Thai','Leelawadee UI',Tahoma,system-ui,sans-serif;font-size:15px;background:#fff}
/* ยกเลิกกฎ h1-h3 ของ expat (สี/ฟอนต์/line-height) ให้หัวข้อของ economic ได้ค่าเดิม (สืบทอดจากพื้นที่ที่ครอบอยู่) */
.ec-t1 h1,.ec-t1 h2,.ec-t1 h3,.ec-t2 h1,.ec-t2 h2,.ec-t2 h3{font-family:inherit;color:inherit;line-height:inherit}
.ec-t2 h1,.ec-t2 h2,.ec-t2 h3{font-weight:revert}
.ec-t1 .xp-main,.ec-t2 .xp-main{min-height:50vh}
.ec-t1 .xp-link,.ec-t2 .xp-link{font-family:inherit}
.tpl2.ec-t2 .xp-link{font-family:'Anuphan','Noto Sans Thai',Tahoma,sans-serif;font-size:14px;white-space:nowrap}

/* โลโก้ + ชื่อศูนย์ */
.ec-brand{display:inline-flex!important;align-items:center;letter-spacing:0!important;gap:10px!important;text-decoration:none;color:inherit;white-space:normal!important;font-size:inherit!important}
.ec-brand img{width:60px;height:60px;object-fit:contain;flex:none}
.ec-brand span{display:flex;flex-direction:column;line-height:1.25;text-align:left}
.ec-brand b{font-size:15px;font-weight:700;color:var(--navy)}
/* template 1: แถบเมนูพื้นเขียวเข้ม → ตัวอักษรขาว, ตรากรมีพื้นขาว, เมนูกระชับให้อยู่แถวเดียว */
.ec-t1 .ec-brand b{color:#fff;font-size:14px}
.ec-t1 .ec-brand{flex:none}
.ec-t1 .ec-brand b{letter-spacing:.04em;white-space:nowrap}
.ec-t1 .ec-brand small{color:#c6d3e2;font-size:10.5px;white-space:nowrap}
.ec-t1 .ec-brand img{background:#fff;border-radius:50%;padding:3px;width:60px;height:60px}
.ec-t1 .xp-bar{gap:12px}
.ec-t1 .xp-nav{margin-left:auto;gap:0;flex-wrap:nowrap}
.ec-t1 .xp-link{font-size:13px;padding:9px 8px;white-space:nowrap;border-radius:6px}
.ec-t1 .xp-search input{width:96px;padding:6px 12px}
.ec-brand small{font-size:11px;font-weight:500;color:#62768b;letter-spacing:0;text-transform:none}
.ec-foot-logo{width:56px;height:auto;margin-bottom:10px;background:#fff;border-radius:50%;padding:3px}

/* สถิติการเข้าชมใน footer */
.ec-visit-h{margin-top:18px!important}
.ec-visit{display:grid;grid-template-columns:auto 1fr;gap:2px 14px;margin:0;font-size:13px}
.ec-visit dt{opacity:.8}
.ec-visit dd{margin:0;text-align:right;font-variant-numeric:tabular-nums;color:#fff}
.xp-foot,.x2-foot{font-size:14px}

/* ปุ่มสลับ template ที่ footer (template 3 = footer เดิมของ economic ก็ใช้ชุดเดียวกัน) */
.xp-tplsw{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;flex-wrap:wrap}
.xp-tplsw span{opacity:.7;margin-right:2px}
.xp-tplsw a{display:inline-block!important;padding:4px 11px!important;border:1px solid rgba(255,255,255,.35);border-radius:99px;color:#fff!important;text-decoration:none}
.xp-tplsw a:hover{background:rgba(255,255,255,.15)}
.xp-tplsw a.on{background:#fff;color:#004f2e!important;border-color:#fff;font-weight:600}
.site-footer .copyright{display:flex;flex-wrap:wrap;gap:10px 16px;justify-content:space-between;align-items:center;padding-bottom:12px}

@media(max-width:900px){.ec-brand b{font-size:13px}.ec-brand small{display:none}.x2-right{display:none}.x2-search{max-width:none}}

/* header ของ template 1/2 เป็นแบบ sticky → sidebar ติดใต้ header + anchor (#pr, #article) ไม่ถูกบัง */
.ec-t1 .analysis-sidebar,.ec-t1 .work-sidebar,.ec-t1 .about-sidebar,.ec-t1 .contact-sidebar{top:88px}
.ec-t2 .analysis-sidebar,.ec-t2 .work-sidebar,.ec-t2 .about-sidebar,.ec-t2 .contact-sidebar{top:140px}
html:has(.ec-t1){scroll-padding-top:84px}
html:has(.ec-t2){scroll-padding-top:136px}
@media(max-width:860px){.ec-t1 .analysis-sidebar,.ec-t1 .work-sidebar,.ec-t2 .analysis-sidebar,.ec-t2 .work-sidebar{position:static}}

/* โลโก้ + ชื่อศูนย์ฯ ชุดเดียวกันทุก template (ตามหัวเว็บ template 2) */
.brand.ec-brand3{gap:10px}
.brand.ec-brand3 img{width:60px;height:60px;object-fit:contain}
.brand.ec-brand3 span{display:flex;flex-direction:column;line-height:1.25}
.brand.ec-brand3 b{font-size:16px;font-weight:700;color:#004f2e;line-height:1.3}
.brand.ec-brand3 small{font-size:11.5px;font-weight:500;color:#62768b}
@media(max-width:900px){.brand.ec-brand3 img{width:46px;height:46px}.brand.ec-brand3 b{font-size:13px}.brand.ec-brand3 small{display:none}}

/* ปุ่มสลับภาษา TH | EN (header ทุก template) */
.ec-lang{display:inline-flex;align-items:center;border:1px solid #b9c9c0;border-radius:99px;overflow:hidden;font-size:12.5px;font-weight:600;line-height:1;background:#fff;flex:none}
.ec-lang a{display:inline-block!important;padding:7px 11px!important;color:#004f2e!important;text-decoration:none!important;background:transparent}
.ec-lang a:hover{background:#eaf4ee}
.ec-lang a.on{background:#004f2e;color:#fff!important}
.x2-right .ec-lang{margin-right:6px}
.xp-nav .ec-lang{margin:0 8px}
.masthead__actions .ec-lang{margin-right:8px}
@media(max-width:900px){.x2-right{display:flex!important}.x2-right>a{display:none}.x2-right .ec-lang{margin:0}}
html[lang=en] body{font-family:"Anuphan","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif}
