/* ตัวเชื่อม: ใช้ 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}}

/* ===== backend: แถบเจ้าหน้าที่ + หน้าเข้าสู่ระบบ (guest) ===== */
.be-bar{background:#0b2f1f;color:#cfe9da;font-size:12.5px}
.be-bar__in{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;width:min(100% - 40px,1396px);margin:0 auto;padding:6px 0}
.be-bar__tag{padding:2px 10px;border-radius:999px;background:#d4a537;color:#2b1d00;font-weight:800;letter-spacing:.04em;font-size:11.5px}
.be-bar__user{flex:1}
.be-bar__user b{color:#fff}
.be-bar__out{margin:0}
.be-bar__out button{padding:4px 14px;border:1px solid rgba(255,255,255,.4);border-radius:999px;background:transparent;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.be-bar__out button:hover{background:rgba(255,255,255,.16)}
body.be-guest{background:linear-gradient(160deg,#f0faf4 0%,#e3f3ea 55%,#d6ecdf 100%);min-height:100vh}
.be-guest__main{width:min(100% - 32px,520px);margin:0 auto;padding:40px 0 48px}
.be-guest__brand{display:flex;align-items:center;gap:14px;margin-bottom:22px;color:inherit;text-decoration:none}
.be-guest__brand img{width:58px;height:58px;object-fit:contain}
.be-guest__brand span{display:flex;flex-direction:column;line-height:1.35}
.be-guest__brand b{font-size:17px;font-weight:800;color:#004f2e}
.be-guest__brand small{font-size:12.5px;color:#62768b;font-weight:600}
.be-guest__main .staff-page{padding:0}
.be-guest__main .container{width:100%}
.be-guest__note{margin:20px 0 0;text-align:center;font-size:12.5px;color:#62768b}

/* โลโก้ + ชื่อศูนย์ฯ ชุดเดียวกันทุก 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}}
