/*
Theme Name: StepBall News
Theme URI: https://stepballclub.com/
Author: StepBall Club
Author URI: https://stepballclub.com/
Description: ธีม WordPress สำหรับเว็บข่าวบอลและวิเคราะห์บอล ติดตั้งหน้าเว็บ 35 หน้า บทความตัวอย่าง รูปภาพ และเมนูให้อัตโนมัติเมื่อเปิดใช้งาน พร้อมระบบวิเคราะห์บอล โหมดมืด และปรับแต่งสีได้จาก Customizer
Version: 1.5.1
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stepball-news
Tags: news, blog, sports, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar
*/

/* ==========================================================================
   1. ตัวแปรสี (แก้สีหลักได้จาก Customizer > สีของเว็บไซต์)
   ========================================================================== */

:root {
	/*
	 * โทนสีหลักของเว็บ = น้ำเงินเข้ม / ขาว / ทอง (พรีเมียม มินิมอล สปอร์ต)
	 * สีหลักน้ำเงิน Royal Blue สื่อความน่าเชื่อถือ สีรองทองเป็นจุดเด่น
	 * เปลี่ยนได้จาก รูปลักษณ์ > ปรับแต่ง > สีของเว็บไซต์
	 */
	--sb-primary: #1f4e9c;
	--sb-primary-dark: #163b78;
	--sb-primary-light: #2f66bd;
	--sb-accent: #d9b340;
	--sb-accent-deep: #bd992d;
	--sb-live: #e0483a;

	/* ไล่เฉดน้ำเงินสำหรับปุ่ม/ป้าย + เส้นน้ำเงิน-ทองสำหรับขีดเน้น */
	--sb-grad: linear-gradient(135deg, #1f4e9c 0%, #2f66bd 100%);
	--sb-grad-btn: linear-gradient(180deg, #2a5cad 0%, #1a447f 100%);
	--sb-hairline: linear-gradient(90deg, #1f4e9c, #d9b340);

	/*
	 * พื้นหลังขาวนวลอมเทา ให้การ์ดสีขาวลอยเด่นด้วยเงาอ่อน ๆ
	 * โทนสะอาดแบบพรีเมียม เน้นมิติด้วยแสงและเงา ไม่ใช่เส้นขอบหนา
	 */
	--sb-bg: #f4f6f9;
	--sb-bg-soft: #eaedf2;
	--sb-surface: #ffffff;
	--sb-border: #e2e6ec;

	--sb-text: #3a3a3a;
	--sb-text-soft: #707784;
	--sb-heading: #23272e;

	--sb-glow: rgba(31, 78, 156, .08);

	--sb-topbar-bg: #14315f;
	--sb-header-bg: #1a3c73;
	--sb-header-text: #ffffff;
	--sb-footer-bg: #16233d;

	--sb-radius: 14px;
	--sb-radius-sm: 8px;
	--sb-shadow: 0 1px 2px rgba(23, 43, 77, .06), 0 10px 28px -14px rgba(23, 43, 77, .18);
	--sb-shadow-lg: 0 2px 4px rgba(23, 43, 77, .07), 0 22px 46px -18px rgba(23, 43, 77, .24);

	--sb-max: 1240px;
	--sb-gap: 28px;

	--sb-font-body: 'Noto Sans Thai', 'Segoe UI', system-ui, -apple-system, sans-serif;
	--sb-font-head: 'Kanit', 'Noto Sans Thai', 'Segoe UI', system-ui, sans-serif;
}

[data-theme="dark"] {
	/*
	 * โหมดมืดไล่ระดับ 3 ชั้น พื้นหลัง < พื้นรอง < การ์ด
	 * ทำให้การ์ดดูยกตัวขึ้นมาจากพื้นแม้ในที่มืด
	 */
	--sb-bg: #0d1522;
	--sb-bg-soft: #141f30;
	--sb-surface: #17233a;
	--sb-border: #26324a;

	--sb-text: #e8ecf3;
	--sb-text-soft: #9aa7bb;
	--sb-heading: #ffffff;

	--sb-glow: rgba(47, 102, 189, .20);

	--sb-topbar-bg: #0a111c;
	--sb-header-bg: #0f1c31;
	--sb-footer-bg: #0f1c31;

	--sb-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 10px 28px -14px rgba(0, 0, 0, .8);
	--sb-shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 22px 46px -18px rgba(0, 0, 0, .9);
}

/* ==========================================================================
   2. รีเซ็ตและพื้นฐาน
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	color: var(--sb-text);
	font-family: var(--sb-font-body);
	font-size: 16px;
	line-height: 1.75;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;

	/* แสงเรืองสีหลักจาง ๆ ด้านบนของหน้า ช่วยให้หน้าไม่แบนโดยไม่รบกวนการอ่าน */
	background-color: var(--sb-bg);
	background-image: radial-gradient(1100px 480px at 50% -260px, var(--sb-glow), transparent 72%);
	background-repeat: no-repeat;
}

img, svg, video, iframe { max-width: 100%; height: auto; display: block; }

a { color: var(--sb-primary); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--sb-primary-dark); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--sb-font-head);
	font-weight: 600;
	line-height: 1.35;
	color: var(--sb-heading);
	margin: 0 0 .6em;
	letter-spacing: -.01em;
}

