/* สไตล์ส่วนเพิ่ม: เมนูแอดมิน / H1 + คำถามที่พบบ่อยหน้าแรก (AEO) / ลิงก์นโยบายท้ายเว็บ / หน้านโยบาย / หน้า 404 / หน้าแอดมิน (ภาพแชร์, บันทึกคุกกี้) */

/* ---------- เมนูแอดมินใน navtop (แสดงเฉพาะตอนเข้าสู่ระบบแอดมิน) ---------- */
nav.navbar.bootsnav ul.nav > li.nav-admin > a {
	color: #0B5E86 !important;
	font-weight: 600;
}

nav.navbar.bootsnav ul.nav > li.nav-admin > a .nav-admin-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 999px;
	background: #e6f5fc;
	border: 1px solid #bfe3f4;
	line-height: 1.2;
	transition: background .15s ease, color .15s ease;
}

nav.navbar.bootsnav ul.nav > li.nav-admin:hover > a .nav-admin-badge,
nav.navbar.bootsnav ul.nav > li.nav-admin.active > a .nav-admin-badge {
	background: linear-gradient(120deg, #127DB0 0%, #0B5E86 100%);
	border-color: transparent;
	color: #FFF;
}

nav.navbar.bootsnav ul.nav > li.nav-admin .dropdown-menu li a {
	font-size: 14px;
	text-transform: none;
	white-space: nowrap;
}

/* เมนูแอดมินอยู่ขวาสุดของแถบเมนู ให้เมนูย่อยชิดขวา ไม่ล้นขอบจอ */
@media (min-width: 992px) {
	nav.navbar.bootsnav ul.nav > li.nav-admin > .dropdown-menu {
		left: auto;
		right: 0;
		min-width: 270px;
	}
}

nav.navbar.bootsnav ul.nav > li.nav-admin .dropdown-menu li a i {
	width: 22px;
	margin-right: 6px;
	text-align: center;
	color: #39C0FF;
}

nav.navbar.bootsnav ul.nav > li.nav-admin .dropdown-menu li.nav-admin-logout {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, .12);
}

/* ---------- หน้าแรก: แบนเนอร์บนสุด (section_banner_top.php) ---------- */
/* แถบเมนูของธีมลอยทับเนื้อหา (fixed) เว้นที่เท่าความสูง topbar + เมนู ไม่ให้ภาพแบนเนอร์ถูกบัง */
.home-top-banner { margin-top: 128px; }

@media (max-width: 991px) {
	.home-top-banner { margin-top: 116px; }
}

