/*
Theme Name: Press Desk
Description: ธีม WordPress สำหรับคู่มือและบทความภาษาไทย
Version: 1.1.1
Requires PHP: 7.4
Requires at least: 5.5
Text Domain: press-desk
*/

:root {
	color-scheme: light;
	--pd-paper: #f6f5ef;
	--pd-ink: #172b25;
	--pd-accent: #205943;
	--pd-line: #d7ddd2;
}
* { box-sizing: border-box; }
body {
	margin: 0;
	background: var(--pd-paper);
	color: var(--pd-ink);
	font: 1rem/1.8 "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
}
a { color: var(--pd-accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #9a5414; outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.pd-wrap { width: min(100% - 2rem, 76rem); margin-inline: auto; }
.pd-header { background: #fff; border-top: 5px solid var(--pd-accent); border-bottom: 1px solid var(--pd-line); }
.pd-masthead, .pd-footer .pd-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding-block: 1rem; }
.pd-brand { font-family: Georgia, "Songti SC", SimSun, serif; font-size: 1.9rem; font-weight: 700; text-decoration: none; }
.custom-logo { display: block; width: auto; max-height: 3.5rem; }
.pd-masthead form { margin-inline-start: auto; }
.pd-masthead input, .pd-prose input, .pd-prose textarea { max-width: 100%; font: inherit; }
.pd-header nav ul, .pd-footer nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 0; padding: 0; list-style: none; }
.pd-header nav ul ul, .pd-footer nav ul ul { padding-inline-start: .8rem; }
.pd-main { padding-block: clamp(2rem, 5vw, 4.5rem); min-height: 65vh; }
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 17rem); gap: clamp(1.5rem, 4vw, 3rem); }
.pd-layout-full { grid-template-columns: minmax(0, 1fr); }
.pd-layout h1, .pd-detail h1 { margin: 0 0 1.25rem; font: 700 clamp(2rem, 5vw, 3.7rem)/1.16 Georgia, "Songti SC", SimSun, serif; overflow-wrap: anywhere; }
.pd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1rem; }
.pd-card, .pd-ads { background: #fff; border: 1px solid var(--pd-line); overflow-wrap: anywhere; }
.pd-card > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pd-card-copy, .pd-ads { padding: 1.25rem; }
.pd-card h2 { margin: .35rem 0; font-size: 1.25rem; line-height: 1.4; }
.pd-card p:last-child { margin-bottom: 0; }
.pd-meta { margin: 0; color: #505e55; font-size: .875rem; }
.pd-meta span { margin-inline-start: .7rem; }
.pd-ads { align-self: start; border-top: 3px solid var(--pd-accent); }
.pd-ads h2 { margin-top: 0; font-size: 1rem; }
.pd-ads ul { padding-inline-start: 1.2rem; margin-bottom: 0; }
.pd-detail { max-width: 47rem; margin-inline: auto; overflow-wrap: anywhere; }
.pd-wide .pd-detail { max-width: 100%; }
.pd-detail > img, .pd-prose { margin-top: 1.5rem; }
.pd-prose { font-size: 1.0625rem; }
.pd-prose iframe, .pd-prose video { max-width: 100%; }
.pd-prose pre { overflow: auto; }
.pd-footer { border-top: 1px solid var(--pd-line); }
.pagination { margin-top: 1.5rem; }
.page-numbers { display: inline-block; padding: .25rem .5rem; }
.pd-skip, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.pd-skip:focus, .screen-reader-text:focus { z-index: 10; width: auto; height: auto; clip-path: none; background: white; padding: .5rem; }
@media (max-width: 48rem) {
	.pd-layout { grid-template-columns: 1fr; }
	.pd-masthead form { margin-inline-start: 0; }
}


:root {
	color-scheme: light;
	--pd-paper: var(--bg);
	--pd-ink: var(--text-dark);
	--pd-accent: #0369a1;
	--pd-line: var(--border);
}
body { font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif; }
.faw-brand { display: inline-block; margin-block: 0; color: #fff; font: 900 2rem/1.15 system-ui, sans-serif; letter-spacing: -.06em; text-decoration: none; }
.faw-brand span { color: var(--primary); }
.faw-brand:hover, footer .faw-brand:hover { color: #e0f2fe; }
.faw-nav-action { display: inline-block; padding: 9px 22px; font-size: .9rem; }
.faw-locale {
	position: fixed;
	z-index: 1080;
	bottom: 16px;
	left: 16px;
	padding: .5em .9em;
	border-radius: 999px;
	background: rgba(20, 20, 20, .82);
	color: white;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
.faw-locale:hover { color: #bae6fd; }
.faw-search { display: flex; gap: .35rem; max-width: 100%; }
.faw-search input, .faw-search button { min-width: 0; padding: .4rem .6rem; border: 1px solid var(--pd-line); border-radius: .45rem; font: inherit; }
.faw-search button { background: var(--primary); color: var(--secondary); }
.pd-layout h1, .pd-detail h1 { font-family: inherit; }
.pd-prose details { margin-block: .8rem; padding: .9rem; border: 1px solid var(--pd-line); border-radius: .6rem; background: white; }
.pd-prose summary { cursor: pointer; font-weight: 700; }
.hero-section .container { position: relative; z-index: 1; }
.feature-card { height: 100%; }
.feature-card a { color: inherit; text-decoration-thickness: .08em; }
.rg-section h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: #fff; }
.section-white .btn-outline-custom { border-color: #0369a1; color: #075985; }
.compare-table tbody th { padding: 13px 16px; }

.faw-account-bar {
	position: fixed;
	z-index: 1070;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: .875rem;
	white-space: nowrap;
}
.faw-account-bar a { padding: .65rem 1.5rem; border-radius: .3rem; font-weight: 800; text-decoration: none; }
.faw-account-register { background: #ffca28; color: #1e293b; }
.faw-account-login { background: #00963b; color: #fff; }
.faw-account-bar button {
	position: absolute;
	top: .25rem;
	right: .25rem;
	width: 1.2rem;
	height: 1.2rem;
	padding: 0;
	border: 1px solid #ffffff65;
	border-radius: 50%;
	color: #fff;
	background: #005a23;
	line-height: 1;
}
@media (max-width: 570px) {
	.faw-account-bar { bottom: 3.5rem; }
	.faw-account-bar a { padding-inline: 1.15rem; }
}
@media (min-width: 992px) {
	.navbar > .container { min-height: 54px; }
}
.faw-guide-intro { color: var(--text-muted); font-size: 1.22rem; }
.faw-guide-toc {
	margin-block: 1.5rem 2rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--pd-line);
	border-left: 4px solid var(--accent);
	border-radius: .65rem;
	background: var(--card-bg);
}
.faw-guide-toc p { margin: 0 0 .5rem; font-weight: 800; }
.faw-guide-toc ul { margin: 0; padding-inline-start: 1.2rem; }
.faw-guide-toc li { margin-block: .3rem; }
.faw-guide-section {
	margin-block: 1.2rem;
	padding: clamp(1rem, 4vw, 1.65rem);
	border: 1px solid var(--pd-line);
	border-radius: .75rem;
	background: #fff;
	scroll-margin-top: 6.5rem;
}
.faw-guide-section h2 { margin-bottom: .75rem; font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 800; }
.faw-guide-section p:last-child { margin-bottom: 0; }