h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }

p { margin: 0 0 1.15em; }

ul, ol { padding-left: 1.35em; }

blockquote {
	margin: 1.6em 0;
	padding: 1em 1.4em;
	border-left: 4px solid var(--sb-primary);
	background: var(--sb-bg-soft);
	border-radius: 0 var(--sb-radius-sm) var(--sb-radius-sm) 0;
	color: var(--sb-text-soft);
	font-style: italic;
}

code, pre {
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
	font-size: .92em;
}

pre {
	background: var(--sb-bg-soft);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius-sm);
	padding: 1.1em;
	overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
th, td { border: 1px solid var(--sb-border); padding: .65em .85em; text-align: left; }
th { background: var(--sb-bg-soft); font-family: var(--sb-font-head); font-weight: 500; }

hr { border: 0; border-top: 1px solid var(--sb-border); margin: 2.2em 0; }

:focus-visible { outline: 3px solid var(--sb-primary); outline-offset: 2px; border-radius: 3px; }

/* ==========================================================================
   3. เลย์เอาต์
   ========================================================================== */

.sb-container {
	width: 100%;
	max-width: var(--sb-max);
	margin: 0 auto;
	padding: 0 20px;
}

.sb-main { padding: 34px 0 60px; }

.sb-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 40px;
	align-items: start;
}

.sb-layout--full { grid-template-columns: minmax(0, 1fr); }

.sb-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	background: var(--sb-primary);
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 var(--sb-radius-sm) 0;
}
.sb-skip-link:focus { left: 0; color: #fff; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ==========================================================================
   4. แถบบนสุด (Topbar)
   ========================================================================== */

.sb-topbar {
	background: var(--sb-topbar-bg);
	color: rgba(255, 255, 255, .72);
	font-size: .82rem;
	border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.sb-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 40px;
	flex-wrap: wrap;
}

.sb-topbar__date { display: flex; align-items: center; gap: 8px; }

.sb-topbar__links { display: flex; align-items: center; gap: 18px; }
.sb-topbar__links a { color: rgba(255, 255, 255, .72); }
.sb-topbar__links a:hover { color: #fff; }

.sb-live-dot {
	display: inline-block;
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--sb-live);
	animation: sb-pulse 1.6s infinite;
	margin-right: 6px;
}

@keyframes sb-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: .35; transform: scale(.8); }
}

/* ==========================================================================
   5. เฮดเดอร์ + เมนู
   ========================================================================== */

.sb-header {
	background: var(--sb-header-bg);
	color: var(--sb-header-text);
	position: sticky;
	top: 0;
	z-index: 200;
	transition: box-shadow .2s ease;
	border-bottom: 3px solid transparent;
	/* เส้นทอง-แดงใต้เฮดเดอร์ ล้อสีโลโก้ */
	border-image: var(--sb-hairline) 1;
}
.sb-header.is-stuck { box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .6); }

/*
 * เฮดเดอร์แบบสองแถว (สแต็ก) เพื่อให้โลโก้ใหญ่ได้เต็มที่
 * แถวบน: โลโก้ (ซ้าย) + ปุ่มค้นหา/โหมด (ขวา)
 * แถวล่าง: เมนูหลัก จัดกึ่งกลาง
 */
.sb-header__inner {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 22px;
	padding: 8px 0 6px;
}

