/*
 * theme.css — CSS เสริมของธีม SBOGOOL
 * Modal สมัครสมาชิก / Mobile drawer / Sticky helpers / หน้าบล็อก
 * โทนสีอิงสกินเดิม: ทอง #fbc94b/#ffd97a บนพื้นดำ
 */

/* ========== Scroll lock ========== */
html.sb-lock, html.sb-lock body { overflow: hidden !important; }

/* ========== 1) Modal สมัครสมาชิก ========== */
.sb-modal-bg[hidden], .sb-modal[hidden] { display: none !important; }
.sb-modal-bg {
	position: fixed;
	inset: 0;
	background: rgba(5, 5, 8, 0.82);
	z-index: 99998;
	animation: sbFadeIn 0.25s ease;
}
.sb-modal {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 99999;
	animation: sbFadeIn 0.25s ease;
}
.sb-modal__box {
	position: relative;
	width: min(420px, 94vw);
	max-height: 90vh;
	overflow-y: auto;
	overflow-x: hidden;
	text-align: center;
	padding: 34px 26px 26px !important;
	animation: sbPop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.sb-modal__close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	line-height: 34px;
	border-radius: 50%;
	border: 1px solid rgba(255, 200, 70, 0.45);
	background: rgba(0, 0, 0, 0.55);
	color: #ffd97a;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.2s ease;
}
.sb-modal__close:hover, .sb-modal__close:focus {
	background: #fbc94b;
	color: #0b0e14;
	outline: none;
}
.sb-modal__logo img {
	width: 210px;
	max-width: 70%;
	height: auto;
	display: block;
	margin: 0 auto 12px;
}
.sb-modal__title {
	margin: 0 0 8px;
	font-size: 1.35em;
	color: #ffd97a;
	text-shadow: 0 0 14px rgba(255, 190, 60, 0.6);
}
.sb-modal__text {
	margin: 0 0 18px;
	font-size: 0.9rem;
	line-height: 1.7;
	color: #fff3d1;
}
.sb-modal__cta {
	display: block;
	width: 100%;
	box-sizing: border-box;
	font-size: 1.05em;
}
.sb-modal__cta .icon-user { margin-right: 6px; }
.sb-modal__note {
	margin: 12px 0 0;
	font-size: 0.72rem;
	opacity: 0.75;
	color: #fff3d1;
}
@keyframes sbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sbPop {
	from { opacity: 0; transform: scale(0.88) translateY(14px); }
	to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========== 2) Mobile menu drawer (กลางจอ เหมือนต้นฉบับ) ========== */
.sb-drawer-bg {
	display: none;
	position: fixed;
	inset: 0;
	background: #000;
	opacity: 0.8;
	z-index: 100000;
}
body.sb-drawer-open .sb-drawer-bg { display: block; }
body.sb-drawer-open #main-menu.mfp-hide {
	display: block !important;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(320px, 88vw);
	max-height: 84vh;
	overflow-y: auto;
	z-index: 100001;
	background: #ffffff;
	border-radius: 14px;
	border: 1px solid rgba(255, 200, 70, 0.35);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.85);
	animation: sbPop 0.25s ease;
	padding: 34px 16px 24px;
}
.sb-drawer-close-wrap {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
}
.sb-drawer-close {
	width: 34px;
	height: 34px;
	line-height: 30px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: #f7f7f7;
	color: #333;
	font-size: 16px;
	cursor: pointer;
	transform: rotate(45deg); /* icon-angle-up → เป็น × */
	transition: all 0.2s ease;
}
.sb-drawer-close:hover { background: #c37602; color: #fff; border-color: #c37602; }
/* ไอเท็มเมนู (nav-anim) แสดงเมื่อ drawer เปิด — เดิมรอคลาส mfp-ready จาก Magnific ที่ไม่มีแล้ว */
body.sb-drawer-open .nav-anim > li { opacity: 1; transform: none; }
/* sub-menu แบบ accordion (ถ้ามีหน้าย่อยในอนาคต) */
#main-menu li.menu-item-has-children > .sub-menu { display: none; }
#main-menu li.sb-open > .sub-menu { display: block; }
#main-menu .toggle { cursor: pointer; }

/* ========== 3) Sticky header helpers ========== */
#header { position: relative; }
.header-wrapper.stuck { z-index: 500; }

/* ========== 4) หน้าบล็อก / หน้าใหม่ ========== */
.sb-blog-section { padding: 20px 0 40px; }
.sb-post-col { margin-bottom: 20px; }
.sb-post-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.sb-post-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 200, 70, 0.2);
}
.sb-post-thumb { display: block; margin-bottom: 14px; }
.sb-post-thumb img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 14px;
	border: 1px solid rgba(255, 200, 70, 0.14);
}
.sb-post-title { font-size: 1.05em; margin: 0 0 8px; line-height: 1.45; }
.sb-post-title a { color: #ffd97a; text-decoration: none; }
.sb-post-title a:hover { color: #fff; }
.sb-post-excerpt { color: rgba(255, 243, 209, 0.85); line-height: 1.7; margin-bottom: 14px; }
.sb-post-meta { color: rgba(255, 243, 209, 0.6); margin-bottom: 14px; }
.sb-post-more { display: inline-block; }
.sb-single { padding-bottom: 8px; }
.sb-content { margin-top: 18px; line-height: 1.9; color: rgba(255, 243, 209, 0.95); }
.sb-content.text-left, .sb-content p, .sb-content li { text-align: left; }
.sb-content a { color: #00ffff; }
.sb-content img { max-width: 100%; height: auto; border-radius: 14px; }
.sb-single-cta, .sb-404-actions { margin-top: 22px; }
.sb-404-actions .button { margin: 0 6px 10px; }
.sb-pagination { margin-top: 10px; }
.sb-pagination .page-numbers {
	display: inline-block;
	padding: 8px 14px;
	margin: 0 3px 8px;
	border-radius: 12px;
	border: 1px solid rgba(255, 200, 70, 0.25);
	color: #ffd97a;
	text-decoration: none;
	background: rgba(11, 14, 20, 0.7);
}
.sb-pagination .page-numbers.current,
.sb-pagination .page-numbers:hover {
	background: #fbc94b;
	color: #0b0e14;
	border-color: #fbc94b;
}

/* ========== 5) กันพลาดเล็ก ๆ ========== */
/* ลิงก์ปุ่มใน header/footer ที่เป็นกลุ่ม modal ต้องโดน :hover/:focus เหมือนเดิม */
a[data-aff-link].button:hover, a[data-aff-link].button:focus { opacity: 1; }
/* รูปในเนื้อหา UX Builder ไม่มี srcset แล้ว — บังคับขนาดพอดีคอลัมน์ */
.col .img img.attachment-original { max-width: 100%; height: auto; }
