/*
Theme Name: เนติบัณฑิตยสภา (thethaibar)
Theme URI: https://www.thethaibar.or.th/
Description: ธีมเว็บไซต์เนติบัณฑิตยสภา ในพระบรมราชูปถัมภ์ เน้นบริการ แก้ไขได้ด้วย Site Editor
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: thethaibar
*/

/* ---------- ส่วนหัว ---------- */
.wp-site-blocks>header{position:sticky;top:0;z-index:50}
.admin-bar .wp-site-blocks>header{top:32px}
@media (max-width:782px){.admin-bar .wp-site-blocks>header{top:0;position:relative}}
.ttb-header{background:var(--wp--preset--color--navy);color:#fff;box-shadow:0 2px 12px rgba(0,20,61,.25)}
.ttb-header a{color:#fff;text-decoration:none}
.ttb-header .wp-block-site-logo img{width:56px;height:auto}
.ttb-header .wp-block-site-title{font-size:1.15rem;line-height:1.25;margin:0}
.ttb-header .wp-block-site-tagline{font-size:.8rem;opacity:.8;margin:0;line-height:1.3}
.ttb-header .wp-block-navigation{font-size:.98rem;font-weight:500}
.ttb-header .wp-block-navigation-item__content{padding:.35rem .1rem;border-bottom:2px solid transparent}
.ttb-header .wp-block-navigation-item__content:hover{border-bottom-color:var(--wp--preset--color--gold)}
.ttb-header .wp-block-navigation__submenu-container{color:var(--wp--preset--color--ink)!important;background:#fff!important;border:0!important;border-radius:8px;box-shadow:0 10px 30px rgba(0,20,61,.18);padding:.4rem 0}
.ttb-header .wp-block-navigation__submenu-container a{color:var(--wp--preset--color--ink)!important;padding:.45rem 1rem!important;border:0!important}
.ttb-header .wp-block-navigation__submenu-container a:hover{background:var(--wp--preset--color--surface)}
.ttb-header .wp-block-navigation__responsive-container.is-menu-open{background:var(--wp--preset--color--navy)!important;color:#fff!important}
.ttb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container{background:transparent!important;box-shadow:none}
.ttb-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container a{color:#fff!important}
.ttb-goldline{height:4px;background:linear-gradient(90deg,var(--wp--preset--color--gold),#f5d96b,var(--wp--preset--color--gold))}

/* ---------- ส่วนต้อนรับ ---------- */
.ttb-hero{background:radial-gradient(1200px 400px at 85% -10%,rgba(226,183,20,.22),transparent 60%),linear-gradient(160deg,#002a7a 0%,var(--wp--preset--color--navy) 55%,var(--wp--preset--color--navy-dark) 100%);color:#fff;position:relative;overflow:hidden}
.ttb-hero::after{content:"";position:absolute;right:-60px;bottom:-80px;width:360px;height:360px;background:url(assets/logo-gold.png) center/contain no-repeat;opacity:.08;pointer-events:none}
.ttb-hero h1,.ttb-hero h2,.ttb-hero p{color:#fff}
.ttb-hero .ttb-eyebrow{color:var(--wp--preset--color--gold);font-weight:600;letter-spacing:.02em;margin:0}
.ttb-hero .wp-block-search__inside-wrapper{background:#fff;border-radius:12px;padding:6px;border:0;box-shadow:0 8px 28px rgba(0,0,0,.25)}
.ttb-hero .wp-block-search__input{border:0;font-size:1.05rem;padding:.6rem .9rem;font-family:inherit}
.ttb-hero .wp-block-search__button{background:var(--wp--preset--color--gold);color:var(--wp--preset--color--navy-dark);border-radius:8px;font-weight:700;border:0;padding:.6rem 1.4rem;margin-left:6px}

/* ---------- ปุ่มลัด "ฉันต้องการ..." ---------- */
.ttb-services{margin-top:-3rem!important;position:relative;z-index:2}
.ttb-services-panel{background:#fff;border-radius:16px;box-shadow:0 18px 48px rgba(0,32,96,.14);border:1px solid var(--wp--preset--color--line)}

/* ---------- หัวข้อส่วน ---------- */
.ttb-section-title{display:flex;align-items:center;gap:.75rem}
.ttb-section-title::before{content:"";width:6px;height:1.4em;border-radius:3px;background:var(--wp--preset--color--gold)}
.ttb-more a{font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:.35rem}
.ttb-more a::after{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:url(assets/icons/arrow.svg) center/contain no-repeat;mask:url(assets/icons/arrow.svg) center/contain no-repeat}

/* ---------- การ์ดข่าว ---------- */
.ttb-news .wp-block-post{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:12px;overflow:hidden;display:flex;flex-direction:column;transition:box-shadow .18s ease}
.ttb-news .wp-block-post:hover{box-shadow:0 12px 26px rgba(0,32,96,.10)}
.ttb-news .wp-block-post-featured-image{margin:0}
.ttb-news .wp-block-post-featured-image img{aspect-ratio:16/9;object-fit:cover;width:100%;height:auto}
.ttb-news .wp-block-post-featured-image:empty,.ttb-news .wp-block-post:not(:has(.wp-block-post-featured-image)) .ttb-news-body{border-top:4px solid var(--wp--preset--color--gold)}
.ttb-news-body{padding:.9rem 1rem 1.1rem!important}
.ttb-news .wp-block-post-title{font-size:1.05rem;line-height:1.5;margin:.25rem 0 0}
.ttb-news .wp-block-post-title a{text-decoration:none;color:var(--wp--preset--color--ink)}
.ttb-news .wp-block-post-title a:hover{color:var(--wp--preset--color--navy)}
.ttb-news .wp-block-post-terms a{font-size:.8rem;font-weight:600;color:var(--wp--preset--color--navy);background:var(--wp--preset--color--gold-soft);padding:.1rem .55rem;border-radius:99px;text-decoration:none}

/* ---------- ระบบที่เกี่ยวข้อง ---------- */
.ttb-systems a{display:block;padding:.85rem 1rem;border-radius:10px;background:#fff;border:1px solid var(--wp--preset--color--line);text-decoration:none;font-weight:600;color:var(--wp--preset--color--navy)}
.ttb-systems a:hover{border-color:var(--wp--preset--color--gold)}
.ttb-systems p{margin:0}

/* ---------- ส่วนท้าย ---------- */
.ttb-footer{background:var(--wp--preset--color--navy-dark);color:rgba(255,255,255,.85);font-size:.95rem}
.ttb-footer h2,.ttb-footer h3{color:#fff;font-size:1.05rem}
.ttb-footer a{color:#fff;text-decoration:none}
.ttb-footer a:hover{color:var(--wp--preset--color--gold)}
.ttb-footer ul{list-style:none;padding:0;margin:0}
.ttb-footer li{margin:.3rem 0}
.ttb-footer .ttb-copy{border-top:1px solid rgba(255,255,255,.12);font-size:.85rem;color:rgba(255,255,255,.6)}

/* ---------- หน้าเนื้อหา ---------- */
.ttb-page-head{background:var(--wp--preset--color--surface);border-bottom:1px solid var(--wp--preset--color--line)}
.ttb-page-head h1{margin:0}
.wp-block-post-content a{text-decoration:underline;text-underline-offset:3px}
:where(.wp-block-post-content) img{border-radius:8px}
:focus-visible{outline:3px solid var(--wp--preset--color--gold);outline-offset:2px}

/* ---------- รายการประกาศ ---------- */
.ttb-ann .wp-block-post-template{margin-top:var(--wp--preset--spacing--30)}
.ttb-ann .wp-block-post{border-bottom:1px solid var(--wp--preset--color--line);padding:.7rem 0;margin:0!important}
.ttb-ann .wp-block-post-title{font-size:1rem;line-height:1.5;margin:0;font-weight:600}
.ttb-ann .wp-block-post-title a{text-decoration:none;color:var(--wp--preset--color--ink)}
.ttb-ann .wp-block-post-title a:hover{color:var(--wp--preset--color--navy)}
.ttb-news .wp-block-post-template{margin-top:var(--wp--preset--spacing--30)}

/* ---------- ระยะห่างระหว่างส่วนหัว เนื้อหา ส่วนท้าย ---------- */
.wp-site-blocks>header+*,.wp-site-blocks>footer,.wp-site-blocks>*+footer{margin-block-start:0}

/* ---------- มือถือ: ปุ่มลัดเป็น 2 คอลัมน์ กะทัดรัด ---------- */
@media (max-width:600px){
  .ttb-services{margin-top:-2rem!important}
  .ttb-services-panel{padding:1rem!important}
  .ttb-header .wp-block-site-tagline{display:none}
  .ttb-header .wp-block-site-title{font-size:1rem}
  .ttb-header .wp-block-site-logo img{width:44px}
  .ttb-hero::after{width:220px;height:220px;right:-50px;bottom:-40px}
}

/* เนื้อหาเก่าที่ย้ายมา: กันรูปและตารางล้นจอ */
.wp-block-post-content img{max-width:100%;height:auto}
.wp-block-post-content iframe{max-width:100%}
.wp-block-post-content{overflow-wrap:break-word}
@media (max-width:782px){.wp-block-post-content [style*="padding-left"]{padding-left:0!important}.wp-block-post-content [style*="margin-left"]{margin-left:0!important}}

/* เมนูหลักแยกเป็นแถวที่สองบนจอกว้าง (รองรับเมนู 8 รายการ) */
@media (min-width:600px){
  .ttb-header .ttb-bar{flex-wrap:wrap!important;row-gap:.35rem}
  .ttb-header .ttb-bar>.wp-block-navigation{flex-basis:100%;justify-content:flex-start!important;border-top:1px solid rgba(255,255,255,.14);padding-top:.35rem}
  .ttb-header .ttb-bar>.wp-block-navigation .wp-block-navigation__container{justify-content:flex-start;column-gap:1.6rem}
}

/* ---------- ป๊อปอัปประกาศ ---------- */
.ttb-modal[hidden]{display:none}
.ttb-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:1rem}
.ttb-modal-backdrop{position:absolute;inset:0;background:rgba(0,12,40,.72)}
.ttb-modal-box{position:relative;background:#fff;border-radius:14px;max-width:min(760px,100%);width:100%;max-height:calc(100vh - 2rem);display:flex;flex-direction:column;box-shadow:0 24px 60px rgba(0,0,0,.4);outline:none;overflow:hidden}
.ttb-modal-head{display:flex;align-items:center;gap:1rem;background:var(--wp--preset--color--navy);color:#fff;padding:.7rem 1rem;border-bottom:3px solid var(--wp--preset--color--gold)}
.ttb-modal-title{color:#fff!important;font-size:1.05rem!important;margin:0;flex:1;line-height:1.4}
.ttb-modal-close{background:transparent;border:0;color:#fff;font-size:1.25rem;line-height:1;cursor:pointer;padding:.3rem .45rem;border-radius:6px}
.ttb-modal-close:hover{background:rgba(255,255,255,.15)}
.ttb-modal-body{overflow:auto;padding:1rem;text-align:center}
.ttb-modal-body img,.ttb-modal-body video,.ttb-modal-body table{max-width:100%!important;height:auto}
.ttb-modal-body table{width:auto!important;min-width:0!important;margin:0 auto}
.ttb-modal-foot{display:flex;align-items:center;justify-content:space-between;padding:.6rem 1rem;border-top:1px solid var(--wp--preset--color--line)}
.ttb-modal-count{font-size:.85rem;color:var(--wp--preset--color--muted)}
.ttb-modal-btn{background:var(--wp--preset--color--navy);color:#fff;border:0;border-radius:8px;padding:.5rem 1.4rem;font:inherit;font-weight:600;cursor:pointer}
.ttb-modal-btn:hover{background:var(--wp--preset--color--navy-dark)}
html.ttb-modal-open{overflow:hidden}

/* ---------- โครงการพิเศษ ---------- */
.ttb-special-card{background:#fff;border:1px solid var(--wp--preset--color--line);border-left:5px solid var(--wp--preset--color--gold);border-radius:12px;padding:1rem}
.ttb-special-card .wp-block-post-featured-image{flex:0 0 150px;margin:0}
.ttb-special-card .wp-block-post-featured-image img{border-radius:8px;width:150px;height:auto;aspect-ratio:auto}
.ttb-special-card .wp-block-post-title{font-size:1.08rem;margin:0;line-height:1.45}
.ttb-special-card .wp-block-post-title a{text-decoration:none}
.ttb-special-card .wp-block-post-excerpt{font-size:.93rem;color:var(--wp--preset--color--muted);margin:0}
.ttb-special-card .wp-block-post-excerpt__more-link{font-weight:600}

/* ---------- คำเตือนลิขสิทธิ์ ---------- */
.ttb-warning{background:#fff4e5;border-left:4px solid #e08a00;border-radius:6px;padding:.7rem .9rem;font-size:.88rem;line-height:1.6;color:#5c3b00;margin-top:var(--wp--preset--spacing--30)}

/* ---------- ลิงก์ด่วน ---------- */
.ttb-links{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:12px;padding:1rem 1.1rem!important}
.ttb-links h3{font-size:1.02rem;margin:0 0 .5rem;padding-bottom:.45rem;border-bottom:2px solid var(--wp--preset--color--gold-soft)}
.ttb-links ul{list-style:none;padding:0;margin:0}
.ttb-links li{padding:.32rem 0;border-bottom:1px dashed var(--wp--preset--color--line);font-size:.95rem;line-height:1.45}
.ttb-links li:last-child{border-bottom:0}
.ttb-links a{text-decoration:none;color:var(--wp--preset--color--ink)}
.ttb-links a:hover{color:var(--wp--preset--color--navy);text-decoration:underline}
.ttb-hot{background:#b3261e;color:#fff;font-size:.68rem;font-weight:700;padding:.05rem .35rem;border-radius:4px;margin-left:.25rem;vertical-align:middle}

/* ---------- แนะนำ (การ์ดภาพ) ---------- */
.ttb-feature{position:relative;background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:12px;overflow:hidden;transition:transform .18s ease,box-shadow .18s ease}
.ttb-feature:hover{transform:translateY(-3px);box-shadow:0 12px 26px rgba(0,32,96,.12)}
.ttb-feature .wp-block-image{margin:0}
.ttb-feature .wp-block-image img{width:100%;aspect-ratio:2/1;object-fit:cover;display:block}
.ttb-feature h3{font-size:1rem;margin:0;padding:.75rem 1rem;border-top:3px solid var(--wp--preset--color--gold);line-height:1.45}
.ttb-feature h3 a{color:var(--wp--preset--color--navy);text-decoration:none}
.ttb-feature h3 a::after{content:"";position:absolute;inset:0}

/* =========================================================
   การ์ดบริการ "ฉันต้องการ..." (ชุดใหม่)
   ========================================================= */
.ttb-services-panel .is-layout-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1rem!important}
.ttb-card{position:relative;display:flex;flex-direction:column;justify-content:flex-start;background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:14px;padding:1.15rem 1.15rem 1.1rem!important;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;overflow:hidden}
.ttb-card::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;background:var(--wp--preset--color--gold);transform:scaleX(0);transform-origin:left;transition:transform .25s ease}
.ttb-card:hover{transform:translateY(-4px);box-shadow:0 16px 32px rgba(0,32,96,.13);border-color:#c8d3ea}
.ttb-card:hover::after{transform:scaleX(1)}
.ttb-card h3{display:flex;align-items:center;gap:.85rem;margin:0;font-size:1.06rem;line-height:1.35}
.ttb-card h3 a{color:var(--wp--preset--color--navy);text-decoration:none}
.ttb-card h3 a::after{content:"";position:absolute;inset:0;z-index:1}
.ttb-card p{margin:.6rem 0 0;font-size:.9rem;line-height:1.55;color:var(--wp--preset--color--muted)}
.ttb-ico::before{content:"";flex:0 0 52px;width:52px;height:52px;border-radius:14px;background:var(--ico) center/30px no-repeat,linear-gradient(135deg,#0b4ab5 0%,#002060 100%);box-shadow:0 6px 14px rgba(0,32,96,.22)}
.ico-apply{--ico:url(assets/icons/ic-apply.svg)}
.ico-student{--ico:url(assets/icons/ic-student.svg)}
.ico-evening{--ico:url(assets/icons/ic-evening.svg)}
.ico-member{--ico:url(assets/icons/ic-member.svg)}
.ico-live{--ico:url(assets/icons/ic-live.svg)}
.ico-ebook{--ico:url(assets/icons/ic-ebook.svg)}
.ico-download{--ico:url(assets/icons/ic-download.svg)}
.ico-contact{--ico:url(assets/icons/ic-contact.svg)}

/* การ์ดภาพแนะนำ: 4 คอลัมน์เต็มแถว */
.ttb-features{grid-template-columns:repeat(4,minmax(0,1fr))!important}

/* โครงการพิเศษ: ถ้ามีเรื่องเดียวให้เต็มความกว้าง */
.ttb-special .wp-block-post-template{grid-template-columns:repeat(auto-fit,minmax(min(100%,460px),1fr))!important}
.ttb-special-card{height:100%}
.ttb-special-card .wp-block-post-featured-image{flex-basis:170px}
.ttb-special-card .wp-block-post-featured-image img{width:170px}

/* ---------- แท็บเล็ต ---------- */
@media (max-width:1024px){
  .ttb-services-panel .is-layout-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ttb-features{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
/* ---------- มือถือ ---------- */
@media (max-width:600px){
  .ttb-services-panel .is-layout-grid{gap:.6rem!important}
  .ttb-card{padding:.9rem .6rem .85rem!important;text-align:center;align-items:center}
  .ttb-card h3{flex-direction:column;gap:.55rem;font-size:.93rem}
  .ttb-card p{display:none}
  .ttb-ico::before{flex-basis:46px;width:46px;height:46px;border-radius:12px;background-size:26px,auto}
  .ttb-features{gap:.6rem!important}
  .ttb-feature h3{font-size:.88rem;padding:.5rem .6rem}
  .ttb-special-card{flex-wrap:wrap!important}
  .ttb-special-card .wp-block-post-featured-image{flex-basis:100%}
  .ttb-special-card .wp-block-post-featured-image img{width:100%;max-width:280px}
}

/* =========================================================
   หน้าเนื้อหาที่ย้ายจากเว็บเดิม: เต็มความกว้าง + มือถือ
   ========================================================= */
.wp-block-post-content [style*="width"]{max-width:100%!important}
.wp-block-post-content table{max-width:100%!important;height:auto!important}
.wp-block-post-content td,.wp-block-post-content th{height:auto!important}
.wp-block-post-content iframe,.wp-block-post-content video{max-width:100%;height:auto}
@media (max-width:700px){
  .wp-block-post-content table,.wp-block-post-content tbody,.wp-block-post-content thead,.wp-block-post-content tr,.wp-block-post-content td,.wp-block-post-content th{display:block;width:100%!important;box-sizing:border-box}
  .wp-block-post-content td,.wp-block-post-content th{text-align:left!important;padding-left:.5rem!important;padding-right:.5rem!important}
  .wp-block-post-content td[align="right"],.wp-block-post-content td[style*="text-align: right"]{padding-top:0!important}
  .wp-block-post-content [style*="display: flex"]{flex-wrap:wrap!important}
  .wp-block-post-content [style*="white-space: nowrap"]{white-space:normal!important}
  .wp-block-post-content img{height:auto!important}
}
.wp-block-post-content table tr,.wp-block-post-content table tbody,.wp-block-post-content table [style*="height"]{height:auto!important;min-height:0!important}

/* =========================================================
   หน้าสำนักอบรมฯ / การศึกษา
   ========================================================= */
.ttb-sysgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:var(--wp--preset--spacing--50)}
.ttb-sys{display:flex;flex-direction:column;gap:.7rem;background:#fff;border:1px solid var(--wp--preset--color--line);border-top:4px solid var(--wp--preset--color--navy);border-radius:14px;padding:1.2rem!important;box-shadow:0 6px 18px rgba(0,32,96,.06)}
.ttb-sys>*{margin:0!important}
.ttb-sys h3{display:flex;align-items:center;gap:.8rem;font-size:1.05rem;line-height:1.35}
.ttb-sys-desc{font-size:.9rem;color:var(--wp--preset--color--muted);line-height:1.55;flex:1 0 auto}
.ttb-sys .wp-block-button__link{width:100%;padding:.6rem 1rem;font-size:.95rem}
.ttb-sys .ttb-linklist{border-top:1px dashed var(--wp--preset--color--line);padding-top:.5rem!important}
.ttb-sys .ttb-linklist li{font-size:.86rem;padding:.3rem 0;border:0}
.ttb-sys .ttb-linklist li::before{content:"›";color:var(--wp--preset--color--gold);font-weight:700;margin-right:.4rem}

.ttb-box{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:14px;padding:1.2rem 1.3rem!important;margin-bottom:1.25rem;box-shadow:0 4px 14px rgba(0,32,96,.04)}
.ttb-box>*{margin-top:0!important}
.ttb-box-title{font-size:1.15rem!important;margin:0 0 .6rem!important;padding-bottom:.6rem;border-bottom:2px solid var(--wp--preset--color--gold-soft);display:flex;align-items:center;gap:.6rem}
.ttb-box-title::before{content:"";width:5px;height:1.15em;border-radius:3px;background:var(--wp--preset--color--gold)}
.ttb-box-side{background:var(--wp--preset--color--surface)}
.ttb-box-side .ttb-linklist li{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:8px;padding:.55rem .75rem;margin-bottom:.45rem}
.ttb-box-side .ttb-linklist li:last-child{margin-bottom:0}

.ttb-linklist{list-style:none;padding:0!important;margin:0}
.ttb-linklist li{display:flex;align-items:center;justify-content:space-between;gap:.9rem;padding:.6rem 0;border-bottom:1px solid var(--wp--preset--color--line);line-height:1.5;font-size:.97rem}
.ttb-linklist li:last-child{border-bottom:0}
.ttb-linklist li small{display:block;color:var(--wp--preset--color--muted);font-size:.8rem}
.ttb-linklist a{text-decoration:none!important;color:var(--wp--preset--color--ink)}
.ttb-linklist a:hover{color:var(--wp--preset--color--navy);text-decoration:underline!important}
.ttb-pill{flex:0 0 auto;display:inline-block;white-space:nowrap;border:1.5px solid var(--wp--preset--color--navy);color:var(--wp--preset--color--navy)!important;border-radius:999px;padding:.2rem .85rem;font-size:.82rem;font-weight:600;text-decoration:none!important;transition:background .15s,color .15s}
.ttb-pill:hover{background:var(--wp--preset--color--navy);color:#fff!important}
.ttb-new{background:#b3261e;color:#fff;font-size:.68rem;font-weight:700;padding:.05rem .4rem;border-radius:4px;vertical-align:middle}

.ttb-box .ttb-ann .wp-block-post{padding:.65rem 0}
.ttb-box .ttb-ann .wp-block-post-title{font-size:.98rem}
.ttb-box-more{margin-top:.6rem!important;text-align:right;font-weight:600}
.ttb-box-more a{text-decoration:none}

@media (max-width:1024px){.ttb-sysgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){
  .ttb-sysgrid{grid-template-columns:1fr;gap:.8rem}
  .ttb-box{padding:1rem!important}
  .ttb-linklist li{flex-wrap:wrap;gap:.4rem}
  .ttb-linklist li .ttb-pill{margin-left:auto}
}
.ttb-sys .ttb-linklist li{justify-content:flex-start}
.ttb-sys .ttb-sys-desc{order:1;flex:0 0 auto}
.ttb-sys .ttb-linklist{order:2}
.ttb-sys .wp-block-buttons{order:3;margin-top:auto!important;padding-top:.3rem}
.ttb-sys h3{order:0}
.wp-block-post-content .wp-block-button__link{text-decoration:none!important}
.ico-certificate{--ico:url(assets/icons/ic-certificate.svg)}
.ico-status{--ico:url(assets/icons/ic-status.svg)}
.ttb-box .wp-block-embed{margin:0}
.ttb-box .wp-block-embed iframe{border-radius:10px}
.ttb-note{background:#eef4ff;border-left:4px solid var(--wp--preset--color--navy);border-radius:6px;padding:.75rem .9rem;font-size:.95rem;line-height:1.6;margin-bottom:.6rem!important}
.ttb-sub{margin:.8rem 0 .2rem!important;font-size:.95rem;color:var(--wp--preset--color--navy)}
.ttb-box .ttb-warning{margin-top:0}

/* =========================================================
   หน้าแรก v2: ส่วนหัวใหญ่ + ข่าวเด่น
   ========================================================= */
.ttb-hero2{position:relative;overflow:hidden;color:#fff;padding-top:clamp(2.5rem,6vw,4.5rem)!important;padding-bottom:clamp(5.5rem,9vw,7.5rem)!important;
  background:
   radial-gradient(900px 520px at 88% 8%,rgba(242,201,76,.20),transparent 60%),
   radial-gradient(700px 500px at 5% 110%,rgba(30,90,200,.45),transparent 60%),
   linear-gradient(155deg,#00205f 0%,#001847 45%,#000d2b 100%)}
.ttb-hero2::before{content:"";position:absolute;inset:0;background-image:repeating-linear-gradient(135deg,rgba(255,255,255,.035) 0 1px,transparent 1px 22px);pointer-events:none}
.ttb-hero2::after{content:"";position:absolute;left:-140px;top:50%;width:560px;height:560px;transform:translateY(-50%);background:url(assets/logo-gold-512.png) center/contain no-repeat;opacity:.07;pointer-events:none}
.ttb-hero2>*{position:relative;z-index:1}
.ttb-hero-cols{gap:clamp(1.5rem,4vw,3.5rem)!important}
.ttb-eyebrow2{display:inline-block;margin:0 0 1rem!important;padding:.3rem .9rem;border:1px solid rgba(242,201,76,.55);border-radius:999px;color:#F2C94C!important;font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;font-weight:600;background:rgba(242,201,76,.08)}
.ttb-hero-title{color:#fff!important;font-size:clamp(2.3rem,5.2vw,4rem)!important;line-height:1.15!important;margin:0 0 1rem!important;letter-spacing:-.01em}
.ttb-gold{background:linear-gradient(90deg,#F6D978,#E2B714 55%,#F6D978);-webkit-background-clip:text;background-clip:text;color:transparent}
.ttb-hero-lead{color:rgba(255,255,255,.82)!important;font-size:clamp(1.02rem,1.5vw,1.2rem);max-width:34em;margin:0 0 1.6rem!important}
.ttb-hero-search .wp-block-search__inside-wrapper{background:#fff;border-radius:14px;padding:6px;border:0;box-shadow:0 18px 40px rgba(0,0,0,.35);max-width:560px}
.ttb-hero-search .wp-block-search__input{border:0;font-size:1.05rem;padding:.75rem 1rem;font-family:inherit;background:transparent}
.ttb-hero-search .wp-block-search__button{background:linear-gradient(180deg,#F2C94C,#D9A90C);color:#001847;border-radius:10px;font-weight:700;border:0;padding:.7rem 1.5rem;margin-left:6px}
.ttb-chips{margin:1.1rem 0 0!important;display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;font-size:.9rem}
.ttb-chips-label{color:rgba(255,255,255,.6);margin-right:.2rem}
.ttb-chips a{color:#fff!important;text-decoration:none;padding:.32rem .8rem;border-radius:999px;background:rgba(255,255,255,.09);border:1px solid rgba(255,255,255,.18);transition:background .15s,border-color .15s}
.ttb-chips a:hover{background:rgba(242,201,76,.18);border-color:#F2C94C}

/* ข่าวเด่นหมุน */
.ttb-spot{position:relative;border-radius:20px;overflow:hidden;box-shadow:0 30px 60px rgba(0,0,0,.45),0 0 0 1px rgba(255,255,255,.08)}
.ttb-spot .wp-block-post-template{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin:0;padding:0}
.ttb-spot .wp-block-post-template::-webkit-scrollbar{display:none}
.ttb-spot .wp-block-post{flex:0 0 100%;scroll-snap-align:start;position:relative;margin:0!important}
.ttb-spot .wp-block-post-featured-image{margin:0}
.ttb-spot .wp-block-post-featured-image img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}
.ttb-spot-body{position:absolute;left:0;right:0;bottom:0;padding:3.5rem 1.4rem 2.6rem!important;background:linear-gradient(180deg,transparent,rgba(0,13,43,.78) 45%,rgba(0,13,43,.95))}
.ttb-spot-body .wp-block-post-date{color:#F2C94C!important;font-size:.82rem;font-weight:600}
.ttb-spot-body .wp-block-post-title{margin:0;font-size:clamp(1.05rem,1.6vw,1.3rem);line-height:1.45}
.ttb-spot-body .wp-block-post-title a{color:#fff;text-decoration:none}
.ttb-spot-body .wp-block-post-title a:hover{text-decoration:underline}
.ttb-spot-dots{position:absolute;left:1.4rem;bottom:1rem;display:flex;gap:.4rem;z-index:2}
.ttb-spot-dots button{width:9px;height:9px;padding:0;border-radius:99px;border:0;background:rgba(255,255,255,.45);cursor:pointer;transition:width .25s,background .25s}
.ttb-spot-dots button[aria-current="true"]{width:26px;background:#F2C94C}

/* แถบตัวเลข */
.ttb-stats-wrap{margin-top:-4rem!important;position:relative;z-index:3}
.ttb-stats{display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-radius:18px;box-shadow:0 20px 50px rgba(0,32,96,.16);border:1px solid var(--wp--preset--color--line);overflow:hidden}
.ttb-stat{padding:1.3rem 1.4rem!important;border-right:1px solid var(--wp--preset--color--line);position:relative}
.ttb-stat:last-child{border-right:0}
.ttb-stat::before{content:"";position:absolute;left:1.4rem;top:0;width:36px;height:3px;background:var(--wp--preset--color--gold);border-radius:0 0 3px 3px}
.ttb-stat>*{margin:0!important}
.ttb-stat-num{font-size:clamp(1.35rem,2.3vw,1.85rem);font-weight:700;color:var(--wp--preset--color--navy);line-height:1.2}
.ttb-stat-label{font-size:.88rem;color:var(--wp--preset--color--muted);line-height:1.5;margin-top:.35rem!important}

/* ปุ่มลัด: ไม่ซ้อนส่วนหัวแล้ว */
.ttb-services{margin-top:0!important;padding-top:var(--wp--preset--spacing--50)}
.ttb-services-panel{box-shadow:none!important;border:0!important;background:transparent!important;padding:0!important}

/* ข่าวแบบนิตยสาร */
.ttb-mag .wp-block-post-template{display:grid;grid-template-columns:1.35fr 1fr;grid-auto-rows:auto;gap:1rem;margin-top:var(--wp--preset--spacing--30);padding:0}
.ttb-mag .wp-block-post{margin:0!important;display:flex;gap:.85rem;align-items:flex-start;background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:12px;padding:.6rem;transition:box-shadow .2s}
.ttb-mag .wp-block-post:hover{box-shadow:0 12px 26px rgba(0,32,96,.10)}
.ttb-mag .wp-block-post .wp-block-post-featured-image{flex:0 0 120px;margin:0}
.ttb-mag .wp-block-post .wp-block-post-featured-image img{width:120px;aspect-ratio:4/3;object-fit:cover;border-radius:8px}
.ttb-mag .ttb-news-body{padding:.15rem 0 0!important}
.ttb-mag .wp-block-post-title{font-size:.96rem;line-height:1.45;margin:.15rem 0 0}
.ttb-mag .wp-block-post-title a{color:var(--wp--preset--color--ink);text-decoration:none}
.ttb-mag .wp-block-post-title a:hover{color:var(--wp--preset--color--navy)}
.ttb-mag .wp-block-post:first-child{grid-row:1 / span 3;flex-direction:column;padding:0;overflow:hidden;position:relative}
.ttb-mag .wp-block-post:first-child .wp-block-post-featured-image{flex:0 0 auto;width:100%}
.ttb-mag .wp-block-post:first-child .wp-block-post-featured-image img{width:100%;aspect-ratio:16/11;border-radius:0}
.ttb-mag .wp-block-post:first-child .ttb-news-body{padding:1rem 1.1rem 1.2rem!important}
.ttb-mag .wp-block-post:first-child .wp-block-post-title{font-size:1.2rem}

/* แถบสำนักอบรมฯ */
.ttb-band{position:relative;color:#fff;padding-top:clamp(3rem,7vw,5.5rem)!important;padding-bottom:clamp(3rem,7vw,5.5rem)!important;background:linear-gradient(90deg,rgba(0,20,61,.96) 0%,rgba(0,20,61,.88) 42%,rgba(0,20,61,.35) 100%),url(assets/band-lecture.jpg) center/cover no-repeat}
.ttb-band-inner{max-width:620px}
.ttb-band-inner>*{margin-top:0!important}
.ttb-band-title{color:#fff!important;font-size:clamp(1.8rem,3.6vw,2.6rem)!important;line-height:1.25!important;margin-bottom:.8rem!important}
.ttb-band-text{color:rgba(255,255,255,.85);font-size:1.05rem;margin-bottom:1.5rem!important}
.ttb-band-btns{gap:.7rem!important}
.ttb-btn-gold .wp-block-button__link{background:linear-gradient(180deg,#F2C94C,#D9A90C)!important;color:#001847!important;border:0}
.ttb-btn-light .wp-block-button__link{color:#fff!important;border:1.5px solid rgba(255,255,255,.6)!important;background:transparent!important}
.ttb-btn-light .wp-block-button__link:hover{background:rgba(255,255,255,.1)!important;border-color:#fff!important}

/* หัวข้อส่วนใหญ่ขึ้นเล็กน้อย */
.wp-site-blocks .ttb-section-title{font-size:clamp(1.5rem,2.6vw,2rem)}

@media (max-width:1024px){
  .ttb-stats{grid-template-columns:repeat(2,1fr)}
  .ttb-stat:nth-child(2){border-right:0}
  .ttb-stat:nth-child(-n+2){border-bottom:1px solid var(--wp--preset--color--line)}
}
@media (max-width:781px){
  .ttb-hero2{padding-bottom:5rem!important}
  .ttb-hero2::after{width:340px;height:340px;left:auto;right:-120px;top:120px;transform:none}
  .ttb-hero-cols{gap:2rem!important}
  .ttb-mag .wp-block-post-template{grid-template-columns:1fr}
  .ttb-mag .wp-block-post:first-child{grid-row:auto}
  .ttb-band{background:linear-gradient(180deg,rgba(0,20,61,.9),rgba(0,20,61,.96)),url(assets/band-lecture.jpg) center/cover no-repeat}
}
@media (max-width:600px){
  .ttb-stats-wrap{margin-top:-3.5rem!important}
  .ttb-stat{padding:1rem .9rem!important}
  .ttb-stat::before{left:.9rem}
  .ttb-stat-label{font-size:.78rem}
  .ttb-stat-label br{display:none}
  .ttb-chips-label{display:none}
  .ttb-chips{font-size:.82rem;gap:.4rem}
  .ttb-hero-search .wp-block-search__button{padding:.7rem 1rem}
  .ttb-mag .wp-block-post .wp-block-post-featured-image{flex-basis:96px}
  .ttb-mag .wp-block-post .wp-block-post-featured-image img{width:96px}
  .ttb-band-btns .wp-block-button{width:100%}
  .ttb-band-btns .wp-block-button__link{width:100%}
}
.ttb-spot.ttb-js .wp-block-post-template{overflow:visible;scroll-snap-type:none;transition:transform .7s cubic-bezier(.22,.61,.36,1)}
@media (prefers-reduced-motion:reduce){.ttb-spot.ttb-js .wp-block-post-template{transition:none}}
@media (max-width:781px){.ttb-spot{max-width:560px;margin-left:auto;margin-right:auto}}
.ico-news{--ico:url(assets/icons/ic-news.svg)}

/* =========================================================
   หน้าแรก v3: ทางลัดนักศึกษา / สมาชิก มาก่อน
   ========================================================= */
.ttb-hero-compact{padding-top:clamp(2rem,5vw,3.5rem)!important;padding-bottom:clamp(6.5rem,10vw,8rem)!important}
.ttb-hero-compact::after{left:auto;right:-120px;width:520px;height:520px;opacity:.08}
.ttb-hero-text{max-width:760px}
.ttb-hero-compact .ttb-hero-title{font-size:clamp(2rem,4.4vw,3.3rem)!important;margin-bottom:.6rem!important}
.ttb-hero-compact .ttb-hero-lead{margin-bottom:1.3rem!important}
.ico-calendar{--ico:url(assets/icons/ic-calendar.svg)}
.ico-mic{--ico:url(assets/icons/ic-mic.svg)}
.ico-list{--ico:url(assets/icons/ic-list.svg)}
.ico-mail{--ico:url(assets/icons/ic-mail.svg)}

.ttb-tasks-wrap{margin-top:-5.5rem!important;position:relative;z-index:3}
.ttb-tasks{display:grid;grid-template-columns:1fr 1fr;gap:1.25rem}
.ttb-panel{background:#fff;border-radius:20px;box-shadow:0 22px 50px rgba(0,32,96,.16);border:1px solid var(--wp--preset--color--line);padding:1.4rem 1.4rem 1.5rem!important;border-top:5px solid var(--wp--preset--color--navy)}
.ttb-panel-member{border-top-color:#8a1c2c}
.ttb-panel>*{margin-top:0!important}
.ttb-panel-head{margin-bottom:1rem!important;padding-bottom:.9rem;border-bottom:1px solid var(--wp--preset--color--line);gap:1rem!important}
.ttb-panel-head h2{display:flex;align-items:center;gap:.9rem;margin:0;font-size:clamp(1.25rem,2vw,1.5rem)!important;line-height:1.25}
.ttb-panel-head h2 small{display:block;font-size:.82rem;font-weight:500;color:var(--wp--preset--color--muted);margin-top:.15rem}
.ttb-panel-head h2.ttb-ico::before{flex-basis:56px;width:56px;height:56px;border-radius:16px;background-size:32px,auto}
.ttb-panel-member .ttb-ico::before{background:var(--ico) center/30px no-repeat,linear-gradient(135deg,#b3263a 0%,#6e1422 100%)!important;box-shadow:0 6px 14px rgba(110,20,34,.25)}
.ttb-panel-member .ttb-panel-head h2.ttb-ico::before{background-size:32px,auto!important}
.ttb-panel-more{margin:0!important;font-size:.88rem;font-weight:600;white-space:nowrap}
.ttb-panel-more a{text-decoration:none}
.ttb-panel-more a::after{content:" →"}
.ttb-panel-member .ttb-panel-more a{color:#8a1c2c}

.ttb-tasklist{list-style:none;padding:0!important;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
.ttb-t{margin:0}
.ttb-t a{display:flex;align-items:center;gap:.75rem;height:100%;box-sizing:border-box;padding:.65rem .8rem;border:1px solid var(--wp--preset--color--line);border-radius:12px;text-decoration:none;color:var(--wp--preset--color--ink);font-weight:600;font-size:.95rem;line-height:1.35;transition:border-color .15s,background .15s,transform .15s}
.ttb-t a::before{content:"";flex:0 0 38px;width:38px;height:38px;border-radius:10px;background:var(--ico) center/22px no-repeat,linear-gradient(135deg,#0b4ab5 0%,#002060 100%)}
.ttb-panel-member .ttb-t a::before{background:var(--ico) center/22px no-repeat,linear-gradient(135deg,#b3263a 0%,#6e1422 100%)}
.ttb-t a::after{content:"›";margin-left:auto;font-size:1.3rem;color:#a8b2c6;line-height:1}
.ttb-t a span{display:flex;flex-direction:column}
.ttb-t a small{font-weight:400;font-size:.78rem;color:var(--wp--preset--color--muted);margin-top:.1rem}
.ttb-t a:hover{border-color:var(--wp--preset--color--navy);background:#f6f8fe;transform:translateY(-1px)}
.ttb-panel-member .ttb-t a:hover{border-color:#8a1c2c;background:#fdf6f7}
.ttb-t a:hover::after{color:var(--wp--preset--color--navy)}

.ttb-stats-low{margin-top:0!important;padding-top:var(--wp--preset--spacing--50);padding-bottom:var(--wp--preset--spacing--30)}
.ttb-stats-low .ttb-stats{box-shadow:0 8px 24px rgba(0,32,96,.08)}

@media (max-width:1024px){
  .ttb-tasks{grid-template-columns:1fr}
}
@media (max-width:600px){
  .ttb-hero-compact{padding-bottom:5.5rem!important}
  .ttb-hero-compact .ttb-eyebrow2{font-size:.7rem}
  .ttb-tasks-wrap{margin-top:-4rem!important}
  .ttb-panel{padding:1rem!important;border-radius:16px}
  .ttb-panel-head{flex-wrap:wrap!important}
  .ttb-panel-head h2.ttb-ico::before{flex-basis:46px;width:46px;height:46px;background-size:26px,auto}
  .ttb-panel-more{font-size:.82rem}
  .ttb-tasklist{grid-template-columns:1fr 1fr;gap:.5rem}
  .ttb-t a{flex-direction:column;align-items:flex-start;padding:.7rem;font-size:.88rem;gap:.5rem}
  .ttb-t a::after{display:none}
  .ttb-t a small{display:none}
  .ttb-t a::before{flex-basis:34px;width:34px;height:34px;background-size:20px,auto}
}
.ttb-tasks>*{margin:0!important}
.ttb-hero-compact .ttb-hero-text{max-width:1200px!important;width:100%}
.ttb-hero-compact .ttb-hero-title{max-width:22em}
.ttb-hero-compact .ttb-hero-lead{max-width:40em}

/* ===== v4: three task panels (student / member / public) ===== */
.ico-scale{--ico:url(assets/icons/ic-scale.svg)}
.ico-cart{--ico:url(assets/icons/ic-cart.svg)}
.ico-book{--ico:url(assets/icons/ic-book.svg)}
.ico-library{--ico:url(assets/icons/ic-library.svg)}
.ico-landmark{--ico:url(assets/icons/ic-landmark.svg)}
.ico-pin{--ico:url(assets/icons/ic-pin.svg)}
.ico-gavel{--ico:url(assets/icons/ic-gavel.svg)}
.ttb-panel-public{border-top-color:#0f766e}
.ttb-panel-public .ttb-ico::before,.ttb-panel-public .ttb-t a::before{background:var(--ico) center/22px no-repeat,linear-gradient(135deg,#14907f 0%,#064e48 100%)!important}
.ttb-panel-public .ttb-panel-head h2.ttb-ico::before{background-size:32px,auto!important;box-shadow:0 6px 14px rgba(6,78,72,.25)}
.ttb-panel-public .ttb-panel-more a{color:#0f766e}
.ttb-panel-public .ttb-t a:hover{border-color:#0f766e;background:#f2faf8}
@media (min-width:1101px){
  .ttb-tasks{grid-template-columns:repeat(3,1fr)}
  .ttb-tasks .ttb-tasklist{grid-template-columns:1fr!important}
  .ttb-panel-head{flex-wrap:wrap!important;row-gap:.4rem!important}
}
@media (min-width:600px) and (max-width:1100px){
  .ttb-tasks{grid-template-columns:1fr}
}

/* ===== v5: news first, services after announcements ===== */
.ttb-hero-flat{padding-bottom:clamp(2.2rem,5vw,3.2rem)!important}
.ttb-tasks-wrap.ttb-tasks-low{margin-top:0!important;padding-top:var(--wp--preset--spacing--50)}
.ttb-sec-news .ttb-mag .wp-block-post:first-child{grid-row:1 / span 4}
.ttb-sec-ann .ttb-ann .wp-block-post-template{display:grid;grid-template-columns:1fr 1fr;column-gap:2.5rem;padding:0}
@media (max-width:781px){
  .ttb-sec-news .ttb-mag .wp-block-post:first-child{grid-row:auto}
  .ttb-sec-ann .ttb-ann .wp-block-post-template{grid-template-columns:1fr}
  .ttb-hero-flat{padding-bottom:2rem!important}
}

/* ===== v6: Thai marks not clipped in hero title ===== */
.ttb-hero-title,.ttb-hero-compact .ttb-hero-title{line-height:1.45!important;padding-top:.1em;margin-bottom:1.1rem!important;overflow:visible}
.ttb-gold{display:inline;padding:.25em 0 .2em;-webkit-box-decoration-break:clone;box-decoration-break:clone}

/* ===== v7: desktop sub-menus always open to the right, wider ===== */
@media (min-width:600px){
  .ttb-header .wp-block-navigation .has-child>.wp-block-navigation__submenu-container{left:0!important;right:auto!important;min-width:260px!important}
  .ttb-header .wp-block-navigation .wp-block-navigation__submenu-container .has-child>.wp-block-navigation__submenu-container{left:100%!important;right:auto!important;top:-.4rem!important}
  .ttb-header .wp-block-navigation .wp-block-navigation__submenu-container .ttb-flip>.wp-block-navigation__submenu-container{left:auto!important;right:100%!important}
}
/* tasks now sit at the bottom of the page */
.ttb-tasks-wrap.ttb-tasks-low{padding-bottom:var(--wp--preset--spacing--60)}

/* ===== v9: small procurement / Thai Bar news cards ===== */
.ttb-hl-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.ttb-hl-grid>*{margin:0!important}
.ttb-mini{display:flex;align-items:center;gap:.8rem;background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:12px;padding:.7rem .9rem;text-decoration:none;color:var(--wp--preset--color--ink);min-width:0;transition:border-color .15s,background .15s}
a.ttb-mini:hover,.ttb-mini:hover{border-color:var(--wp--preset--color--navy);background:#f6f8fe}
.ttb-mini-ico{flex:0 0 36px;width:36px;height:36px;border-radius:10px;background:var(--ico) center/20px no-repeat,linear-gradient(135deg,#0b4ab5 0%,#002060 100%)}
.ttb-mini-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.ttb-mini-txt strong{font-size:.98rem;color:var(--wp--preset--color--navy);line-height:1.35}
.ttb-mini-txt small{font-size:.8rem;color:var(--wp--preset--color--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ttb-mini-link{text-decoration:none}
.ttb-mini-link::after{content:"";position:absolute;inset:0}
div.ttb-mini{position:relative}
a.ttb-mini::after{content:"›";font-size:1.4rem;color:#a8b2c6;margin-left:auto}
.ttb-mini-pills{display:flex;gap:.35rem;flex-shrink:0;position:relative;z-index:1}
.ttb-mini-pills a{font-size:.75rem;font-weight:700;padding:.2rem .55rem;border-radius:6px;border:1px solid var(--wp--preset--color--line);text-decoration:none;color:var(--wp--preset--color--navy);background:#fff}
.ttb-mini-pills a:hover{border-color:var(--wp--preset--color--navy)}
@media (max-width:781px){.ttb-hl-grid{grid-template-columns:1fr;gap:.6rem}}
/* ใ / ไ curls stick out above and to the left of the glyph box; give the gradient clip room on all sides */
.ttb-gold{padding:.35em .12em .25em!important;margin:0 -.12em!important}

/* ===== v10: visitor counter in footer ===== */
.ttb-counter{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1.4rem;margin-top:var(--wp--preset--spacing--40);padding:.8rem 1rem;border:1px solid rgba(255,255,255,.12);border-radius:10px;background:rgba(255,255,255,.04);font-size:.9rem}
.ttb-counter-label{font-weight:700;color:var(--wp--preset--color--gold)}
.ttb-counter-item{color:rgba(255,255,255,.75)}
.ttb-counter-item b{color:#fff;font-size:1.05rem;margin-left:.3rem;font-variant-numeric:tabular-nums}
@media (max-width:600px){.ttb-counter{gap:.35rem 1rem}.ttb-counter-label{width:100%}}
.ttb-counter-since{margin-left:auto;font-size:.78rem;color:rgba(255,255,255,.5)}
@media (max-width:600px){.ttb-counter-since{margin-left:0;width:100%}}

/* ===== v11: mourning banner + ribbon ===== */
.ttb-mourn{position:relative;background:#0b0b0b;line-height:0;margin:0!important}
.ttb-mourn-track{position:relative;aspect-ratio:1920/559;max-height:420px;margin:0 auto;overflow:hidden}
.ttb-mourn-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .9s ease}
.ttb-mourn-slide.is-on{opacity:1}
.ttb-mourn-dots{position:absolute;right:16px;bottom:12px;display:flex;gap:8px;line-height:1}
.ttb-mourn-dots button{width:10px;height:10px;border-radius:50%;border:1px solid rgba(255,255,255,.7);background:transparent;padding:0;cursor:pointer}
.ttb-mourn-dots button.is-on{background:#fff}
.ttb-ribbon{position:fixed;top:6px;left:6px;z-index:9999;pointer-events:none;filter:drop-shadow(0 1px 1px rgba(255,255,255,.6))}
@media (max-width:600px){.ttb-ribbon svg{width:30px;height:45px}.ttb-mourn-dots{right:10px;bottom:8px}}
@media (max-width:600px){.ttb-ribbon{top:2px;left:1px}.ttb-ribbon svg{width:20px;height:30px}}

/* ===== v12: hero removed, search moved into the header ===== */
.ttb-head-search{margin:0!important;flex:0 1 300px}
.ttb-head-search .wp-block-search__inside-wrapper{background:rgba(255,255,255,.1)!important;border:1px solid rgba(255,255,255,.28)!important;border-radius:999px!important;padding:2px!important}
.ttb-head-search .wp-block-search__input{background:transparent!important;border:0!important;color:#fff!important;font-size:.9rem;padding:.4rem .9rem!important;min-width:0}
.ttb-head-search .wp-block-search__input::placeholder{color:rgba(255,255,255,.65)}
.ttb-head-search .wp-block-search__button{background:var(--wp--preset--color--gold)!important;color:var(--wp--preset--color--navy)!important;border:0!important;border-radius:999px!important;padding:.35rem .6rem!important;margin:0!important;display:flex;align-items:center}
.ttb-head-search .wp-block-search__button svg{fill:currentColor;width:20px;height:20px;min-width:20px}
.ttb-head-search .wp-block-search__inside-wrapper:focus-within{background:#fff!important;border-color:#fff!important}
.ttb-head-search .wp-block-search__inside-wrapper:focus-within .wp-block-search__input{color:var(--wp--preset--color--ink)!important}
.ttb-head-search .wp-block-search__inside-wrapper:focus-within .wp-block-search__input::placeholder{color:#8a93a6}
@media (max-width:599px){
  .ttb-head-search{flex:0 0 auto;margin-left:auto!important}
  .ttb-head-search .wp-block-search__inside-wrapper{background:transparent!important;border:0!important}
  .ttb-head-search .wp-block-search__input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
  .ttb-head-search .wp-block-search__button{padding:.45rem!important}
}

/* v13: หัวข้อในหน้าข่าว อยู่กึ่งกลาง ตัวเล็กลงและบางลง (ใช้กับทุกข่าว) */
.ttb-single-meta{justify-content:center}
.wp-block-post-title.ttb-single-title{text-align:center;font-size:clamp(1.4rem,2.3vw,1.95rem)!important;font-weight:600!important;line-height:1.55;max-width:900px;margin-left:auto!important;margin-right:auto!important;padding-top:.15em}
/* v14: ให้หัวข้อในหน้าแก้ไขข่าว (หลังบ้าน) หน้าตาเหมือนหน้าเว็บจริง */
.editor-post-title,.editor-post-title__input{text-align:center!important;font-size:clamp(1.4rem,2.3vw,1.95rem)!important;font-weight:600!important;line-height:1.55!important}
/* v15: หัวข้อข่าวตัดบรรทัดเฉพาะตรงช่องว่าง ไม่ฉีกกลางคำไทย (เช่น นวมินทร|มหาราช) และแบ่งบรรทัดให้ยาวพอๆ กัน */
.wp-block-post-title{overflow-wrap:break-word}
.wp-block-post-title.ttb-single-title,.editor-post-title{text-wrap:balance}
.wp-block-post-title .ttb-nb{display:inline-block;max-width:100%}
/* v16: หน้าดาวน์โหลด / ศูนย์หนังสือ (ใช้กับหน้าอื่นได้ด้วยคลาส ttb-pg) */
.ttb-pg{display:flex;flex-direction:column;gap:1.4rem!important}
.ttb-pg>*{margin:0!important}
.ttb-pg-hero{background:radial-gradient(circle at 92% 10%,rgba(226,183,20,.28) 0,transparent 42%),linear-gradient(135deg,#0b4ab5 0%,#002060 70%);color:#fff;border-radius:22px;padding:1.8rem 2rem!important;box-shadow:0 18px 40px rgba(0,32,96,.18)}
.ttb-pg-hero h2{color:#fff!important;margin:0 0 .4rem!important;font-size:clamp(1.35rem,2.4vw,1.8rem)!important}
.ttb-pg-hero p{color:#dbe5ff;margin:0!important;line-height:1.7}
.ttb-pg-hero p strong{color:#fff}
.ttb-pg-hero .wp-block-buttons{margin-top:1.1rem!important;gap:.6rem}
.ttb-pg-hero .wp-block-button__link{background:var(--wp--preset--color--gold)!important;color:#00143d!important;font-weight:700;border-radius:999px;padding:.7rem 1.4rem;border:2px solid var(--wp--preset--color--gold)}
.ttb-pg-hero .is-style-outline .wp-block-button__link{background:transparent!important;color:#fff!important;border-color:rgba(255,255,255,.65)}
.ttb-pg-hero .wp-block-button__link:hover{filter:brightness(1.06);transform:translateY(-1px)}
.ttb-pg .ttb-panel{box-shadow:0 10px 28px rgba(0,32,96,.08)}
.ttb-pg .ttb-tasklist{grid-template-columns:repeat(auto-fill,minmax(270px,1fr))}
.ttb-pg .ttb-t small{display:block;font-weight:500;font-size:.8rem;color:var(--wp--preset--color--muted);margin-top:.1rem}
.ttb-pg-photos,.ttb-pg-shop{gap:1rem!important}
.ttb-pg-photos img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:16px;box-shadow:0 8px 20px rgba(0,32,96,.12)}
.ttb-pg-shop img{width:100%;border-radius:16px;box-shadow:0 8px 20px rgba(0,32,96,.12);background:#fff}
.ttb-pg-shop figcaption{text-align:center;font-weight:600;color:var(--wp--preset--color--navy)}
.ttb-pg-sub{font-size:clamp(1.2rem,2vw,1.45rem)!important;margin-bottom:-.4rem!important;padding-left:.8rem;border-left:5px solid var(--wp--preset--color--gold)}
.ttb-pg-contact{background:var(--wp--preset--color--gold-soft);border:1px solid #efe0a0;border-radius:18px;padding:1.2rem 1.4rem!important;text-align:center}
.ttb-pg-contact p{margin:0!important;line-height:1.8}
.ttb-pg-note{text-align:center;font-size:.85rem}
.ttb-pg-note a{color:var(--wp--preset--color--muted);text-decoration:none;border:1px dashed #c8cfdc;border-radius:999px;padding:.35rem 1rem}
@media (max-width:640px){.ttb-pg-hero{padding:1.3rem 1.2rem!important;border-radius:18px}.ttb-pg .ttb-tasklist{grid-template-columns:1fr}.ttb-pg-hero .wp-block-button,.ttb-pg-hero .wp-block-button__link{width:100%;text-align:center}}
/* v17: หน้าคำแนะนำแบบขั้นตอน (เช่น payment-guide) */
.ttb-pg-warn{background:linear-gradient(135deg,#fff8dc,#fbf3d2);border:1px solid #efd77a;border-left:6px solid var(--wp--preset--color--gold);border-radius:18px;padding:1.3rem 1.5rem!important}
.ttb-pg-warn h2{margin:0 0 .3rem!important;font-size:clamp(1.2rem,2.2vw,1.55rem)!important;color:#7a5b00!important}
.ttb-pg-warn p{margin:0!important;color:#5c4a12}
ol.ttb-steps{list-style:none;counter-reset:st;padding:0!important;margin:0;display:flex;flex-direction:column;gap:.7rem}
ol.ttb-steps>li{counter-increment:st;position:relative;background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:14px;padding:.95rem 1.1rem .95rem 4rem;line-height:1.75;box-shadow:0 4px 14px rgba(0,32,96,.05)}
ol.ttb-steps>li::before{content:counter(st);position:absolute;left:1rem;top:.9rem;width:2.1rem;height:2.1rem;border-radius:50%;background:linear-gradient(135deg,#0b4ab5,#002060);color:#fff;font-weight:700;display:flex;align-items:center;justify-content:center}
ol.ttb-steps strong{color:var(--wp--preset--color--navy)}
.ttb-pg-alert{background:#fdecee;border:1px solid #f3c4ca;border-left:6px solid #b3263a;border-radius:14px;padding:1rem 1.2rem!important}
.ttb-pg-alert p{margin:0!important;line-height:1.75;color:#5b1520}
.ttb-pg-contacts{gap:1rem!important}
.ttb-pg-card{background:#fff;border:1px solid var(--wp--preset--color--line);border-top:4px solid var(--wp--preset--color--navy);border-radius:16px;padding:1.1rem 1.3rem!important;height:100%;box-sizing:border-box}
.ttb-pg-card h3{margin:0 0 .5rem!important;font-size:1.15rem!important}
.ttb-pg-card h3 small{display:block;font-size:.8rem;font-weight:500;color:var(--wp--preset--color--muted)}
.ttb-pg-card p{margin:0!important;line-height:1.85}
@media (max-width:640px){ol.ttb-steps>li{padding-left:3.4rem}ol.ttb-steps>li::before{left:.75rem}}
/* v18: หน้าเนื้อหาทั่วไป (ติดต่อ, นโยบาย, แผนที่, แบบฟอร์ม, ทุน, ต่างประเทศ, จัดซื้อ) */
.ttb-pg-2col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.2rem}
.ttb-pg-2col>*{margin:0!important}
.ttb-pg-2col .ttb-tasklist{grid-template-columns:1fr!important}
.ttb-pg-toc{background:var(--wp--preset--color--surface);border:1px solid var(--wp--preset--color--line);border-radius:16px;padding:1rem 1.3rem!important}
.ttb-pg-toc p{margin:0 0 .4rem!important}
.ttb-pg-toc ul{margin:0;padding-left:1.2rem;columns:2;column-gap:2rem;line-height:1.9}
.ttb-pg-toc a{text-decoration:none}
.ttb-pg-chips p{display:flex;flex-wrap:wrap;gap:.5rem;margin:0!important}
.ttb-pg-chips a{display:inline-block;background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:999px;padding:.35rem .9rem;font-weight:600;font-size:.9rem}
.ttb-pg-chips a:hover{border-color:var(--wp--preset--color--navy)}
.ttb-pg-sec{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:16px;padding:1.2rem 1.5rem!important;scroll-margin-top:90px}
.ttb-pg-sec h2{font-size:clamp(1.1rem,1.9vw,1.3rem)!important;margin:0 0 .6rem!important;padding-left:.7rem;border-left:4px solid var(--wp--preset--color--gold)}
.ttb-pg-sec p,.ttb-pg-sec li,.ttb-pg-article p{font-size:1rem;line-height:1.85;margin:0 0 .7rem}
.ttb-pg-sec ol,.ttb-pg-sec ul{margin:.2rem 0 .4rem;padding-left:1.4rem}
.ttb-pg-sec li{margin-bottom:.35rem}
ul.ttb-checks{list-style:none;padding-left:0!important}
ul.ttb-checks li{position:relative;padding-left:1.7rem}
ul.ttb-checks li::before{content:"✓";position:absolute;left:0;top:0;color:#0f766e;font-weight:700}
.ttb-pg-callout{background:#eef4ff;border:1px solid #cddcff;border-left:5px solid #0b4ab5;border-radius:12px;padding:.9rem 1.1rem!important;margin-top:.6rem}
.ttb-pg-callout p{margin:0!important}
.ttb-map{border-radius:20px;overflow:hidden;box-shadow:0 14px 34px rgba(0,32,96,.14);border:1px solid var(--wp--preset--color--line);background:#e9eef6}
.ttb-map iframe{display:block;width:100%;height:min(560px,70vh);border:0}
.ttb-pg .wp-block-image img{border-radius:16px;box-shadow:0 8px 22px rgba(0,32,96,.12)}
.ttb-pg .wp-block-image figcaption{text-align:center;color:var(--wp--preset--color--muted);font-size:.88rem}
.ttb-units{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:.9rem}
.ttb-units>*{margin:0!important}
.ttb-unit{background:#fff;border:1px solid var(--wp--preset--color--line);border-top:4px solid var(--wp--preset--color--navy);border-radius:14px;padding:1rem 1.15rem!important}
.ttb-unit h3{font-size:1.02rem!important;margin:0 0 .45rem!important;line-height:1.45}
.ttb-unit p{margin:0!important;font-size:.92rem;line-height:1.85;word-break:break-word}
.ttb-u-note{display:block;color:var(--wp--preset--color--muted);font-size:.84rem;line-height:1.5;margin-bottom:.25rem}
.ttb-pg-sub{scroll-margin-top:90px}
.ttb-pg-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.9rem}
.ttb-pg-gallery>*{margin:0!important}
.ttb-pg-gallery img{width:100%;aspect-ratio:4/3;object-fit:cover}
.ttb-pg-article{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:18px;padding:1.4rem 1.6rem!important}
.ttb-pg-article h2{font-size:clamp(1.15rem,2vw,1.4rem)!important;line-height:1.5;margin:0 0 1rem!important}
.ttb-pg-article .ttb-pg-gallery{margin:0 0 1.1rem!important}
.ttb-pg-kicker{display:inline-block;margin:0 0 .5rem!important;font-size:.82rem!important;font-weight:700;color:#7a5b00;background:var(--wp--preset--color--gold-soft);border-radius:999px;padding:.15rem .8rem}
.ttb-pg-en p{font-size:.97rem}
.ttb-doc-table{margin:0!important;background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:16px;overflow:hidden}
.ttb-doc-table table{border-collapse:collapse;width:100%}
.ttb-doc-table th{background:var(--wp--preset--color--navy);color:#fff;text-align:left;padding:.75rem 1rem;font-size:.92rem;border:0}
.ttb-doc-table th:last-child,.ttb-doc-table td:last-child{text-align:right;white-space:nowrap;width:1%}
.ttb-doc-table td{padding:.9rem 1rem;border:0;border-top:1px solid var(--wp--preset--color--line);vertical-align:middle;line-height:1.7}
.ttb-doc-table tr:nth-child(even) td{background:#f8fafd}
.ttb-doc-table .ttb-date{color:var(--wp--preset--color--muted);font-size:.85rem}
.ttb-doc-table td a{display:inline-block;background:var(--wp--preset--color--navy);color:#fff;text-decoration:none;border-radius:999px;padding:.4rem 1rem;font-size:.88rem;font-weight:600}
.ttb-doc-table td a:hover{background:#0b4ab5}
@media (max-width:782px){.ttb-pg-2col{grid-template-columns:1fr}.ttb-pg-toc ul{columns:1}.ttb-pg-sec,.ttb-pg-article{padding:1rem 1.1rem!important}.ttb-doc-table td{display:block;text-align:left!important;width:auto!important;border-top:0}.ttb-doc-table tr td:first-child{border-top:1px solid var(--wp--preset--color--line)}.ttb-doc-table thead{display:none}}
/* v19: อัลบั้มรายเดือน, สมาชิกกิตติมศักดิ์, วิดีโอ, คำพูด, ตารางข่าว, คลังข่าว, รายการประกาศ */
.ttb-months{list-style:none;padding:0!important;margin:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:.8rem}
.ttb-mo{margin:0}
.ttb-mo a,.ttb-mo-empty{display:flex;flex-direction:column;gap:.15rem;height:100%;box-sizing:border-box;padding:1rem 1.1rem;border-radius:16px;text-decoration:none;background:linear-gradient(150deg,#0b4ab5 0%,#002060 85%);color:#fff;box-shadow:0 8px 20px rgba(0,32,96,.16);transition:transform .15s,box-shadow .15s;position:relative;overflow:hidden}
.ttb-mo a::after{content:"";position:absolute;right:-18px;top:-18px;width:70px;height:70px;border-radius:50%;background:rgba(226,183,20,.25)}
.ttb-mo a:hover{transform:translateY(-3px);box-shadow:0 14px 28px rgba(0,32,96,.22)}
.ttb-mo-m{font-size:1.2rem;font-weight:700;line-height:1.3}
.ttb-mo-y{font-size:.85rem;opacity:.85}
.ttb-mo-go{margin-top:.55rem;font-size:.82rem;font-weight:700;color:var(--wp--preset--color--gold)}
.ttb-mo-go::after{content:" →"}
.ttb-mo-empty{background:var(--wp--preset--color--surface);color:var(--wp--preset--color--muted);box-shadow:none;border:1px dashed #c8cfdc}
.ttb-mo-empty .ttb-mo-go{color:var(--wp--preset--color--muted)}
.ttb-mo-empty .ttb-mo-go::after{content:""}
mark.ttb-new{background:var(--wp--preset--color--gold);color:#00143d;border-radius:999px;padding:0 .45rem;font-size:.7rem;font-weight:700;margin-left:.3rem}
.ttb-hm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1.1rem}
.ttb-hm-grid>*{margin:0!important}
.ttb-hm-card{background:#fff;border:1px solid var(--wp--preset--color--line);border-top:4px solid var(--wp--preset--color--gold);border-radius:18px;padding:1rem!important;text-align:center;box-shadow:0 8px 22px rgba(0,32,96,.07)}
.ttb-hm-card .wp-block-image{margin:0 0 .8rem!important}
.ttb-hm-card .wp-block-image img{width:100%;height:auto;border-radius:12px;box-shadow:none!important}
.ttb-hm-card .wp-block-image+.wp-block-heading+p+.wp-block-image img{max-height:120px;width:auto;margin:0 auto;display:block}
.ttb-hm-card h3{font-size:1rem!important;line-height:1.55;margin:0 0 .4rem!important}
.ttb-hm-card p{margin:0!important;font-size:.88rem;color:var(--wp--preset--color--muted);line-height:1.7}
.ttb-hm-role{color:var(--wp--preset--color--navy);font-weight:600}
.ttb-video{position:relative;aspect-ratio:16/9;border-radius:20px;overflow:hidden;box-shadow:0 14px 34px rgba(0,32,96,.16);background:#000}
.ttb-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.ttb-pg-quote{background:#fff;border:1px solid var(--wp--preset--color--line);border-left:6px solid var(--wp--preset--color--gold);border-radius:18px;padding:1.6rem 1.8rem!important}
.ttb-pg-quote p{font-size:clamp(1.05rem,1.8vw,1.25rem);line-height:2;color:var(--wp--preset--color--navy);margin:0!important}
.ttb-pg-article h3{font-size:1.15rem!important;margin:1.4rem 0 .6rem!important;padding-left:.7rem;border-left:4px solid var(--wp--preset--color--gold)}
.ttb-pg-article .wp-block-image{margin:.4rem auto 1.2rem!important;text-align:center}
.ttb-pg-article .wp-block-image img{max-width:100%;width:auto;max-height:520px}
.ttb-pg-card h3 small{display:block}
ul.ttb-rowlist{list-style:none;padding:0!important;margin:0}
ul.ttb-rowlist li{padding:.55rem 0;border-bottom:1px solid var(--wp--preset--color--line);font-size:.95rem}
ul.ttb-rowlist li:last-child{border-bottom:0}
ul.ttb-rowlist li::before{content:"📘";margin-right:.5rem}
.ttb-pg-callout-ok{background:#ecfdf5;border-color:#b7ebd3;border-left-color:#0f766e}
.ttb-news-table td:first-child span{display:inline-block;margin-left:.6rem;color:var(--wp--preset--color--muted);font-size:.84rem}
.ttb-doc-table td a.ttb-fmt,.ttb-arch a.ttb-fmt{display:inline-block;margin-left:.35rem;background:var(--wp--preset--color--navy);color:#fff;text-decoration:none;border-radius:999px;padding:.32rem .9rem;font-size:.82rem;font-weight:600}
.ttb-doc-table td a.ttb-fmt+a.ttb-fmt,.ttb-arch a.ttb-fmt+a.ttb-fmt{background:var(--wp--preset--color--gold);color:#00143d}
.ttb-arch{list-style:none;padding:0!important;margin:0 0 1rem;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:.5rem}
.ttb-arch li{display:flex;align-items:center;gap:.2rem;background:var(--wp--preset--color--surface);border:1px solid var(--wp--preset--color--line);border-radius:12px;padding:.5rem .7rem}
.ttb-arch-m{font-weight:700;min-width:3rem;color:var(--wp--preset--color--navy)}
.ttb-pg-archive h3{font-size:1.05rem!important;margin:1rem 0 .6rem!important}
.ttb-annlist .wp-block-post-template{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.6rem}
.ttb-annrow{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:14px;padding:.85rem 1.1rem!important;gap:1rem!important;box-shadow:0 4px 12px rgba(0,32,96,.04);transition:border-color .15s,box-shadow .15s}
.ttb-annrow:hover{border-color:#b9c6e4;box-shadow:0 8px 20px rgba(0,32,96,.08)}
.ttb-annrow-date{flex:0 0 auto;min-width:6.5rem;text-align:center;background:var(--wp--preset--color--gold-soft);color:#7a5b00;font-weight:700;border-radius:10px;padding:.45rem .6rem;font-size:.85rem!important}
.ttb-annrow-body{gap:.15rem!important;min-width:0}
.ttb-annrow-body h2{font-size:1rem!important;line-height:1.55;margin:0!important;font-weight:600}
.ttb-annrow-body h2 a{text-decoration:none;color:var(--wp--preset--color--ink)}
.ttb-annrow-body h2 a:hover{color:var(--wp--preset--color--navy)}
.ttb-annrow-body .wp-block-post-terms{font-size:.8rem;margin:0}
.ttb-annrow-body .wp-block-post-terms a{color:var(--wp--preset--color--muted);text-decoration:none}
.ttb-annlist .wp-block-query-pagination{margin-top:1.5rem}
@media (max-width:640px){.ttb-annrow{flex-wrap:wrap!important}.ttb-annrow-date{min-width:0}.ttb-months{grid-template-columns:repeat(2,1fr)}}
.wp-block-post-content>.ttb-pg-hero{margin-bottom:1.6rem!important}
/* v20: หน้าเนื้อหาเดิมจาก Joomla (อัลบั้ม/บทความ), หน้าว่าง, แกลเลอรีใหญ่, กล่องรายการ */
.ttb-legacy{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:18px;padding:1.4rem 1.6rem;line-height:1.85;overflow:hidden}
.ttb-legacy *{max-width:100%;box-sizing:border-box}
.ttb-legacy [style*="font-family"]{font-family:inherit!important}
.ttb-legacy [style*="font-size"]{font-size:inherit!important}
.ttb-legacy p{margin:0 0 .8rem}
.ttb-legacy p:empty,.ttb-legacy div:empty{display:none}
.ttb-legacy img{height:auto!important;border-radius:12px;margin:.3rem auto}
.ttb-legacy table{width:100%!important;border-collapse:collapse}
.ttb-legacy td,.ttb-legacy th{padding:.4rem;vertical-align:top}
.ttb-legacy iframe{width:100%!important;aspect-ratio:16/9;height:auto!important;border:0;border-radius:12px}
@media (max-width:640px){.ttb-legacy{padding:1rem}.ttb-legacy table,.ttb-legacy tbody,.ttb-legacy tr,.ttb-legacy td{display:block;width:100%!important}}
.ttb-pg-empty{text-align:center;background:#fff;border:1px dashed #c8cfdc;border-radius:18px;padding:2.2rem 1.4rem!important}
.ttb-pg-empty h3{margin:0 0 .6rem!important;color:var(--wp--preset--color--muted)!important;font-size:1.2rem!important}
.ttb-pg-empty p{margin:.3rem 0!important;color:var(--wp--preset--color--muted)}
.ttb-pg-gallery-lg{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.ttb-pg .ttb-box{border-top:4px solid var(--wp--preset--color--navy);border-radius:16px;padding:1.2rem 1.4rem!important;margin:0!important}
.ttb-pg .ttb-box-title{padding-left:.7rem;border-left:4px solid var(--wp--preset--color--gold);margin:0 0 .6rem!important}
.ttb-pg .ttb-linklist li:nth-child(even){background:#f8fafd}
.ttb-pg .ttb-linklist li{padding:.7rem .6rem;border-radius:8px}
/* v21: ผู้ใช้ออนไลน์ในสถิติ + โปสเตอร์ไม่ถูกตัดขอบ */
.ttb-counter-online i{display:inline-block;width:.55rem;height:.55rem;border-radius:50%;background:#22c55e;margin-right:.35rem;box-shadow:0 0 0 3px rgba(34,197,94,.25);vertical-align:middle;animation:ttbpulse 2s infinite}
@keyframes ttbpulse{50%{box-shadow:0 0 0 6px rgba(34,197,94,0)}}
.ttb-pg-photos figure:has(a) img{aspect-ratio:auto!important;object-fit:contain!important;height:auto!important;background:#fff}
.ttb-pg-photos{align-items:flex-start!important}
/* v22: รายการข่าวประชาสัมพันธ์ (รูปเล็กด้านซ้าย) */
.ttb-newslist .wp-block-post-template{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.9rem}
.ttb-newsrow{background:#fff;border:1px solid var(--wp--preset--color--line);border-radius:16px;padding:.8rem!important;gap:1.1rem!important;box-shadow:0 4px 14px rgba(0,32,96,.05);transition:box-shadow .15s,border-color .15s}
.ttb-newsrow:hover{border-color:#b9c6e4;box-shadow:0 10px 24px rgba(0,32,96,.1)}
.ttb-newsrow-img{flex:0 0 240px;width:240px;margin:0!important}
.ttb-newsrow-img img{border-radius:12px;width:100%;height:100%;object-fit:cover}
.ttb-newsrow-body{gap:.25rem!important;min-width:0;padding:.2rem .2rem 0 0}
.ttb-newsrow-body .wp-block-post-date{font-size:.82rem;color:var(--wp--preset--color--muted)}
.ttb-newsrow-body h2{font-size:1.08rem!important;line-height:1.55;margin:0!important;font-weight:600}
.ttb-newsrow-body h2 a{text-decoration:none;color:var(--wp--preset--color--ink)}
.ttb-newsrow-body h2 a:hover{color:var(--wp--preset--color--navy)}
.ttb-newsrow-body .wp-block-post-excerpt{margin:0;font-size:.9rem;color:var(--wp--preset--color--muted);line-height:1.65}
.ttb-newsrow-body .wp-block-post-excerpt__more-text{display:none}
.ttb-newslist .wp-block-query-pagination{margin-top:1.5rem}
@media (max-width:640px){.ttb-newsrow{flex-wrap:wrap!important}.ttb-newsrow-img{flex-basis:100%;width:100%}}
/* v23: เมนูจอขนาดกลาง, แบนเนอร์ไว้อาลัยเตี้ยลง */
@media (min-width:783px) and (max-width:1180px){.ttb-header .wp-block-navigation{font-size:.88rem}.ttb-header .wp-block-navigation .wp-block-navigation__container{gap:.85rem!important}}
.ttb-mourn-track{max-height:300px}
.ttb-mourn-slide{object-fit:contain}
/* v24: จัดหน้าแรกใหม่ — บริการขึ้นก่อน หัวข้อส่วนแบบเดียวกันทั้งหน้า */
.ttb-tasks-wrap.ttb-tasks-top{margin:0!important;background:#f3f5f9;border-bottom:1px solid var(--wp--preset--color--line);padding:2.4rem var(--wp--style--root--padding-right,1rem) 2.6rem var(--wp--style--root--padding-left,1rem)!important}
.ttb-sec-head{margin-top:0!important;margin-bottom:1.3rem!important;text-align:left}
.wp-block-group:has(>.ttb-links){grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr))!important}
.ttb-sec-head .ttb-section-title{margin:0!important}
.ttb-sec-sub{margin:.35rem 0 0!important;color:var(--wp--preset--color--muted);font-size:1rem}
.ttb-tasks-top .ttb-panel{box-shadow:0 6px 22px rgba(0,32,96,.07)}
.ttb-sec-hl{padding-bottom:.5rem}
main>.wp-block-group:has(.ttb-features){padding-bottom:var(--wp--preset--spacing--60)!important}
@media (max-width:600px){.ttb-tasks-wrap.ttb-tasks-top{padding-top:1.6rem!important;padding-bottom:1.8rem!important}.ttb-sec-sub{font-size:.9rem}}
/* v25: แถบการ์ดรูปภาพไม่มีหัวข้อ — พื้นหลังอ่อนแยกส่วน */
main>.wp-block-group:has(.ttb-features){margin-top:var(--wp--preset--spacing--60)!important;border-top:1px solid var(--wp--preset--color--line);padding-top:var(--wp--preset--spacing--60)!important}
/* v26: บริการออนไลน์แบบแท็บ — เตี้ยลง แสดงทีละกลุ่ม */
.ttb-tabbed .ttb-sec-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:.3rem 1rem}
.ttb-tabbar{display:flex;gap:.5rem;margin:0 auto 0!important;max-width:1200px;position:relative;z-index:1}
.ttb-tab{flex:0 1 auto;display:flex;align-items:center;gap:.55rem;padding:.7rem 1.3rem .75rem;border:1px solid var(--wp--preset--color--line);border-bottom:0;border-radius:14px 14px 0 0;background:#e8ecf4;color:#4a5670;font:inherit;font-weight:700;font-size:1rem;cursor:pointer;transition:background .15s,color .15s}
.ttb-tab::before{content:"";width:28px;height:28px;border-radius:8px;flex:0 0 28px;background:var(--ico) center/17px no-repeat,#8d99b3}
.ttb-tab:hover{background:#dde3ef;color:var(--wp--preset--color--ink)}
.ttb-tab.is-on{background:#fff;color:var(--wp--preset--color--navy);box-shadow:0 -4px 12px rgba(0,32,96,.05)}
.ttb-tab-student.is-on::before{background:var(--ico) center/17px no-repeat,linear-gradient(135deg,#0b4ab5 0%,#002060 100%)}
.ttb-tab-member.is-on{color:#8a1c2c}.ttb-tab-member.is-on::before{background:var(--ico) center/17px no-repeat,linear-gradient(135deg,#b3263a 0%,#6e1422 100%)}
.ttb-tab-public.is-on{color:#0f766e}.ttb-tab-public.is-on::before{background:var(--ico) center/17px no-repeat,linear-gradient(135deg,#14907f 0%,#064e48 100%)}
.ttb-tab:focus-visible{outline:3px solid var(--wp--preset--color--gold);outline-offset:-3px}
.ttb-tabbed .ttb-tasks{display:block!important}
.ttb-tabbed .ttb-panel.is-hidden{display:none!important}
.ttb-tabbed .ttb-panel{border-top-left-radius:0;border-top-width:4px;padding:1.1rem 1.3rem 1.3rem!important;box-shadow:0 10px 30px rgba(0,32,96,.08)}
.ttb-tabbed .ttb-panel-head{border-bottom:0!important;padding-bottom:0!important;margin-bottom:.8rem!important;align-items:center!important}
.ttb-tabbed .ttb-panel-head h2{font-size:1rem!important;color:var(--wp--preset--color--muted);font-weight:500}
.ttb-tabbed .ttb-panel-head h2::before{display:none!important}
.ttb-tabbed .ttb-panel-head h2 span{display:block}
.ttb-tabbed .ttb-panel-head h2 span>small{display:none}
.ttb-tabbed .ttb-tasklist{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:.6rem}
@media (max-width:1000px){.ttb-tabbed .ttb-tasklist{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:600px){
.ttb-tabbar{gap:.3rem}
.ttb-tab{flex:1 1 0;justify-content:center;flex-direction:column;gap:.3rem;padding:.6rem .3rem;font-size:.86rem;border-radius:12px 12px 0 0}
.ttb-tab::before{width:30px;height:30px;flex-basis:30px}
.ttb-tabbed .ttb-panel{padding:.9rem .8rem 1rem!important;border-top-right-radius:0}
.ttb-tabbed .ttb-panel-head h2{display:none!important}
.ttb-tabbed .ttb-panel-head{justify-content:flex-end!important;margin-bottom:.6rem!important}
}
.ttb-tabbed .ttb-tasks{margin-top:0!important}
@media (max-width:600px){.ttb-tabbed .ttb-t a{flex-direction:row;align-items:center;padding:.55rem .55rem;gap:.5rem;font-size:.84rem;min-height:3.6rem}.ttb-tabbed .ttb-t a::before{flex:0 0 30px;width:30px;height:30px;background-size:18px,auto}}
/* v27: ปุ่ม "เกี่ยวกับการศึกษา / หน้าทะเบียนสมาชิก / หน้า ส.ช.น." ให้เด่นขึ้น */
.ttb-tabbed .ttb-panel-more{font-size:1rem}
.ttb-tabbed .ttb-panel-more a{display:inline-flex;align-items:center;gap:.35rem;padding:.55rem 1.2rem;border-radius:999px;background:#002060;color:#fff!important;font-weight:700;box-shadow:0 6px 16px rgba(0,32,96,.22);transition:transform .15s,box-shadow .15s}
.ttb-tabbed .ttb-panel-more a:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(0,32,96,.28)}
.ttb-tabbed .ttb-panel-member .ttb-panel-more a{background:#8a1c2c;box-shadow:0 6px 16px rgba(138,28,44,.25)}
.ttb-tabbed .ttb-panel-public .ttb-panel-more a{background:#0f766e;box-shadow:0 6px 16px rgba(15,118,110,.25)}
@media (max-width:600px){.ttb-tabbed .ttb-panel-more{width:100%}.ttb-tabbed .ttb-panel-more a{display:flex;justify-content:center;width:100%;box-sizing:border-box;padding:.7rem 1rem}}
/* v28: โครงการพิเศษ แสดงได้ถึง 4 โครงการ (2 x 2) */
.ttb-sp-head{margin-bottom:var(--wp--preset--spacing--30)!important}
.ttb-special .wp-block-post-template{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:1rem!important}
@media (max-width:860px){.ttb-special .wp-block-post-template{grid-template-columns:1fr!important}}
@media (max-width:600px){.ttb-special-card{flex-wrap:wrap!important}.ttb-special-card .wp-block-post-featured-image{flex-basis:100%!important}.ttb-special-card .wp-block-post-featured-image img{width:100%!important}}
/* v29: โครงการพิเศษอยู่ใต้บริการออนไลน์ — หน้าตาเหมือนส่วนอื่น */
/* v30: ช่องทาง Facebook / YouTube ในส่วนท้าย */
.ttb-social{margin-top:1rem}
.ttb-social-label{display:block;font-size:.85rem;color:rgba(255,255,255,.7);margin-bottom:.5rem}
.ttb-social-row{display:flex;gap:.6rem}
.ttb-footer a.ttb-soc{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.1);color:#fff;transition:background .15s,transform .15s}
.ttb-footer a.ttb-soc:hover{transform:translateY(-2px);color:#fff}
.ttb-footer a.ttb-soc-fb:hover{background:#1877f2}
.ttb-footer a.ttb-soc-yt:hover{background:#ff0000}
/* v31: Facebook / YouTube ที่หัวเว็บ ก่อนช่องค้นหา (จอเล็กแสดงที่ส่วนท้ายแทน) */
.ttb-head-social{display:flex;gap:.4rem;margin:0 .2rem 0 auto!important;flex:0 0 auto}
.ttb-hsoc{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.28);color:#fff!important;transition:background .15s,transform .15s}
.ttb-hsoc svg{width:19px;height:19px}
.ttb-hsoc:hover{transform:translateY(-1px)}
.ttb-hsoc.ttb-soc-fb:hover{background:#1877f2;border-color:#1877f2}
.ttb-hsoc.ttb-soc-yt:hover{background:#ff0000;border-color:#ff0000}
.ttb-header .ttb-bar>.ttb-head-social+.ttb-head-search{margin-left:.5rem!important}
.ttb-footer .ttb-social{display:none}
@media (max-width:781px){.ttb-head-social{display:none}.ttb-footer .ttb-social{display:block}}