.sb-brand { order: 0; width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; }
.sb-brand img,
.sb-brand .custom-logo {
	max-width: min(760px, 86%);
	max-height: 170px;
	width: auto;
	height: auto;
	transition: max-height .25s ease;
}
.sb-brand .custom-logo-link { display: inline-flex; align-items: center; justify-content: center; }

/* ย่อโลโก้ให้เล็กลงตอนเลื่อนหน้า เพื่อไม่ให้เฮดเดอร์กินพื้นที่ตอนอ่าน */
.sb-header.is-stuck .sb-brand img,
.sb-header.is-stuck .sb-brand .custom-logo { max-height: 88px; }

.sb-brand__title {
	font-family: var(--sb-font-head);
	font-size: 1.35rem;
	font-weight: 600;
	color: #fff;
	margin: 0;
	line-height: 1.2;
}
.sb-brand__title a { color: #fff; }
.sb-brand__title a:hover { color: var(--sb-primary); }
.sb-brand__tagline {
	font-size: .74rem;
	color: rgba(255, 255, 255, .5);
	margin: 0;
	line-height: 1.2;
}

/* เมนูอยู่แถวล่างเต็มความกว้าง จัดกึ่งกลาง */
.sb-nav {
	order: 2;
	flex-basis: 100%;
	width: 100%;
	margin: 4px 0 0;
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding-top: 8px;
}

.sb-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px;
}

.sb-nav li { position: relative; }

.sb-nav a {
	display: block;
	padding: 10px 14px;
	color: rgba(255, 255, 255, .85);
	font-family: var(--sb-font-head);
	font-size: .95rem;
	font-weight: 400;
	border-radius: var(--sb-radius-sm);
	white-space: nowrap;
}
.sb-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.sb-nav .current-menu-item > a,
.sb-nav .current_page_item > a,
.sb-nav .current-menu-parent > a {
	color: #fff;
	background: var(--sb-primary);
}

.sb-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 210px;
	background: var(--sb-header-bg);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: var(--sb-radius-sm);
	padding: 6px;
	display: block;
	flex-direction: column;
	align-items: stretch;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all .18s ease;
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
}
.sb-nav li:hover > .sub-menu,
.sb-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.sb-nav .sub-menu .sub-menu { top: 0; left: 100%; }

/* ปุ่มค้นหา/โหมด ลอยไปมุมขวาบน เพื่อให้โลโก้อยู่กึ่งกลางจริง ๆ */
.sb-header__tools { order: 1; position: absolute; top: 16px; right: 0; display: flex; align-items: center; gap: 6px; }

.sb-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border: 0;
	border-radius: var(--sb-radius-sm);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	cursor: pointer;
	transition: background .18s ease;
	padding: 0;
}
.sb-iconbtn:hover { background: var(--sb-primary); }
.sb-iconbtn svg { width: 20px; height: 20px; }

.sb-burger { display: none; }

/* กล่องค้นหาแบบเลื่อนลง */
.sb-searchbar {
	display: none;
	background: var(--sb-header-bg);
	border-top: 1px solid rgba(255, 255, 255, .08);
	padding: 16px 0;
}
.sb-searchbar.is-open { display: block; }

/* ==========================================================================
   6. เมนูมือถือ
   ========================================================================== */

.sb-mobile-nav {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(320px, 86vw);
	background: var(--sb-header-bg);
	z-index: 400;
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
	overflow-y: auto;
	padding: 20px;
}
.sb-mobile-nav.is-open { transform: translateX(0); }

.sb-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.sb-mobile-nav li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.sb-mobile-nav a {
	display: block;
	padding: 13px 4px;
	color: rgba(255, 255, 255, .88);
	font-family: var(--sb-font-head);
}
.sb-mobile-nav .sub-menu { padding-left: 16px; }
.sb-mobile-nav__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.sb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, .6);
	backdrop-filter: blur(2px);
	z-index: 300;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
}
.sb-overlay.is-open { opacity: 1; visibility: visible; }

/* ==========================================================================
   7. ฟอร์มและปุ่ม
   ========================================================================== */

input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], input[type="tel"], input[type="date"],
textarea, select {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius-sm);
	background: var(--sb-surface);
	color: var(--sb-text);
	font-family: inherit;
	font-size: .95rem;
	transition: border-color .18s ease, box-shadow .18s ease;
}
input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: var(--sb-primary);
	box-shadow: 0 0 0 3px rgba(31, 78, 156, .22);
}

