/* Hanuman Theme — หน้าเว็บ (เล็กโดยตั้งใจ · ค่าสี/ฟอนต์อยู่ใน theme.json) */

/* 1.18.2 ความกว้างรวมขอบทั้งเว็บ (border-box) เหมือน Kadence/Astra — ปลั๊กอินที่ทำบนธีมคลาสสิก (เช่น การ์ด PropWorks 3 คอลัมน์) คิดขนาดตรงกัน */
html { box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }
/* ชิ้นของธีมที่ออกแบบขนาดแบบไม่รวมขอบไว้ — คงขนาดเดิม */
.hnth-topbar-in, .hnth-topbar a, .hnth-contact a, .hnth-nav--footer .hnth-menu a { box-sizing: content-box; }

/* แถบสามสีด้านบน (แดง/เขียว/ฟ้าเหล็ก) + เส้นใต้หัว */
.wp-site-blocks > header.wp-block-template-part {
	position: relative;
	z-index: 50;
	background: var(--wp--preset--color--base);
	border-top: 4px solid transparent;
	border-image: linear-gradient(90deg, var(--wp--preset--color--brand-red) 0 33.4%, var(--wp--preset--color--secondary) 33.4% 66.7%, #5B7C99 66.7% 100%) 1;
	box-shadow: 0 1px 0 var(--wp--preset--color--line);
	transition: transform .25s ease, box-shadow .2s ease;
}
.hnth-header { transition: padding .2s ease; }
.hnth-brand { gap: .65rem; min-width: 0; }
.hnth-brand .wp-block-site-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hnth-brand .custom-logo { transition: width .2s ease, height .2s ease; }
.hnth-header-nav { gap: 1.25rem; }
.hnth-header-cta .wp-block-button__link { white-space: nowrap; }

/* Sticky header — โหมดจาก body class (ตั้งค่าในเมนู Theme) */
@media (min-width: 782px) {
	body.hnth-sd-always .wp-site-blocks > header.wp-block-template-part,
	body.hnth-sd-smart .wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
	}
	body.hnth-sd-smart.hnth-hide-header .wp-site-blocks > header.wp-block-template-part { transform: translateY(-110%); }
}
@media (max-width: 781px) {
	body.hnth-sm-always .wp-site-blocks > header.wp-block-template-part,
	body.hnth-sm-smart .wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: 0;
	}
	/* แถบแอดมินบนจอ ≥600px ติดอยู่กับที่ */
	@media (min-width: 600px) {
		body.admin-bar.hnth-sm-always .wp-site-blocks > header.wp-block-template-part,
		body.admin-bar.hnth-sm-smart .wp-site-blocks > header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 0px); }
	}
	body.hnth-sm-smart.hnth-hide-header .wp-site-blocks > header.wp-block-template-part { transform: translateY(-110%); }
	.hnth-header .hnth-header-cta .wp-block-button__link { padding: .4em .8em !important; font-size: .875rem; }
	.hnth-header-nav { gap: .75rem; }
}
/* หัวย่อเมื่อเลื่อน */
body.hnth-shrink.hnth-scrolled .wp-site-blocks > header.wp-block-template-part { box-shadow: 0 6px 18px rgba(1, 45, 83, .10); }
body.hnth-shrink.hnth-scrolled .hnth-header { padding-top: .35rem !important; padding-bottom: .35rem !important; }
body.hnth-shrink.hnth-scrolled .hnth-brand .custom-logo, body.hnth-shrink.hnth-scrolled .hnth-brand .wp-block-site-logo img { height: 34px !important; width: auto !important; max-width: 160px; }
@media (prefers-reduced-motion: reduce) {
	.wp-site-blocks > header.wp-block-template-part, .hnth-header, .hnth-brand .custom-logo { transition: none; }
}
/* ลิงก์ในหน้าไม่จมใต้หัวที่ติดอยู่ */
html { scroll-padding-top: calc(var(--wp--custom--header-height, 72px) + 12px); }

/* การ์ดบทความ */
.hnth-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius, 14px);
	overflow: hidden;
	height: 100%;
}
.hnth-card .wp-block-post-featured-image { margin: 0; }
.hnth-card .wp-block-post-featured-image img { display: block; width: 100%; object-fit: cover; }
.hnth-card .wp-block-post-title a { text-decoration: none; }
.hnth-card .wp-block-post-excerpt__excerpt { margin: 0; color: var(--wp--preset--color--muted); }

