/*
Theme Name: YooPlearn
Description: ธีมวารสารไลฟ์สไตล์ภาษาไทยของอยู่เพลิน
Version: 1.0.2
Author: YooPlearn
Text Domain: yooplearn
Requires PHP: 8.0
*/

@font-face {
	font-family: 'Yoo Sans';
	src: url('assets/fonts/noto-sans-thai.woff2') format('woff2');
	font-weight: 100 900;
	font-display: swap;
	unicode-range: U+0E01-0E5B, U+25CC;
}
@font-face {
	font-family: 'Yoo Serif';
	src: url('assets/fonts/noto-serif-thai.woff2') format('woff2');
	font-weight: 100 900;
	font-display: swap;
	unicode-range: U+0E01-0E5B, U+25CC;
}
:root {
	--cream: #fff9f0;
	--ink: #20362e;
	--green: #39634f;
	--rust: #c85d43;
	--rust-text: #953c2a;
	--muted: #526258;
	--line: #dfdacf;
	--paper: #f6efe3;
	--sand: #fbf3e6;
	--sans: 'Yoo Sans', system-ui, Tahoma, sans-serif;
	--serif: 'Yoo Serif', Georgia, 'Leelawadee UI', serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.75 var(--sans); }
a { color: var(--green); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
	outline: 2px solid var(--rust-text);
	outline-offset: 4px;
}
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.34; }
p, ul { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; flex: none; }
button, input { font: inherit; }
.shell { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px;
	margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; white-space: nowrap;
}
.skip-link:focus {
	clip: auto; clip-path: none; width: auto; height: auto; z-index: 20;
	top: 12px; left: 12px; background: var(--cream); padding: 8px 16px;
}
.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; justify-content: space-between; align-items: center; position: relative; gap: 24px; min-height: 79px; }
.wordmark { display: inline-flex; align-items: center; width: 176px; min-width: 0; max-width: 100%; min-height: 44px; }
.wordmark img { width: 100%; height: auto; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; list-style: none; padding: 0; gap: 5px clamp(12px, 2.2vw, 31px); }
.nav-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-size: .9rem; font-weight: 600; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--rust-text); text-decoration: underline; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.mobile-nav { display: none; }
summary.icon-button { list-style: none; }
summary.icon-button::-webkit-details-marker { display: none; }
.icon-button {
	display: grid; place-items: center; width: 45px; height: 45px; cursor: pointer; color: var(--green);
	border: 1px solid #c5ccbe; border-radius: 50%; background: var(--cream);
}
.icon-button:hover, details[open] > .icon-button { background: #e9eee4; }
.header-panel {
	position: absolute; inset: calc(100% + 8px) 0 auto auto; z-index: 5; width: min(375px, 100%);
	border: 1px solid var(--line); border-radius: 14px; padding: 16px;
	background: var(--cream); box-shadow: 0 12px 32px #20362e20;
}
.mobile-nav[open] .header-panel { z-index: 6; }
.header-panel .nav-links { display: grid; gap: 0; }
.header-panel .nav-links a { display: flex; padding: 0 10px; }
.search-form { display: flex; max-width: 440px; gap: 8px; margin-top: 18px; }
.header-panel .search-form { margin: 0; }
.search-form input { flex: 1; min-width: 0; border: 1px solid #9ca89a; border-radius: 8px; background: #fffdf9; color: var(--ink); padding: 8px 12px; }
.search-form input::placeholder { color: var(--muted); }
.button {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px;
	padding: 9px 18px; border: 1px solid transparent; border-radius: 8px; background: var(--green);
	color: var(--cream); cursor: pointer; text-decoration: none; font-size: .91rem; font-weight: 600;
}
.button:hover { background: var(--ink); }
.button svg, .text-link svg { width: 19px; height: 19px; }
.eyebrow, .section-index {
	color: var(--rust-text); font: 700 .77rem/1.6 var(--sans); letter-spacing: .07em;
}
.with-dot { display: flex; align-items: center; gap: 9px; }
.with-dot::before { content: ''; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--rust); }
.intro { padding: 44px 0 29px; }
.intro h1 { font-size: clamp(2.75rem, 5.4vw, 4.75rem); margin: 6px 0 8px; }
.intro-accent { color: var(--green); margin-inline-start: .15em; display: inline-block; }
.intro-copy { color: var(--muted); font-size: clamp(.98rem, 1.8vw, 1.16rem); }
.feature {
	display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
	background: var(--paper); border: 1px solid var(--line); border-radius: 19px; overflow: hidden;
}
.feature-media { position: relative; min-height: 0; aspect-ratio: 1.72; }
.feature-media img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.feature-copy { padding: clamp(26px, 4vw, 58px); align-self: center; }
.feature-copy:only-child { grid-column: 1 / -1; }
.feature h2 { font-size: clamp(1.75rem, 3vw, 2.85rem); margin: 10px 0 12px; max-width: 17ch; }
.feature h2 a, .post-card h3 { color: var(--ink); text-decoration: none; }
.feature h2 a:hover { text-decoration: underline; }
.feature-copy > p:not(.eyebrow) { color: var(--muted); max-width: 39ch; }
.feature-button { margin-top: 20px; }
.home-section { margin-top: clamp(34px, 5vw, 59px); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; border-bottom: 1px solid var(--line); padding-bottom: 11px; margin-bottom: 20px; }
.section-heading h2 { font-size: clamp(1.62rem, 3vw, 2.22rem); }
.section-index { color: var(--muted); font-size: .68rem; white-space: nowrap; }
.topic-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; list-style: none; padding: 0; }
.topic {
	display: flex; align-items: center; gap: 10px; height: 100%; min-height: 69px; padding: 10px 12px;
	color: var(--ink); font-size: clamp(.88rem, 1.3vw, 1.04rem); font-weight: 700;
	text-decoration: none; border: 1px solid var(--line); border-radius: 11px; background: #f3efdf;
}
.topic-style { background: #eeeade; }
.topic-hobbies { background: #f6e9dc; }
.topic-weekend { background: #e9eee3; }
.topic:hover { border-color: var(--green); text-decoration: underline; }
.topic-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; background: #fff9ef; color: var(--green); border-radius: 50%; }
.topic-icon svg { width: 20px; height: 20px; }
.topic > svg { margin-left: auto; width: 17px; height: 17px; color: var(--green); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 27px 23px; }
.post-card { min-width: 0; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.card-link { display: block; text-decoration: none; }
.card-link:hover h3 { text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: .18em; }
.card-media { aspect-ratio: 1.62; overflow: hidden; border-radius: 12px; background: var(--paper); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-copy { padding-top: 12px; }
.post-card h3 { font-size: clamp(1.22rem, 2vw, 1.57rem); margin-top: 5px; }
.card-excerpt { color: var(--muted); margin-top: 7px; font-size: .92rem; }
.card-date { color: var(--muted); font-size: .79rem; margin-top: 10px; }
.banner { margin-top: 42px; }
.banner-inner { display: grid; justify-items: center; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--sand); }
.site-footer { margin-top: clamp(52px, 7vw, 94px); background: #edf0e7; border-top: 1px solid #d4dccf; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 23px; }
.footer-row .wordmark { width: 146px; }
.footer-row p, .footer-note { color: var(--muted); font-size: .85rem; }
.footer-row p { margin-top: 8px; }
.footer-note { border-top: 1px solid #d4dccf; padding-block: 14px; }
.archive { min-height: 48vh; }
.page-intro { padding: clamp(36px, 6vw, 77px) 0 27px; border-bottom: 1px solid var(--line); margin-bottom: 25px; }
.page-intro h1, .story-head h1, .error-state h1 { font-size: clamp(2.28rem, 5.5vw, 4.15rem); margin: 10px 0 12px; overflow-wrap: anywhere; }
.page-intro p:not(.eyebrow), .archive-description { color: var(--muted); max-width: 48ch; overflow-wrap: anywhere; }
.empty-state { padding: clamp(20px, 5vw, 49px); background: var(--paper); border-radius: 15px; border: 1px solid var(--line); }
.error-state { margin-top: clamp(32px, 6vw, 74px); }
.empty-state h2 { font-size: clamp(1.45rem, 3.5vw, 2.2rem); margin-bottom: 10px; }
.empty-state p:not(.eyebrow) { color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; margin-top: 16px; min-height: 44px; }
.pagination { margin-top: 29px; }
.nav-links > .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; }
.page-numbers.current { background: var(--green); color: var(--cream); }
.reading { max-width: 982px; }
.story-head { max-width: 780px; padding: clamp(37px, 6vw, 70px) 0 25px; margin-inline: auto; }
.story-categories { flex-wrap: wrap; }
.story-categories a { color: var(--rust-text); }
.story-meta { display: flex; flex-wrap: wrap; gap: 11px; color: var(--muted); font-size: .9rem; }
.story-cover { aspect-ratio: 1.92; border-radius: 17px; overflow: hidden; background: var(--paper); }
.story-cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { max-width: 710px; margin: clamp(26px, 5vw, 47px) auto 0; font-size: clamp(1.03rem, 1.8vw, 1.18rem); line-height: 1.95; overflow-wrap: anywhere; }
.story-head + .prose { margin-top: 0; }
.prose > * + * { margin-top: 1.13em; }
.prose :is(h2, h3) { margin-top: 1.5em; }
.prose h2 { font-size: 1.54em; }
.prose h3 { font-size: 1.25em; }
.prose :is(ul, ol) { padding-inline-start: 1.5em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { border-inline-start: 3px solid var(--rust); padding-inline-start: 18px; margin-inline: 0; }
.prose :is(iframe, video, embed) { max-width: 100%; }
.related .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1020px) {
	.desktop-nav { display: none; }
	.mobile-nav { display: block; }
}
@media (max-width: 739px) {
	.shell { width: calc(100% - 36px); }
	.header-row { min-height: 65px; }
	.wordmark { width: 150px; }
	.intro { padding: 30px 0 23px; }
	.feature { grid-template-columns: minmax(0, 1fr); border-radius: 15px; }
	.feature-media { aspect-ratio: 1.61; }
	.feature-copy { padding: 23px; }
	.feature h2 { max-width: none; }
	.topic-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
	.topic { gap: 7px; min-height: 60px; padding: 8px; }
	.topic-icon { width: 29px; height: 29px; }
	.topic-icon svg { width: 16px; height: 16px; }
	.topic > svg { width: 14px; }
	.post-grid, .related .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
}
@media (max-width: 549px) {
	.post-grid, .related .post-grid { grid-template-columns: minmax(0, 1fr); }
	.intro h1 { font-size: clamp(2.1rem, 8.8vw, 2.8rem); }
	.story-cover { aspect-ratio: 1.5; }
}
@media (max-width: 350px) {
	.topic > svg { display: none; }
}

.yp-breadcrumbs ol{display:flex;flex-wrap:wrap;gap:.5rem;list-style:none;padding:0;font-size:.9rem}.yp-breadcrumbs li+li:before{content:'→';margin-right:.5rem}.current-menu-item>a,[aria-current=page]{font-weight:700;text-decoration:underline;text-underline-offset:5px}.site-footer h2{font-size:1rem}.site-footer nav .nav-links{display:grid;gap:12px}.footer-row{flex-wrap:wrap}.story-tags{margin:24px 0}a:focus-visible,summary:focus-visible,button:focus-visible,input:focus-visible{outline:3px solid #39634F;outline-offset:4px}@media(max-width:1100px){.desktop-nav{display:none}.mobile-nav{display:block}}