.sb-searchform { display: flex; gap: 8px; }
.sb-searchform input[type="search"] { flex: 1; }

.sb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 22px;
	border: 0;
	border-radius: var(--sb-radius-sm);
	background: var(--sb-grad-btn);
	color: #fff;
	font-family: var(--sb-font-head);
	font-size: .95rem;
	font-weight: 500;
	cursor: pointer;
	transition: filter .18s ease, transform .12s ease, box-shadow .18s ease;
	text-align: center;
	box-shadow: 0 4px 14px -6px rgba(31, 78, 156, .55);
}
.sb-btn:hover { filter: brightness(1.06); color: #fff; box-shadow: 0 6px 18px -6px rgba(31, 78, 156, .7); }
.sb-btn:active { transform: translateY(1px); }

.sb-btn--ghost {
	background: transparent;
	border: 1px solid var(--sb-border);
	color: var(--sb-text);
}
.sb-btn--ghost:hover { background: var(--sb-bg-soft); color: var(--sb-text); border-color: var(--sb-primary); }

input[type="submit"], button[type="submit"] {
	padding: 11px 22px;
	border: 0;
	border-radius: var(--sb-radius-sm);
	background: var(--sb-primary);
	color: #fff;
	font-family: var(--sb-font-head);
	cursor: pointer;
}

/* ==========================================================================
   8. หัวข้อ Section
   ========================================================================== */

.sb-section { margin-bottom: 52px; }

.sb-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--sb-border);
	position: relative;
}
.sb-section__head::after {
	content: "";
	position: absolute;
	bottom: -2px; left: 0;
	width: 72px; height: 3px;
	background: var(--sb-hairline);
	border-radius: 2px;
}

.sb-section__title {
	margin: 0;
	font-size: 1.4rem;
	display: flex;
	align-items: center;
	gap: 10px;
}
.sb-section__title svg { width: 22px; height: 22px; color: var(--sb-primary); }

.sb-section__more {
	font-family: var(--sb-font-head);
	font-size: .9rem;
	color: var(--sb-text-soft);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}
.sb-section__more:hover { color: var(--sb-primary); }

/* ==========================================================================
   9. การ์ดข่าว
   ========================================================================== */

.sb-grid { display: grid; gap: var(--sb-gap); }
.sb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sb-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.sb-card {
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.sb-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--sb-shadow-lg);
	border-color: transparent;
}

.sb-card__thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--sb-bg-soft);
}
.sb-card__thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .45s ease;
}
.sb-card:hover .sb-card__thumb img { transform: scale(1.06); }

.sb-card__thumb--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sb-text-soft);
	font-family: var(--sb-font-head);
	font-size: .9rem;
}

.sb-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }

.sb-card__title {
	font-size: 1.08rem;
	margin: 0 0 10px;
	line-height: 1.45;
}
.sb-card__title a { color: var(--sb-heading); }
.sb-card__title a:hover { color: var(--sb-primary); }

.sb-card__excerpt {
	color: var(--sb-text-soft);
	font-size: .92rem;
	margin: 0 0 14px;
	line-height: 1.7;
}

.sb-card__meta {
	margin-top: auto;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	font-size: .8rem;
	color: var(--sb-text-soft);
}
.sb-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.sb-card__meta svg { width: 14px; height: 14px; }

.sb-chip {
	position: absolute;
	top: 12px; left: 12px;
	background: var(--sb-grad);
	color: #fff;
	font-family: var(--sb-font-head);
	font-size: .74rem;
	padding: 4px 11px;
	border-radius: 100px;
	z-index: 2;
	box-shadow: 0 3px 10px -4px rgba(31, 78, 156, .6);
}
.sb-chip:hover { color: #fff; filter: brightness(1.06); }

.sb-chip--inline {
	position: static;
	display: inline-block;
	background: var(--sb-bg-soft);
	color: var(--sb-primary);
	border: 1px solid var(--sb-border);
}

/* การ์ดแนวนอน (ใช้ในไซด์บาร์) */
.sb-mini {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--sb-border);
}
.sb-mini:last-child { border-bottom: 0; padding-bottom: 0; }
.sb-mini:first-child { padding-top: 0; }

.sb-mini__thumb {
	aspect-ratio: 1 / 1;
	border-radius: var(--sb-radius-sm);
	overflow: hidden;
	background: var(--sb-bg-soft);
}
.sb-mini__thumb img { width: 100%; height: 100%; object-fit: cover; }