/* ---------- หน้าแรก: คำตอบสรุป + คำถามที่พบบ่อย (AEO) — section_faq.php ---------- */
.aeo-section {
	padding: 70px 0 80px;
	background: linear-gradient(180deg, #f3fafe 0%, #FFF 100%);
}

.aeo-head {
	max-width: 760px;
	margin: 0 auto 26px;
	text-align: center;
}

.aeo-head h2 {
	font-size: 30px;
	line-height: 40px;
	font-weight: 600;
	color: #127DB0;
	margin-bottom: 14px;
}

.aeo-answer {
	max-width: 860px;
	margin: 0 auto 30px;
	padding: 20px 24px 20px 64px;
	position: relative;
	border-radius: 18px;
	background: #FFF;
	border: 1px solid #d9eef8;
	box-shadow: 0 10px 30px rgba(16, 90, 130, .08);
	font-size: 17px;
	line-height: 1.8;
	color: #2b3a46;
}

.aeo-answer::before {
	content: "\f05a";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute;
	left: 22px;
	top: 20px;
	font-size: 24px;
	color: #39C0FF;
}

.aeo-answer strong { color: #0B5E86; }

.aeo-faq {
	max-width: 860px;
	margin: 0 auto;
}

.aeo-faq details {
	margin-bottom: 10px;
	border-radius: 14px;
	background: #FFF;
	border: 1px solid #e3eef4;
	box-shadow: 0 4px 14px rgba(16, 90, 130, .05);
	overflow: hidden;
}

.aeo-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 16px 20px;
	cursor: pointer;
	list-style: none;
	font-size: 17px;
	font-weight: 600;
	color: #1d2733;
}

.aeo-faq summary::-webkit-details-marker { display: none; }

.aeo-faq summary::after {
	content: "\2b";
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #e6f5fc;
	color: #127DB0;
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 13px;
	transition: transform .2s ease;
}

.aeo-faq details[open] summary::after { transform: rotate(45deg); }

.aeo-faq summary:focus-visible {
	outline: 3px solid #ffb400;
	outline-offset: -3px;
}

.aeo-faq .aeo-faq-a {
	padding: 0 20px 18px;
	font-size: 16px;
	line-height: 1.8;
	color: #4a5763;
}

.aeo-cta {
	margin-top: 26px;
	text-align: center;
}

@media (max-width: 767px) {
	.aeo-section { padding: 46px 0 56px; }
	.aeo-head h2 { font-size: 24px; line-height: 34px; }
	.aeo-answer { padding: 16px 16px 16px 50px; font-size: 16px; }
	.aeo-answer::before { left: 16px; top: 17px; font-size: 20px; }
	.aeo-faq summary { padding: 14px 16px; font-size: 16px; }
	.aeo-faq .aeo-faq-a { padding: 0 16px 16px; }
}

/* ---------- หน้า 404 ---------- */
.page-404 {
	padding: 70px 0 90px;
	text-align: center;
}

.page-404-code {
	font-size: 96px;
	line-height: 1;
	font-weight: 700;
	color: #d9eef8;
	margin-bottom: 10px;
}

.page-404 h2 {
	font-size: 26px;
	line-height: 36px;
	color: #1d2733;
	margin-bottom: 12px;
}

.page-404 p { margin-bottom: 24px; }

/* ---------- หน้านโยบาย ---------- */
/* ธีมนี้ให้ <section> มี padding ใหญ่ ตั้งค่าเฉพาะหน้านโยบายให้กระชับ */
.policy-section { padding: 50px 0 70px; }

.policy-section { background: #f5f5f5; }

.policy-page {
	max-width: 940px;
	margin: 0 auto;
	padding: 34px 44px 40px;
	background: #FFF;
	border-radius: 20px;
	box-shadow: 0 10px 34px rgba(0, 0, 0, .06);
}

.policy-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.policy-tabs a {
	padding: 8px 16px;
	border-radius: 999px;
	background: #f2f2f2;
	color: #444;
	font-size: 15px;
	text-decoration: none !important;
	transition: background .15s ease;
}

.policy-tabs a:hover { background: #e7e7e7; }

.policy-tabs a.active {
	background: linear-gradient(120deg, #127DB0 0%, #0B5E86 100%);
	color: #FFF;
}

.policy-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	padding-bottom: 18px;
	margin-bottom: 22px;
	border-bottom: 1px solid #ececec;
	font-size: 14px;
	color: #777;
}

.policy-meta i { color: #127DB0; margin-right: 4px; }

.policy-body {
	color: #2b2b2b;
	font-size: 16px;
}

.policy-body p {
	line-height: 1.85 !important;
	margin-bottom: 12px !important;
	color: #2b2b2b;
}

.policy-body .policy-lead {
	font-size: 17px;
	color: #444;
	margin-bottom: 20px !important;
}

.policy-body h2 {
	position: relative;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.4;
	color: #1f1f1f;
	margin: 34px 0 12px;
	padding-left: 14px;
	scroll-margin-top: 20px;
}

.policy-body h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 4px;
	border-radius: 4px;
	background: #127DB0;
}

.policy-body h3 {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
	color: #333;
	margin: 20px 0 8px;
}

.policy-body ul,
.policy-body ol {
	padding-left: 22px;
	margin-bottom: 14px;
}

.policy-body li {
	line-height: 1.8;
	margin-bottom: 6px;
}

.policy-body a { color: #127DB0; }

.policy-body code {
	padding: 1px 6px;
	border-radius: 6px;
	background: #f3f3f3;
	color: #0B5E86;
	font-size: 14px;
}

.policy-toc {
	padding: 16px 22px;
	margin-bottom: 8px;
	border-radius: 14px;
	background: #fafafa;
	border: 1px solid #eee;
}

.policy-toc-title {
	font-weight: 700;
	margin-bottom: 6px;
}

.policy-toc ol {
	columns: 2;
	column-gap: 28px;
	margin: 0;
}

.policy-toc li { margin-bottom: 2px; }

.policy-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 14px;
	font-size: 15px;
}

.policy-table th,
.policy-table td {
	padding: 10px 12px;
	border: 1px solid #e6e6e6;
	vertical-align: top;
	line-height: 1.6;
}

.policy-table th {
	background: #f7f7f7;
	font-weight: 700;
	color: #333;
	white-space: nowrap;
}

.policy-tag {
	display: inline-block;
	padding: 2px 10px;
	margin-left: 6px;
	border-radius: 999px;
	background: #f2f2f2;
	color: #666;
	font-size: 12px;
	font-weight: 600;
	vertical-align: middle;
}

.policy-tag-on { background: #e8f7ee; color: #16803c; }

.policy-note {
	font-size: 14px;
	color: #777 !important;
}

.policy-callout {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 22px;
	margin-bottom: 10px;
	border-radius: 16px;
	background: #f1f9fd;
	border: 1px solid #cfe8f5;
}

.policy-callout p { margin: 2px 0 0 !important; color: #666; }

.policy-callout .cc-btn { flex: none; }

.policy-contact {
	padding: 18px 22px;
	border-radius: 16px;
	background: #fafafa;
	border: 1px solid #eee;
}

.policy-contact-title {
	font-weight: 700;
	font-size: 17px;
	margin-bottom: 8px;
}

.policy-contact-title i { color: #127DB0; margin-right: 6px; }

.policy-contact ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.policy-contact li {
	display: flex;
	gap: 10px;
	margin-bottom: 4px;
}

.policy-contact li i {
	width: 18px;
	margin-top: 6px;
	text-align: center;
	color: #888;
}

@media (max-width: 767px) {
	.policy-page {
		padding: 22px 18px 26px;
		border-radius: 14px;
	}

	.policy-toc ol { columns: 1; }

	.policy-callout {
		flex-direction: column;
		align-items: stretch;
	}

	.policy-body h2 { font-size: 19px; }
}

/* ---------- แอดมิน: ภาพแชร์ og:image ---------- */
.og-setting {
	padding-bottom: 20px;
	border-bottom: 1px solid #eee;
}

.og-setting-row {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin-top: 6px;
}

.og-preview {
	flex: 0 0 300px;
	max-width: 100%;
	aspect-ratio: 1.91 / 1; /* สัดส่วนที่ Facebook ใช้แสดงภาพ */
	overflow: hidden;
	border-radius: 12px;
	background: #f2f2f2;
	border: 1px solid #e3e3e3;
}

.og-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.og-setting-info { flex: 1; min-width: 0; }

@media (max-width: 767px) {
	.og-setting-row { flex-direction: column; }
	.og-preview { flex-basis: auto; width: 100%; }
}

/* ---------- แอดมิน: บันทึกความยินยอมคุกกี้ ---------- */
.pdpa-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}

.pdpa-stat {
	display: flex;
	flex-direction: column;
	padding: 16px 18px;
	border-radius: 16px;
	background: #FFF;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .06);
}

.pdpa-stat span { font-size: 14px; color: #777; }
.pdpa-stat strong { font-size: 30px; line-height: 1.3; color: #1f1f1f; }
.pdpa-stat small { font-size: 13px; color: #999; }

.pdpa-card {
	border-radius: 16px;
	background: #FFF;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .06);
	overflow: hidden;
}

.pdpa-card-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	padding: 14px 18px;
	border-bottom: 1px solid #eee;
}

.pdpa-card-head span { color: #888; font-size: 14px; }

.pdpa-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.pdpa-table th,
.pdpa-table td {
	padding: 10px 14px;
	border-bottom: 1px solid #f0f0f0;
	vertical-align: middle;
}

.pdpa-table th {
	background: #fafafa;
	color: #555;
	font-weight: 600;
	white-space: nowrap;
}

.pdpa-page {
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pdpa-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.pdpa-badge-on { background: #e8f7ee; color: #16803c; }
.pdpa-badge-off { background: #f1f1f1; color: #666; }
.pdpa-badge-custom { background: #e9f1fd; color: #1d5fbf; }
.pdpa-yes { color: #16a34a; }
.pdpa-no { color: #c4c4c4; }
.pdpa-empty { padding: 30px !important; color: #999; }

.pdpa-footnote {
	margin-top: 16px !important;
	font-size: 14px;
	color: #777 !important;
	line-height: 1.7 !important;
}

/* ---------- แอดมิน: แดชบอร์ด (page-admin-menu.php) ---------- */
.admin-dash {
	padding: 40px 0 70px;
	background: linear-gradient(180deg, #f3fafe 0%, #FFF 360px);
}

.admin-dash-hello {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 28px 32px;
	margin-bottom: 22px;
	border-radius: 22px;
	background: linear-gradient(120deg, #127DB0 0%, #0B5E86 100%);
	color: #FFF;
	box-shadow: 0 16px 36px rgba(11, 94, 134, .25);
}

.admin-dash-hello h2 {
	font-size: 28px;
	line-height: 38px;
	font-weight: 700;
	color: #FFF;
	margin-bottom: 4px;
}

.admin-dash-hello p { margin: 0; color: rgba(255, 255, 255, .85); }
.admin-dash-date { font-size: 14px; color: rgba(255, 255, 255, .8); margin-bottom: 6px; }

.admin-dash-logout {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .15);
	border: 1px solid rgba(255, 255, 255, .35);
	color: #FFF !important;
	font-weight: 600;
	text-decoration: none !important;
	transition: background .15s ease;
}

.admin-dash-logout:hover { background: rgba(255, 255, 255, .28); }

.admin-dash-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 14px;
	margin-bottom: 34px;
}

.admin-dash-stat {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px;
	border-radius: 18px;
	background: #FFF;
	border: 1px solid #e3eef4;
	box-shadow: 0 6px 20px rgba(16, 90, 130, .06);
}

.admin-dash-stat-icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: #e6f5fc;
	color: #127DB0;
	font-size: 19px;
}

.admin-dash-stat small { display: block; font-size: 13px; color: #6b7785; }
.admin-dash-stat strong { display: block; font-size: 26px; line-height: 1.25; color: #1d2733; }
.admin-dash-stat strong.admin-dash-stat-text { font-size: 18px; line-height: 1.6; }

.admin-dash-title {
	font-size: 20px;
	font-weight: 700;
	color: #1d2733;
	margin-bottom: 14px;
}

.admin-dash-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 14px;
	margin-bottom: 26px;
}

.admin-dash-card {
	--dash-c: #127DB0;
	--dash-bg: #e6f5fc;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	border-radius: 18px;
	background: #FFF;
	border: 1px solid #e3eef4;
	box-shadow: 0 6px 20px rgba(16, 90, 130, .06);
	text-decoration: none !important;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.admin-dash-card:hover {
	transform: translateY(-3px);
	border-color: var(--dash-c);
	box-shadow: 0 14px 30px rgba(16, 90, 130, .12);
}

.admin-dash-card:focus-visible { outline: 3px solid #ffb400; outline-offset: 3px; }

.admin-dash-purple { --dash-c: #7c3aed; --dash-bg: #f1eafe; }
.admin-dash-orange { --dash-c: #d97706; --dash-bg: #fff3e0; }
.admin-dash-teal   { --dash-c: #0d9488; --dash-bg: #e2f6f4; }
.admin-dash-green  { --dash-c: #16a34a; --dash-bg: #e8f7ee; }
.admin-dash-gray   { --dash-c: #475569; --dash-bg: #eef2f6; }

.admin-dash-card-icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	border-radius: 15px;
	background: var(--dash-bg);
	color: var(--dash-c);
	font-size: 21px;
}

.admin-dash-card-text { flex: 1; min-width: 0; }
.admin-dash-card-text strong { display: block; font-size: 17px; line-height: 1.4; color: #1d2733; }
.admin-dash-card-text small { display: block; font-size: 14px; line-height: 1.5; color: #6b7785; }

.admin-dash-card-arrow {
	flex: none;
	color: #b6c2cc;
	font-size: 14px;
	transition: transform .2s ease, color .2s ease;
}

.admin-dash-card:hover .admin-dash-card-arrow { color: var(--dash-c); transform: translateX(3px); }

.admin-dash-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
	padding: 14px 18px;
	border-radius: 14px;
	background: #f6f9fb;
	font-size: 14px;
	color: #6b7785;
}

.admin-dash-tools a { color: #0B5E86; }

/* เลื่อนไปที่ส่วนภาพแชร์/บัญชีในหน้าแก้ไขข้อมูลระบบ ไม่ให้ถูกแถบเมนูบัง */
#og, #account { scroll-margin-top: 150px; }

@media (prefers-reduced-motion: reduce) {
	.admin-dash-card, .admin-dash-card-arrow { transition: none; }
}

@media (max-width: 767px) {
	.admin-dash { padding: 24px 0 50px; }
	.admin-dash-hello { flex-direction: column; align-items: flex-start; padding: 22px 20px; }
	.admin-dash-hello h2 { font-size: 22px; line-height: 32px; }
	.admin-dash-grid { grid-template-columns: 1fr; }
	/* สถิติ 2 คอลัมน์ ไอคอนอยู่บนตัวเลข */
	.admin-dash-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
	.admin-dash-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
	.admin-dash-stat-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 16px; }
	.admin-dash-stat strong { font-size: 22px; }
	.admin-dash-stat strong.admin-dash-stat-text { font-size: 16px; }
}

/* ---------- แอดมิน: แบนเนอร์หน้าแรก (page-admin-home-banner.php) ---------- */
.og-preview.banner-preview { flex-basis: 380px; }
.og-preview.banner-preview-mobile { flex-basis: 200px; aspect-ratio: 1 / 1; }
.og-preview.banner-preview-mobile img { object-fit: contain; }