/* หัวข้อมีขีดสีรอง 4px (แบบการ์ดของกลุ่ม Hanuman) */
.hnth-title-bar { border-left: 4px solid var(--wp--preset--color--secondary); padding-left: .65rem; }
.hnth-feature {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--wp--custom--radius, 14px);
	padding: 1.25rem 1.25rem .5rem;
}

/* ส่วนเปิดหน้า */
.hnth-hero { position: relative; overflow: hidden; }
.hnth-hero-art img { max-width: 320px; margin-inline: auto; display: block; opacity: .9; }
@media (max-width: 781px) { .hnth-hero-art img { max-width: 180px; opacity: .45; } }

/* ส่วนท้าย */
.hnth-footer { color: #e6eef6; }
.hnth-footer .wp-block-navigation a { color: #d6e3ef; }
.hnth-footer .wp-block-navigation a:hover { color: #fff; }
.hnth-footer .hnth-footer-cols { gap: 2rem; }

/* บล็อกติดต่อ + เครดิต */
.hnth-contact { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
.hnth-contact--stack { flex-direction: column; align-items: flex-start; }
.hnth-contact a {
	display: inline-flex; align-items: center; gap: .5rem;
	min-height: 44px; padding: .45rem 1rem; border-radius: 10px;
	font-weight: 700; text-decoration: none; line-height: 1.2;
}
.hnth-contact .is-line { background: var(--wp--preset--color--line-green); background: color-mix(in srgb, var(--wp--preset--color--line-green) 68%, #000); color: #fff; } /* 1.18.3 เข้มขึ้นให้ตัวขาวอ่านง่าย (≥4.5:1) */
.hnth-contact .is-phone { background: var(--wp--preset--color--secondary); color: #fff; }
.hnth-contact .is-mail { background: transparent; color: inherit; border: 1px solid currentColor; }
.hnth-contact.hnth-contact--stack a { padding: .35rem 0; min-height: 36px; background: none; color: inherit; border: 0; }
.hnth-contact svg { width: 18px; height: 18px; flex: none; }
.hnth-credit { font-size: .8125rem; color: #b9cadb; line-height: 1.6; }
.hnth-credit a { color: #d6e3ef; }
.hnth-credit .hnth-powered { display: block; margin-top: .25rem; opacity: .9; }

/* ปุ่มกลับขึ้นบน */
.hnth-top {
	position: fixed; right: 16px; bottom: 16px; z-index: 40;
	width: 44px; height: 44px; border-radius: 50%; border: 0;
	background: var(--wp--preset--color--primary); color: #fff;
	display: grid; place-items: center; cursor: pointer;
	opacity: 0; visibility: hidden; transition: opacity .2s ease;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}
.hnth-top.is-on { opacity: 1; visibility: visible; }
.hnth-top:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; }

/* หน้าแอปของปลั๊กอิน (เต็มจอ) */
.hnth-app { margin: 0; padding: 0; }

/* ตัวอย่างในตัวแก้ไข (กฎ 13) */
.hn-design-preview { position: relative; }
.hnth-preview-badge { display: inline-block; font-size: 11px; background: #FFF4E5; color: #B45309; border-radius: 6px; padding: 1px 6px; margin-bottom: 4px; }

/* อ่านง่ายบนมือถือ */
@media (max-width: 600px) {
	.hnth-meta { gap: .35rem .75rem; }
	.hnth-footer .hnth-footer-cols { gap: 1.25rem; }
}
/* ตัวแก้ไข: ลิงก์ในตัวอย่างบล็อกของเราแตะแล้วไม่พาไปไหน (เลือกบล็อกได้ตามปกติ) */
.editor-styles-wrapper .hn-design-preview a { pointer-events: none; cursor: default; }
/* ส่วนเต็มจอที่ต่อกันไม่มีช่องว่าง */
.wp-block-post-content > .alignfull + .alignfull { margin-block-start: 0; }

/* ===================== 1.1.0 · เมนู ===================== */
.hnth-header-row { gap: 1rem; }
.hnth-header-row > .hnth-nav--primary { flex: 1 1 auto; min-width: 0; }
.hnth-nav { display: flex; align-items: center; justify-content: var(--hnth-menu-justify, flex-end); position: relative; }
.hnth-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem var(--hnth-menu-gap, 24px); }
.hnth-nav.is-vertical, .hnth-nav.is-vertical .hnth-menu { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .35rem; }
.hnth-menu li { position: relative; display: flex; align-items: center; flex-wrap: wrap; }
.hnth-menu a { color: var(--hnth-menu-color); font-size: var(--hnth-menu-size, 16px); font-weight: var(--hnth-menu-weight, 700); text-decoration: none; line-height: 1.3; padding: .45rem 0; display: inline-block; }
.hnth-menu a { min-width: 24px; min-height: 24px; } /* 1.19.1 WCAG 2.5.8 ขนาดเป้ากดอย่างน้อย 24×24 (เช่นเมนูสั้น "3D") */
.hnth-menu a:hover, .hnth-menu a:focus-visible, .hnth-menu .current-menu-item > a, .hnth-menu .current-menu-ancestor > a { color: var(--hnth-menu-hover); }
.hnth-menu a:focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 2px; border-radius: 4px; }
body.hnth-ind-underline .hnth-nav--primary .hnth-menu > .current-menu-item > a,
body.hnth-ind-underline .hnth-nav--primary .hnth-menu > .current-menu-ancestor > a { box-shadow: inset 0 -3px 0 var(--hnth-menu-hover); }
body.hnth-ind-pill .hnth-nav--primary .hnth-menu > li > a { padding: .4rem .8rem; border-radius: 999px; }
body.hnth-ind-pill .hnth-nav--primary .hnth-menu > .current-menu-item > a { background: color-mix(in srgb, var(--hnth-menu-hover) 14%, transparent); }
.hnth-sub-toggle { background: none; border: 0; color: inherit; cursor: pointer; width: 28px; height: 32px; display: inline-grid; place-items: center; padding: 0; margin-left: -2px; }
.hnth-sub-toggle svg { transition: transform .15s ease; color: var(--hnth-menu-color); }
.hnth-menu li.is-open > .hnth-sub-toggle svg { transform: rotate(180deg); }
/* เมนูย่อย */
.hnth-menu .sub-menu { list-style: none; margin: 0; padding: .4rem; position: absolute; top: 100%; left: -.5rem; z-index: 60;
	min-width: var(--hnth-dd-width, 240px); background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px; box-shadow: 0 16px 36px rgba(1, 45, 83, .14); display: none; flex-direction: column; gap: 0; }
.hnth-menu .sub-menu .sub-menu { top: -.4rem; left: 100%; }
.hnth-menu .sub-menu li { width: 100%; justify-content: space-between; }
.hnth-menu .sub-menu a { padding: .5rem .7rem; width: 100%; font-size: calc(var(--hnth-menu-size, 16px) - 1px); font-weight: 400; border-radius: 8px; }
.hnth-menu .sub-menu a:hover { background: var(--wp--preset--color--surface); }
.hnth-menu .sub-menu .hnth-sub-toggle { position: absolute; right: 4px; top: 4px; }
.hnth-menu .sub-menu .hnth-sub-toggle svg { transform: rotate(-90deg); }
@media (hover: hover) {
	.hnth-menu li:hover > .sub-menu, .hnth-menu li:focus-within > .sub-menu { display: flex; }
}
.hnth-menu li.is-open > .sub-menu { display: flex; }
/* Mega menu */
.hnth-menu > li.hnth-mega { position: static; }
.hnth-nav--primary { position: static; }
.hnth-header-row { position: relative; }
.hnth-menu > li.hnth-mega > .sub-menu { left: 0; right: 0; top: 100%; min-width: 0; padding: 1.25rem; display: none; grid-gap: 1rem 1.5rem; }
@media (hover: hover) { .hnth-menu > li.hnth-mega:hover > .sub-menu, .hnth-menu > li.hnth-mega:focus-within > .sub-menu { display: grid; } }
.hnth-menu > li.hnth-mega.is-open > .sub-menu { display: grid; }
.hnth-mega-2 > .sub-menu { grid-template-columns: repeat(2, 1fr); }
.hnth-mega-3 > .sub-menu { grid-template-columns: repeat(3, 1fr); }
.hnth-mega-4 > .sub-menu { grid-template-columns: repeat(4, 1fr); }
.hnth-menu > li.hnth-mega > .sub-menu > li { flex-direction: column; align-items: flex-start; }
.hnth-menu > li.hnth-mega > .sub-menu > li > a { font-weight: 700; color: var(--wp--preset--color--primary); border-bottom: 2px solid var(--wp--preset--color--line); border-radius: 0; }
.hnth-menu > li.hnth-mega > .sub-menu .sub-menu { position: static; display: flex; box-shadow: none; border: 0; padding: .25rem 0 0; min-width: 0; }
.hnth-menu > li.hnth-mega > .sub-menu .hnth-sub-toggle { display: none; }
/* รายการเป็นปุ่ม */
.hnth-menu .hnth-item-btn > a { padding: .5rem 1.1rem !important; border-radius: 10px; box-shadow: none !important; }
.hnth-menu .hnth-item-btn--solid > a { background: var(--wp--preset--color--secondary); color: #fff !important; }
.hnth-menu .hnth-item-btn--solid > a:hover { background: var(--wp--preset--color--primary); }
.hnth-menu .hnth-item-btn--outline > a { border: 2px solid currentColor; }
/* ปุ่มเมนู + จุดสลับ */
.hnth-burger { display: none; width: 44px; height: 44px; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; background: transparent; cursor: pointer; place-items: center; color: var(--hnth-menu-color); }
.hnth-burger-i, .hnth-burger-i::before, .hnth-burger-i::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; content: ""; }
.hnth-burger-i::before { position: absolute; top: -6px; } .hnth-burger-i::after { position: absolute; top: 6px; }
.hnth-nav--burger-always > .hnth-menu { display: none; }
.hnth-nav--burger-always > .hnth-burger { display: grid; }
@media (max-width: 781px) { body.hnth-bp-782 .hnth-nav--burger-auto > .hnth-menu { display: none; } body.hnth-bp-782 .hnth-nav--burger-auto > .hnth-burger { display: grid; } }
@media (max-width: 1023px) { body.hnth-bp-1024 .hnth-nav--burger-auto > .hnth-menu { display: none; } body.hnth-bp-1024 .hnth-nav--burger-auto > .hnth-burger { display: grid; } }
@media (max-width: 1199px) { body.hnth-bp-1200 .hnth-nav--burger-auto > .hnth-menu { display: none; } body.hnth-bp-1200 .hnth-nav--burger-auto > .hnth-burger { display: grid; } }
.hnth-menu-empty { font-size: 12px; color: #B45309; background: #FFF7ED; padding: 4px 8px; border-radius: 6px; margin: 0; }
/* ลิ้นชักมือถือ */
.hnth-drawer { position: fixed; inset: 0; z-index: 999; }
.hnth-drawer[hidden] { display: none; }
.hnth-drawer-backdrop { position: absolute; inset: 0; background: rgba(1, 20, 40, .55); opacity: 0; transition: opacity .2s ease; }
.hnth-drawer-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(360px, 86vw); background: var(--wp--preset--color--base); box-shadow: -10px 0 30px rgba(0, 0, 0, .2);
	transform: translateX(100%); transition: transform .22s ease; overflow-y: auto; padding: 0 1rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.hnth-drawer--left .hnth-drawer-panel { right: auto; left: 0; transform: translateX(-100%); }
.hnth-drawer.is-open .hnth-drawer-backdrop { opacity: 1; }
.hnth-drawer.is-open .hnth-drawer-panel { transform: none; }
.hnth-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .9rem 0; border-bottom: 1px solid var(--wp--preset--color--line); position: sticky; top: 0; background: inherit;
	border-top: 4px solid transparent; border-image: linear-gradient(90deg, var(--wp--preset--color--brand-red) 0 33.4%, var(--wp--preset--color--secondary) 33.4% 66.7%, #5B7C99 66.7% 100%) 1; margin: 0 -1rem; padding-inline: 1rem; }
.hnth-drawer-head b { color: var(--wp--preset--color--primary); }
.hnth-drawer-close { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--wp--preset--color--line); background: none; font-size: 18px; cursor: pointer; color: var(--wp--preset--color--primary); }
.hnth-nav--drawer, .hnth-nav--drawer .hnth-menu { width: 100%; }
.hnth-nav--drawer .hnth-menu li { width: 100%; justify-content: space-between; border-bottom: 1px solid var(--wp--preset--color--line); }
.hnth-nav--drawer .hnth-menu a { padding: .8rem 0; flex: 1; }
.hnth-nav--drawer .sub-menu { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 .5rem .9rem; min-width: 0; width: 100%; background: none; }
.hnth-nav--drawer .sub-menu li { border-bottom: 0; }
.hnth-nav--drawer .sub-menu a { padding: .55rem 0; }
.hnth-nav--drawer li.is-open > .sub-menu { display: flex; }
.hnth-nav--drawer .hnth-sub-toggle { width: 44px; height: 44px; position: static !important; }
.hnth-nav--drawer .sub-menu .hnth-sub-toggle svg { transform: none; }
.hnth-nav--drawer .hnth-item-btn { border-bottom: 0 !important; margin-top: .75rem; }
.hnth-nav--drawer .hnth-item-btn > a { text-align: center; }
body.hnth-drawer-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .hnth-drawer-panel, .hnth-drawer-backdrop { transition: none; } }

/* ===================== แถบบนสุด ===================== */
.hnth-topbar { font-size: .875rem; line-height: 1.4; }
.hnth-topbar-in { max-width: 1200px; margin: 0 auto; padding: .4rem var(--wp--preset--spacing--30); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1.25rem; }
.hnth-tb-l, .hnth-tb-r { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.hnth-topbar a { color: inherit; text-decoration: none; }
.hnth-topbar a:hover { text-decoration: underline; }
.hnth-topbar .hnth-menu { gap: .25rem 1rem; }
.hnth-topbar .hnth-menu a { font-size: .875rem; font-weight: 400; color: inherit; padding: 0; }
.hnth-topbar--navy { background: var(--wp--preset--color--brand-navy); color: #E6EEF6; }
.hnth-topbar--red { background: var(--wp--preset--color--brand-red-dark); color: #fff; }
.hnth-topbar--green { background: var(--wp--preset--color--secondary); color: #fff; }
.hnth-topbar--surface { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast); border-bottom: 1px solid var(--wp--preset--color--line); }
@media (max-width: 781px) { .hnth-topbar--desk { display: none; } .hnth-tb-hours { display: none; } }

/* ===================== ส่วนหัว 5 แบบ ===================== */
.hnth-header--center .hnth-row-center { justify-content: center !important; }
.hnth-header--center .hnth-nav--primary { justify-content: center; flex: 0 1 auto; }
.hnth-header--center .hnth-header-row + .hnth-header-row { border-top: 1px solid var(--wp--preset--color--line); padding-top: .25rem; }
.hnth-header--dark { color: #fff; }
.hnth-header--red { background: var(--wp--preset--gradient--hanuman-red); }
.hnth-header--navy { background: var(--wp--preset--gradient--hanuman-navy); }
.hnth-header--dark .wp-block-site-title a, .hnth-header--dark .hnth-menu > li > a, .hnth-header--dark .hnth-menu > li > .hnth-sub-toggle svg, .hnth-header--dark .hnth-burger { color: #fff; }
.hnth-header--dark .hnth-burger { border-color: rgba(255, 255, 255, .45); }
.hnth-header--dark .hnth-menu > li > a:hover, .hnth-header--dark .hnth-menu > .current-menu-item > a { color: #FFE2DF; }
.hnth-header--navy .hnth-menu > li > a:hover, .hnth-header--navy .hnth-menu > .current-menu-item > a { color: var(--wp--preset--color--accent); }
body.hnth-ind-underline .hnth-header--dark .hnth-menu > .current-menu-item > a { box-shadow: inset 0 -3px 0 currentColor; }
.hnth-h4 .hnth-header--navy .hnth-nav--primary { --hnth-menu-justify: center; }
.hnth-header-end { gap: .75rem; }
.hnth-header-end .hnth-nav--primary { flex: 0 0 auto; }
.hnth-header { padding-top: .75rem; padding-bottom: .75rem; }

/* ===================== หัวโปร่งใส ===================== */
body.hnth-transparent .wp-site-blocks { position: relative; }
body.hnth-transparent .wp-site-blocks > header.wp-block-template-part { position: absolute; left: 0; right: 0; top: 0; background: transparent; box-shadow: none; border-image: none; border-top-color: transparent; }
body.hnth-transparent .wp-site-blocks > header .hnth-header { background: transparent !important; }
body.hnth-transparent .wp-site-blocks > header .wp-block-site-title a,
body.hnth-transparent .wp-site-blocks > header .hnth-menu > li > a,
body.hnth-transparent .wp-site-blocks > header .hnth-menu > li > .hnth-sub-toggle svg,
body.hnth-transparent .wp-site-blocks > header .hnth-burger { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .25); }
body.hnth-transparent .wp-site-blocks > header .hnth-burger { border-color: rgba(255, 255, 255, .5); }
/* เลื่อนลงแล้ว (และเปิดติดด้านบน) = กลับเป็นหัวทึบ */
@media (min-width: 782px) {
	body.hnth-transparent.hnth-scrolled:not(.hnth-sd-off) .wp-site-blocks > header.wp-block-template-part { position: fixed; top: var(--wp-admin--admin-bar--height, 0px); background: var(--wp--preset--color--base); box-shadow: 0 6px 18px rgba(1, 45, 83, .10); }
}
@media (max-width: 781px) {
	body.hnth-transparent.hnth-scrolled:not(.hnth-sm-off) .wp-site-blocks > header.wp-block-template-part { position: fixed; top: 0; background: var(--wp--preset--color--base); box-shadow: 0 6px 18px rgba(1, 45, 83, .10); }
}
body.hnth-transparent.hnth-scrolled:not(.hnth-sd-off) .wp-site-blocks > header .wp-block-site-title a,
body.hnth-transparent.hnth-scrolled:not(.hnth-sd-off) .wp-site-blocks > header .hnth-menu > li > a,
body.hnth-transparent.hnth-scrolled:not(.hnth-sd-off) .wp-site-blocks > header .hnth-burger { color: var(--hnth-menu-color); text-shadow: none; }
body.hnth-transparent .hnth-main > .wp-block-post-content > .alignfull:first-child,
body.hnth-transparent .hnth-main > .wp-block-post-content > :first-child { margin-top: 0; }
body.hnth-transparent .hnth-main { padding-top: 0 !important; }
body.hnth-transparent .hnth-main > .wp-block-post-content > .alignfull:first-child { padding-top: calc(var(--wp--custom--header-height, 72px) + var(--wp--preset--spacing--50)) !important; }

/* ===================== ส่วนท้าย 5 แบบ ===================== */
.hnth-footer--light { color: var(--wp--preset--color--contrast); border-top: 1px solid var(--wp--preset--color--line); }
.hnth-footer--light .hnth-credit, .hnth-footer--light .hnth-credit a { color: var(--wp--preset--color--muted); }
.hnth-footer--light .hnth-contact--stack a { color: var(--wp--preset--color--primary); }
.hnth-footer--minimal .hnth-credit { text-align: center; }
.hnth-footer .hnth-nav--footer .hnth-menu a { color: #d6e3ef; font-weight: 400; font-size: .9375rem; padding: .2rem 0; }
.hnth-footer .hnth-nav--footer .hnth-menu a:hover { color: #fff; }
.hnth-footer--light .hnth-nav--footer .hnth-menu a { color: var(--wp--preset--color--primary); }
.hnth-footer--row .hnth-nav--footer { --hnth-menu-justify: center; }
.hnth-footer-cta h2 { color: #fff; margin: 0 0 .25rem; }
.hnth-widgets .hnth-widget { margin-bottom: 1rem; }
.hnth-widget-title { font-size: 1rem; margin: 0 0 .5rem; }

/* ===================== แพตเทิร์นใหม่ ===================== */
.hnth-img-card img { border-radius: 14px; display: block; }
.hnth-checklist { list-style: none; padding: 0; }
.hnth-checklist li { padding-left: 1.75rem; position: relative; margin: .4rem 0; }
.hnth-checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--wp--preset--color--secondary); -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%); }
.hnth-step { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: 1.25rem; }
.hnth-step-no { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--color--brand-red); color: #fff; font-weight: 700; margin: 0; }
.hnth-faq { border: 1px solid var(--wp--preset--color--line); border-radius: 12px; padding: .9rem 1.1rem; margin: .6rem 0; background: var(--wp--preset--color--base); }
.hnth-faq summary { font-weight: 700; color: var(--wp--preset--color--primary); cursor: pointer; }
.hnth-faq[open] summary { margin-bottom: .5rem; }

/* ===================== Hooks · อุปกรณ์ ===================== */
@media (max-width: 781px) { .hnth-only-desktop { display: none !important; } }
@media (min-width: 782px) { .hnth-only-mobile { display: none !important; } }

/* 1.1.0 — ปุ่มติดต่อในส่วนหัวบนมือถือ เหลือไอคอน ไม่ดันชื่อเว็บ */
@media (max-width:600px){
	.hnth-header .hnth-header-cta.hnth-contact a{font-size:0;gap:0;padding:10px;min-width:44px;min-height:44px;justify-content:center}
	.hnth-header .hnth-header-cta.hnth-contact a svg{width:20px;height:20px}
}
/* หน้าแบบไม่มีหัวข้อ/ว่าง: ส่วนแรกชิดส่วนหัว */
.page-template-page-no-title .wp-site-blocks > main,.page-template-blank .wp-site-blocks > main,.hnth-transparent .wp-site-blocks > main{margin-block-start:0}
.hnth-hook > :where(p){margin-block:.6rem}
/* 1.2.0 โลโก้: กำหนดความสูง ไม่บีบโลโก้แนวนอนให้เล็ก */
.hnth-brand .wp-block-site-logo img{width:auto!important;height:auto;max-height:var(--hnth-logo-h,48px);max-width:min(var(--hnth-logo-w,200px),60vw);object-fit:contain}
@media (max-width:767px){.hnth-brand .wp-block-site-logo img{max-height:var(--hnth-logo-h,38px);max-width:min(var(--hnth-logo-w,120px),45vw)}}
/* 1.18.0 โลโก้ + ชื่อเว็บ + สโลแกน (ตั้งที่ ปรับแต่ง › ส่วนหัว › โลโก้ ชื่อ สโลแกน) */
.hnth-brand{align-items:center}
.hnth-brand-txt{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:.1rem}
.hnth-brand-txt .wp-block-site-title{margin:0;line-height:1.2}
.hnth-brand .hnth-brand-tag,.hnth-brand .wp-block-site-tagline{margin:0;font-size:.8125rem;line-height:1.3;font-weight:400;color:inherit;opacity:.75;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.hnth-transparent .wp-site-blocks > header .hnth-brand-tag{color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.25)}
body.hnth-transparent.hnth-scrolled:not(.hnth-sd-off) .wp-site-blocks > header .hnth-brand-tag{color:var(--hnth-menu-color);text-shadow:none}
.hnth-brand.hnth-bs-col{flex-direction:column;align-items:flex-start;gap:.3rem}
.hnth-header-row.hnth-row-center .hnth-brand.hnth-bs-col{align-items:center}
.hnth-header-row.hnth-row-center .hnth-brand.hnth-bs-col .hnth-brand-txt{align-items:center;text-align:center}
@media (min-width:768px){
	.hnth-brand.hnth-bd-logo:not(.hnth-nologo) .hnth-brand-txt,.hnth-brand.hnth-bd-logo:not(.hnth-nologo) .wp-block-site-title{display:none}
	.hnth-brand.hnth-bd-logo.hnth-nologo .hnth-brand-tag,.hnth-brand.hnth-bd-logo.hnth-nologo .wp-block-site-tagline,.hnth-brand.hnth-bd-logo_title .hnth-brand-tag,.hnth-brand.hnth-bd-logo_title .wp-block-site-tagline{display:none}
	.hnth-brand.hnth-bd-title_tag .wp-block-site-logo{display:none}
}
@media (max-width:767px){
	.hnth-brand.hnth-bm-logo:not(.hnth-nologo) .hnth-brand-txt,.hnth-brand.hnth-bm-logo:not(.hnth-nologo) .wp-block-site-title{display:none}
	.hnth-brand.hnth-bm-logo.hnth-nologo .hnth-brand-tag,.hnth-brand.hnth-bm-logo.hnth-nologo .wp-block-site-tagline,.hnth-brand.hnth-bm-logo_title .hnth-brand-tag,.hnth-brand.hnth-bm-logo_title .wp-block-site-tagline{display:none}
	.hnth-brand.hnth-bm-title_tag .wp-block-site-logo{display:none}
	.hnth-brand.hnth-bs-mcol{flex-direction:column;align-items:flex-start;gap:.25rem}
	.hnth-brand .hnth-brand-tag,.hnth-brand .wp-block-site-tagline{font-size:.75rem}
}
/* 1.2.0 เส้นทาง (breadcrumbs) */
.hnth-crumbs{font-size:.875rem;color:var(--wp--preset--color--muted)}
.hnth-crumbs ol{display:flex;flex-wrap:wrap;gap:.25rem .4rem;margin:0;padding:0;list-style:none}
.hnth-crumbs li{display:inline-flex;align-items:center;gap:.4rem;min-width:0}
.hnth-crumbs a{color:inherit;text-decoration:none;padding:.35rem 0}
.hnth-crumbs a:hover{color:var(--wp--preset--color--secondary);text-decoration:underline}
.hnth-crumbs [aria-current]{color:var(--wp--preset--color--contrast);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:60vw}
/* 1.2.0 แถบติดต่อด่วนล่างจอ (มือถือ) */
.hnth-mbar{display:none}
@media (max-width:781px){
	.hnth-mbar{position:fixed;left:0;right:0;bottom:0;z-index:90;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:var(--wp--preset--color--base);border-top:1px solid var(--wp--preset--color--line);box-shadow:0 -6px 18px rgba(1,45,83,.08)}
	.hnth-mbar a{display:flex;align-items:center;justify-content:center;min-height:48px;border-radius:12px;font-weight:700;text-decoration:none;color:#fff;background:var(--wp--preset--color--brand-navy)}
	.hnth-mbar .is-line{background:var(--wp--preset--color--line-green)}
	.hnth-mbar .is-cta{background:var(--wp--preset--color--secondary)}
	.hnth-has-mbar{padding-bottom:calc(72px + env(safe-area-inset-bottom))}
	.hnth-has-mbar .hnth-top{bottom:calc(84px + env(safe-area-inset-bottom))}
}
.hnth-topbar a{display:inline-flex;align-items:center;min-height:32px}
@media (max-width:600px){.wp-block-column:has(> .hnth-hero-art){display:none}}
@media (max-width:781px){.hnth-has-mbar .hnth-header .hnth-header-cta{display:none!important}}
/* 1.2.1 หน้าที่ไม่แสดงหัวข้อ (ซ่อนด้วย meta/ค่าทั้งเว็บ) และเริ่มด้วยบล็อกเต็มจอ: ชิดส่วนหัว ไม่มีแถบว่าง */
.wp-site-blocks > main:has(> .wp-block-post-content:first-child > .alignfull:first-child){margin-block-start:0;padding-top:0 !important}
/* 1.2.1 มือถือ: ลิงก์เมนูส่วนท้ายและไอคอนโซเชียลสูงพอให้นิ้วกด (≥ 44 px) */
@media (max-width:781px){
	.hnth-nav--footer .hnth-menu a{display:flex;align-items:center;min-height:44px}
	footer .wp-block-social-links .wp-social-link a{padding:10px}
}
/* 1.3.0 เลย์เอาต์: แถบข้าง · ภาพเด่นเต็มจอ */
.hnth-layout{gap:var(--wp--preset--spacing--50)}
.hnth-layout-side .hnth-widgets{position:sticky;top:calc(var(--wp--custom--header-height,72px) + 16px);display:flex;flex-direction:column;gap:1.25rem}
.hnth-layout-side .widget,.hnth-layout-side .wp-block-group.is-style-hnth-card{padding:1rem 1.1rem;border:1px solid var(--wp--preset--color--line);border-radius:14px;background:var(--wp--preset--color--base)}
.hnth-layout-side h2,.hnth-layout-side .widget-title{font-size:1.05rem;margin:0 0 .6rem}
@media (max-width:781px){.hnth-layout.hnth-layout--left{flex-direction:column-reverse}.hnth-layout-side .hnth-widgets{position:static}}
.hnth-hero-post{margin-block-start:0!important;margin-bottom:var(--wp--preset--spacing--50)}
.hnth-hero-post .wp-block-post-title{color:#fff;font-size:clamp(1.75rem,4.5vw,2.75rem);margin:.25rem 0 .5rem}
.hnth-hero-post .hnth-crumbs,.hnth-hero-post .hnth-crumbs a,.hnth-hero-post [aria-current]{color:rgba(255,255,255,.88)}
.hnth-hero-post .hnth-meta,.hnth-hero-post .hnth-meta a{color:rgba(255,255,255,.88)}
.hnth-layout-hero .wp-site-blocks > main{margin-block-start:0}
.hnth-layout-side .wp-block-latest-posts{padding:0;margin:0;list-style:none}
.hnth-layout-side .wp-block-latest-posts li{padding:.45rem 0;border-bottom:1px solid var(--wp--preset--color--line)}
.hnth-layout-side .wp-block-categories{padding-left:1.1rem;margin:0}
@media (max-width:781px){.hnth-no-mheader .wp-site-blocks > header.wp-block-template-part{display:none}}