.sb-mini__title {
	font-size: .95rem;
	font-family: var(--sb-font-head);
	font-weight: 400;
	line-height: 1.5;
	margin: 0 0 5px;
}
.sb-mini__title a { color: var(--sb-heading); }
.sb-mini__title a:hover { color: var(--sb-primary); }
.sb-mini__meta { font-size: .78rem; color: var(--sb-text-soft); }

/* ==========================================================================
   10. ฮีโร่หน้าแรก
   ========================================================================== */

.sb-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
	gap: var(--sb-gap);
	margin-bottom: 52px;
}

.sb-hero__main {
	position: relative;
	border-radius: var(--sb-radius);
	overflow: hidden;
	min-height: 440px;
	display: flex;
	align-items: flex-end;
	background: var(--sb-bg-soft);
}
.sb-hero__main img {
	position: absolute;
	inset: 0;
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .5s ease;
}
.sb-hero__main:hover img { transform: scale(1.04); }

.sb-hero__overlay {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 34px 32px 30px;
	background: linear-gradient(to top, rgba(6, 10, 14, .95) 12%, rgba(6, 10, 14, .72) 55%, rgba(6, 10, 14, 0) 100%);
	color: #fff;
}
.sb-hero__title {
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	color: #fff;
	margin: 12px 0 10px;
	line-height: 1.35;
}
.sb-hero__title a { color: #fff; }
.sb-hero__title a:hover { color: var(--sb-accent); }
.sb-hero__meta {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	font-size: .82rem;
	color: rgba(255, 255, 255, .75);
}
.sb-hero__badge {
	display: inline-block;
	background: var(--sb-grad);
	color: #fff;
	font-family: var(--sb-font-head);
	font-size: .78rem;
	padding: 4px 12px;
	border-radius: 100px;
	box-shadow: 0 3px 10px -4px rgba(31, 78, 156, .6);
}

.sb-hero__side { display: flex; flex-direction: column; gap: 16px; }

.sb-hero__item {
	display: grid;
	grid-template-columns: 116px minmax(0, 1fr);
	gap: 14px;
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	padding: 12px;
	flex: 1;
	align-items: center;
	transition: border-color .2s ease, transform .2s ease;
}
.sb-hero__item:hover { border-color: var(--sb-primary); transform: translateX(3px); }
.sb-hero__item-thumb {
	aspect-ratio: 4 / 3;
	border-radius: var(--sb-radius-sm);
	overflow: hidden;
	background: var(--sb-bg-soft);
}
.sb-hero__item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sb-hero__item-title {
	font-size: .98rem;
	font-family: var(--sb-font-head);
	font-weight: 400;
	line-height: 1.5;
	margin: 0 0 6px;
}
.sb-hero__item-title a { color: var(--sb-heading); }
.sb-hero__item-title a:hover { color: var(--sb-primary); }

/* ==========================================================================
   11. การ์ดวิเคราะห์บอล
   ========================================================================== */

.sb-analysis {
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .22s ease, box-shadow .22s ease;
}
.sb-analysis:hover { transform: translateY(-4px); box-shadow: var(--sb-shadow-lg); }

.sb-analysis__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	background: var(--sb-bg-soft);
	border-bottom: 1px solid var(--sb-border);
	font-size: .8rem;
	color: var(--sb-text-soft);
}
.sb-analysis__league {
	font-family: var(--sb-font-head);
	color: var(--sb-primary);
	font-size: .82rem;
}

.sb-analysis__teams {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 10px;
	padding: 22px 16px;
	text-align: center;
}
.sb-analysis__team {
	font-family: var(--sb-font-head);
	font-size: 1rem;
	color: var(--sb-heading);
	line-height: 1.4;
}
.sb-analysis__vs {
	font-family: var(--sb-font-head);
	font-size: .82rem;
	color: #fff;
	background: var(--sb-text-soft);
	width: 38px; height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.sb-analysis__body { padding: 0 16px 16px; display: flex; flex-direction: column; flex: 1; }

.sb-analysis__title {
	font-size: 1rem;
	margin: 0 0 12px;
	line-height: 1.5;
	text-align: center;
}
.sb-analysis__title a { color: var(--sb-heading); }
.sb-analysis__title a:hover { color: var(--sb-primary); }

.sb-analysis__rows { border-top: 1px dashed var(--sb-border); padding-top: 12px; margin-top: auto; }

.sb-analysis__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: .88rem;
	padding: 5px 0;
}
.sb-analysis__row dt { color: var(--sb-text-soft); margin: 0; }
.sb-analysis__row dd {
	margin: 0;
	font-family: var(--sb-font-head);
	color: var(--sb-heading);
	text-align: right;
}
.sb-analysis__row dd.is-tip { color: var(--sb-primary); }

.sb-stars { color: var(--sb-accent); letter-spacing: 2px; font-size: .95rem; }
.sb-stars span { opacity: .25; }

.sb-analysis__cta { margin-top: 14px; }
.sb-analysis__cta .sb-btn { width: 100%; }

.sb-kickoff {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.sb-kickoff svg { width: 14px; height: 14px; }

/* ==========================================================================
   12. หน้าบทความเดี่ยว
   ========================================================================== */

.sb-article {
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	overflow: hidden;
}

.sb-article__inner { padding: 30px; }

.sb-article__header { margin-bottom: 24px; }

.sb-article__title { margin: 12px 0 14px; }

.sb-article__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
	font-size: .86rem;
	color: var(--sb-text-soft);
	padding-bottom: 20px;
	border-bottom: 1px solid var(--sb-border);
}
.sb-article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.sb-article__meta svg { width: 15px; height: 15px; }

.sb-article__thumb { margin: 0 0 26px; }
.sb-article__thumb img { width: 100%; border-radius: var(--sb-radius); }

/* เนื้อความบทความ ตั้งค่าให้อ่านต่อเนื่องยาว ๆ ได้สบายตา */
.sb-article__content {
	font-size: 1.07rem;
	line-height: 1.9;
	max-width: 74ch;
}
.sb-article__content > *:last-child { margin-bottom: 0; }
.sb-article__content p { margin-bottom: 1.3em; }
.sb-article__content h2 { margin-top: 1.9em; margin-bottom: .7em; }
.sb-article__content h3 { margin-top: 1.6em; margin-bottom: .6em; }
.sb-article__content img { border-radius: var(--sb-radius-sm); margin: 1.4em 0; }
.sb-article__content ul li, .sb-article__content ol li { margin-bottom: .6em; }
.sb-article__content table { max-width: none; }

.sb-article__footer {
	margin-top: 30px;
	padding-top: 22px;
	border-top: 1px solid var(--sb-border);
}

.sb-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sb-tags a {
	display: inline-block;
	padding: 5px 13px;
	background: var(--sb-bg-soft);
	border: 1px solid var(--sb-border);
	border-radius: 100px;
	font-size: .82rem;
	color: var(--sb-text-soft);
}
.sb-tags a:hover { background: var(--sb-primary); color: #fff; border-color: var(--sb-primary); }

.sb-share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.sb-share__label { font-family: var(--sb-font-head); font-size: .9rem; color: var(--sb-text-soft); }
.sb-share a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--sb-bg-soft);
	border: 1px solid var(--sb-border);
	color: var(--sb-text-soft);
}
.sb-share a:hover { background: var(--sb-primary); color: #fff; border-color: var(--sb-primary); }
.sb-share svg { width: 17px; height: 17px; }

/* กล่องข้อมูลแมตช์ในหน้าวิเคราะห์ */
.sb-matchbox {
	background: linear-gradient(135deg, var(--sb-primary) 0%, var(--sb-primary-dark) 100%);
	color: #fff;
	border-radius: var(--sb-radius);
	padding: 26px 24px;
	margin-bottom: 26px;
}
.sb-matchbox__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-size: .86rem;
	opacity: .9;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.sb-matchbox__teams {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 14px;
	text-align: center;
	margin-bottom: 18px;
}
.sb-matchbox__team { font-family: var(--sb-font-head); font-size: 1.25rem; }
.sb-matchbox__vs {
	background: rgba(255, 255, 255, .22);
	width: 46px; height: 46px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--sb-font-head);
	font-size: .85rem;
}
.sb-matchbox__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	border-top: 1px solid rgba(255, 255, 255, .25);
	padding-top: 16px;
}
.sb-matchbox__item { text-align: center; }
.sb-matchbox__item dt { font-size: .78rem; opacity: .8; margin-bottom: 3px; }
.sb-matchbox__item dd { margin: 0; font-family: var(--sb-font-head); font-size: 1.05rem; }

/* ==========================================================================
   13. Breadcrumbs / Pagination / Post nav
   ========================================================================== */

.sb-breadcrumbs {
	font-size: .84rem;
	color: var(--sb-text-soft);
	margin-bottom: 18px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
}
.sb-breadcrumbs a { color: var(--sb-text-soft); }
.sb-breadcrumbs a:hover { color: var(--sb-primary); }
.sb-breadcrumbs__sep { opacity: .5; }

.sb-pagination { margin-top: 36px; }
.sb-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sb-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px; height: 42px;
	padding: 0 12px;
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius-sm);
	background: var(--sb-surface);
	color: var(--sb-text);
	font-family: var(--sb-font-head);
	font-size: .92rem;
}
.sb-pagination .page-numbers:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.sb-pagination .page-numbers.current {
	background: var(--sb-primary);
	border-color: var(--sb-primary);
	color: #fff;
}
.sb-pagination .page-numbers.dots { border-color: transparent; }

.sb-postnav {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 28px;
}
.sb-postnav__item {
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	padding: 16px 18px;
	transition: border-color .2s ease;
}
.sb-postnav__item:hover { border-color: var(--sb-primary); }
.sb-postnav__label { font-size: .78rem; color: var(--sb-text-soft); display: block; margin-bottom: 5px; }
.sb-postnav__title { font-family: var(--sb-font-head); font-size: .96rem; line-height: 1.5; }
.sb-postnav__title a { color: var(--sb-heading); }
.sb-postnav__title a:hover { color: var(--sb-primary); }
.sb-postnav__item--next { text-align: right; }

/* ==========================================================================
   14. ไซด์บาร์และวิดเจ็ต
   ========================================================================== */

.sb-sidebar { position: sticky; top: 96px; }

.sb-widget {
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	padding: 20px;
	margin-bottom: 24px;
}
.sb-widget:last-child { margin-bottom: 0; }

.sb-widget__title {
	font-size: 1.05rem;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--sb-border);
	position: relative;
}
.sb-widget__title::after {
	content: "";
	position: absolute;
	bottom: -2px; left: 0;
	width: 48px; height: 3px;
	background: var(--sb-hairline);
	border-radius: 2px;
}

.sb-widget ul { list-style: none; margin: 0; padding: 0; }
.sb-widget ul li {
	padding: 9px 0;
	border-bottom: 1px solid var(--sb-border);
	font-size: .93rem;
}
.sb-widget ul li:last-child { border-bottom: 0; padding-bottom: 0; }
.sb-widget ul li a { color: var(--sb-text); }
.sb-widget ul li a:hover { color: var(--sb-primary); }
.sb-widget .sub-menu, .sb-widget .children { padding-left: 14px; margin-top: 8px; }

.sb-widget select { margin-top: 4px; }

/* ==========================================================================
   15. ฟุตเตอร์
   ========================================================================== */

.sb-footer {
	background: var(--sb-footer-bg);
	color: rgba(255, 255, 255, .68);
	margin-top: 40px;
}

.sb-footer__top {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 36px;
	padding: 52px 0 40px;
}

.sb-footer h1, .sb-footer h2, .sb-footer h3,
.sb-footer h4, .sb-footer h5, .sb-footer h6,
.sb-footer .sb-widget__title { color: #fff; }

.sb-footer .sb-widget {
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0;
}
.sb-footer .sb-widget__title {
	font-size: 1.05rem;
	border-bottom-color: rgba(255, 255, 255, .12);
}

.sb-footer a { color: rgba(255, 255, 255, .68); }
.sb-footer a:hover { color: var(--sb-primary); }
.sb-footer ul li { border-bottom-color: rgba(255, 255, 255, .08); }

.sb-footer__logo { margin-bottom: 16px; }
.sb-footer__logo img,
.sb-footer__logo .custom-logo { max-height: 58px; width: auto; }
.sb-footer__about p { font-size: .92rem; line-height: 1.8; }

.sb-social { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.sb-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
}
.sb-social a:hover { background: var(--sb-primary); color: #fff; }
.sb-social svg { width: 18px; height: 18px; }

.sb-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding: 20px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	font-size: .86rem;
}

.sb-footer__note {
	background: rgba(255, 255, 255, .04);
	border-top: 1px solid rgba(255, 255, 255, .08);
	padding: 16px 0;
	font-size: .8rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, .5);
	text-align: center;
}

.sb-totop {
	position: fixed;
	right: 22px; bottom: 22px;
	width: 46px; height: 46px;
	border: 0;
	border-radius: 50%;
	background: var(--sb-primary);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: all .25s ease;
	z-index: 250;
	box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .5);
}
.sb-totop.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.sb-totop:hover { background: var(--sb-primary-dark); }
.sb-totop svg { width: 20px; height: 20px; }

/* ==========================================================================
   16. คอมเมนต์
   ========================================================================== */

.sb-comments {
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
	padding: 26px;
	margin-top: 28px;
}
.sb-comments__title { font-size: 1.25rem; margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0 0 26px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 26px; }
.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--sb-border);
}
.comment-author { display: flex; align-items: center; gap: 10px; font-family: var(--sb-font-head); }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .8rem; color: var(--sb-text-soft); margin: 4px 0 8px; }
.comment-reply-link {
	font-size: .84rem;
	font-family: var(--sb-font-head);
}
.comment-form label { display: block; font-size: .88rem; margin-bottom: 5px; font-family: var(--sb-font-head); }
.comment-form p { margin-bottom: 14px; }
.comment-form .comment-form-cookies-consent { display: flex; align-items: center; gap: 8px; }
.comment-form .comment-form-cookies-consent input { width: auto; }

/* ==========================================================================
   17. หน้า 404 และไม่พบผลลัพธ์
   ========================================================================== */

.sb-notfound {
	text-align: center;
	padding: 60px 20px;
	background: var(--sb-surface);
	border: 1px solid var(--sb-border);
	border-radius: var(--sb-radius);
}
.sb-notfound__code {
	font-family: var(--sb-font-head);
	font-size: clamp(4rem, 14vw, 8rem);
	line-height: 1;
	color: var(--sb-primary);
	margin: 0 0 10px;
	font-weight: 600;
}
.sb-notfound p { color: var(--sb-text-soft); max-width: 520px; margin: 0 auto 24px; }
.sb-notfound .sb-searchform { max-width: 420px; margin: 0 auto 20px; }

/* ==========================================================================
   18. คลาสมาตรฐานของ WordPress
   ========================================================================== */

.alignleft { float: left; margin: .4em 1.6em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.6em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide { width: min(100%, 1100px); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }

.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-block-image figcaption {
	font-size: .84rem;
	color: var(--sb-text-soft);
	text-align: center;
	margin-top: 8px;
}

.sticky .sb-card { border-color: var(--sb-primary); }
.bypostauthor > .comment-body { border-left: 3px solid var(--sb-primary); padding-left: 14px; }

.wp-block-gallery, .wp-block-embed { margin: 1.6em 0; }

/* ==========================================================================
   19. Responsive
   ========================================================================== */

@media (max-width: 1100px) {
	.sb-layout { grid-template-columns: minmax(0, 1fr); }
	.sb-sidebar { position: static; }
	.sb-hero { grid-template-columns: minmax(0, 1fr); }
	.sb-hero__main { min-height: 340px; }
	.sb-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.sb-nav { display: none; }
	.sb-burger { display: inline-flex; }
	.sb-header__tools { margin-left: auto; }
	.sb-brand img,
	.sb-brand .custom-logo { max-height: 170px; }
	.sb-header.is-stuck .sb-brand img,
	.sb-header.is-stuck .sb-brand .custom-logo { max-height: 72px; }
	.sb-grid--3, .sb-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sb-article__inner { padding: 22px; }
	:root { --sb-gap: 20px; }
}

@media (max-width: 620px) {
	body { font-size: 15.5px; }
	.sb-brand img,
	.sb-brand .custom-logo { max-height: 120px; }
	.sb-grid--2, .sb-grid--3, .sb-grid--4 { grid-template-columns: minmax(0, 1fr); }
	.sb-hero__main { min-height: 280px; }
	.sb-hero__overlay { padding: 22px 18px 18px; }
	.sb-postnav { grid-template-columns: minmax(0, 1fr); }
	.sb-postnav__item--next { text-align: left; }
	.sb-topbar__inner { justify-content: center; }
	.sb-topbar__date { display: none; }
	.sb-article__inner { padding: 18px; }
	.sb-comments { padding: 18px; }
	.sb-matchbox { padding: 20px 16px; }
	.sb-matchbox__team { font-size: 1.05rem; }
	.sb-footer__bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
