/*
Theme Name: N98 Editorial
Description: N98 Thai editorial site with native WordPress content editing.
Version: 1.0.0
Text Domain: n98-editorial
*/
:root{--ink:#17233b;--nav:#182c50;--gold:#f3b73b;--red:#b92b36;--paper:#f7f9fc;--line:#d9e0ea;--muted:#5c677a;--max:1180px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.75 system-ui,-apple-system,"Noto Sans Thai",Tahoma,sans-serif}a{color:#164477;text-decoration:none}a:hover{text-decoration:underline}img{max-width:100%;height:auto}button,a{touch-action:manipulation}.wrap{width:min(var(--max),calc(100% - 48px));margin:auto}.site-header{background:var(--nav);color:#fff;position:relative;z-index:5}.header-inner{display:flex;align-items:center;gap:24px;min-height:74px}.brand{font-weight:900;letter-spacing:0;color:#fff;font-size:32px;line-height:1;white-space:nowrap}.brand span{color:var(--gold)}.brand small{display:block;font-size:9px;letter-spacing:0;color:#cfdae9;text-align:right;margin-top:4px}.site-nav{display:flex;flex-wrap:wrap;align-items:center;gap:5px 18px;margin:auto}.site-nav a{font-size:14px;font-weight:700;color:#ecf0f7;white-space:nowrap}.head-actions{display:flex;gap:8px;flex-shrink:0}.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:9px 18px;border-radius:4px;font-weight:800;line-height:1.3}.button:hover{text-decoration:none;filter:brightness(1.06)}.button-gold{background:var(--gold);color:#18233d}.button-red{background:var(--red);color:#fff}.button-outline{border:1px solid #b9c4d5;color:#fff}.mobile-nav{display:none}.hero{background:#1c1641 url('assets/n98-background.webp') center/cover no-repeat;color:#fff}.hero-inner{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);align-items:center;gap:38px;min-height:420px;padding:60px 0}.eyebrow{color:var(--gold);font-weight:800;text-transform:uppercase;font-size:13px}.hero h1{font-size:clamp(30px,4vw,48px);line-height:1.23;margin:14px 0 20px}.hero p{max-width:640px;font-size:18px;line-height:1.7;color:#e4e7f0}.hero-art{width:100%;max-height:330px;object-fit:contain;object-position:center}.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:25px}.section{padding:44px 0}.section h2{font-size:27px;line-height:1.35;margin:0 0 20px}.section-intro{max-width:850px;color:var(--muted);margin:0 0 24px}.topic-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.topic{background:#fff;border:1px solid var(--line);border-radius:4px;padding:20px;min-height:170px}.topic strong{display:block;font-size:20px;line-height:1.35}.topic p{font-size:14px;color:var(--muted);line-height:1.6}.topic a:after{content:' →';color:#bb7824}.site-main{min-height:50vh}.page-banner{background:#241838 url('assets/n98-background.webp') center 44%/cover;color:#fff;text-align:center;padding:66px 0 62px}.page-banner h1{font-size:clamp(27px,3.2vw,38px);line-height:1.35;margin:0 auto 8px;max-width:920px}.crumbs{font-size:13px;color:#d3dae4}.crumbs a{color:#f1c45c}.article-shell{max-width:1000px;margin:0 auto;padding:32px 0 60px}.article-shell .entry-content{background:#fff;padding:34px 44px;border:1px solid var(--line);border-radius:4px}.entry-content h2{font-size:26px;line-height:1.4;margin:40px 0 15px}.entry-content h3{font-size:20px;line-height:1.4;margin:27px 0 12px}.entry-content p{margin:0 0 18px}.entry-content ul{padding-left:24px}.entry-content li{margin:8px 0}.entry-content figure{margin:26px 0}.entry-content figure img{display:block;border-radius:4px}.entry-content figcaption{font-size:13px;color:var(--muted)}.entry-content .note{border-left:4px solid var(--gold);background:#f9f6ec;padding:14px 18px;margin:24px 0}.related{border-top:1px solid var(--line);margin-top:38px;padding-top:24px}.related ul{display:flex;flex-wrap:wrap;gap:10px 28px;list-style:none;padding:0}.post-list{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.post-list article{background:#fff;border:1px solid var(--line);border-radius:4px;padding:22px}.post-list h3{font-size:19px;line-height:1.4;margin:0 0 8px}.post-list p{font-size:14px;color:var(--muted);margin:0}.site-footer{background:#14243d;color:#d8dfeb;padding:32px 0}.footer-inner{display:flex;justify-content:space-between;gap:32px;flex-wrap:wrap}.site-footer a{color:#f0c65a}.footer-links{display:flex;gap:10px 22px;flex-wrap:wrap;max-width:750px}.site-footer p{font-size:13px;max-width:700px;margin:12px 0 0}.screen-reader-text{position:absolute;left:-9999px}
@media(max-width:1020px){.site-nav{display:none}.header-inner{justify-content:space-between}.mobile-nav{display:block;background:#22385c}.mobile-nav summary{cursor:pointer;list-style:none;padding:10px 24px;font-weight:700}.mobile-nav summary::-webkit-details-marker{display:none}.mobile-nav summary:before{content:'☰';margin-right:10px}.mobile-nav[open] summary:before{content:'×'}.mobile-nav nav{display:grid;grid-template-columns:repeat(2,1fr);gap:0 16px;padding:4px 24px 14px}.mobile-nav nav a{color:#fff;padding:9px 0;border-bottom:1px solid #415575}}
@media(max-width:700px){.wrap{width:min(100% - 30px,var(--max))}.header-inner{min-height:64px;gap:10px}.brand{font-size:27px}.head-actions .button{min-height:36px;padding:7px 9px;font-size:12px}.hero-inner{grid-template-columns:1fr;padding:38px 0 25px;gap:14px}.hero h1{font-size:30px}.hero p{font-size:16px}.hero-art{max-height:230px;object-fit:contain}.topic-grid,.post-list{grid-template-columns:1fr 1fr}.topic{min-height:140px;padding:15px}.topic strong{font-size:17px}.page-banner{padding:43px 0}.article-shell{padding:16px 0 40px}.article-shell .entry-content{padding:22px 18px}.entry-content h2{font-size:23px}.section{padding:32px 0}}
@media(max-width:440px){.head-actions{gap:4px}.head-actions .button{font-size:11px;padding:7px 6px}.topic-grid,.post-list{grid-template-columns:1fr}.mobile-nav nav{grid-template-columns:1fr 1fr}.button{font-size:14px}}
.topic{min-height:0}.section{padding:34px 0}.section h2{margin-bottom:14px}.section-intro{margin-bottom:18px}.entry-content h2:first-child{margin-top:0}
@media(max-width:700px){.topic{min-height:0}.section{padding:27px 0}}
.article-shell{max-width:1180px;padding:30px 0 70px}
.article-shell .entry-content{border:0;border-radius:0;padding:8px 0 34px}
.article-shell .entry-content>p{max-width:100%;line-height:1.9}
.article-shell .entry-content>h2{border-bottom:1px solid var(--line);padding-bottom:9px;margin-top:42px}
.article-shell .entry-content figure.article-visual{margin:26px 0 34px;background:#f2f4f8}
.article-shell .entry-content figure.article-visual img{width:100%;height:auto;border-radius:0}
.article-shell .entry-content figure.article-visual figcaption{padding:8px 12px;color:#4b586d}
.article-shell .entry-content figure.article-visual-brand{width:fit-content;max-width:100%;background:#19132b;color:#fff}
.article-shell .entry-content figure.article-visual-brand img{width:auto;max-width:100%}
.article-shell .entry-content figure.article-visual-brand figcaption{background:#f2f4f8;color:#4b586d}
.article-shell .entry-content figure.article-visual-single{max-width:620px}
@media(max-width:700px){.article-shell{padding:20px 0 46px}.article-shell .entry-content{padding:4px 0 18px}.article-shell .entry-content>h2{margin-top:32px}.article-shell .entry-content figure.article-visual{margin:18px 0 25px}}
.single .article-shell{max-width:880px}
.page-id-16 .article-shell{max-width:880px}
.site-header{position:sticky;top:0;z-index:100;box-shadow:0 2px 9px rgb(8 18 36 / 18%)}
body.admin-bar .site-header{top:32px}
.footer-copyright{max-width:none!important;margin:26px auto 0!important;padding:18px 15px 0;border-top:1px solid #3c4d65;text-align:center}
.back-to-top{position:fixed;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));z-index:90;display:grid;place-items:center;width:44px;height:44px;border-radius:4px;background:var(--gold);color:var(--ink);font-size:27px;font-weight:800;line-height:1;box-shadow:0 3px 12px rgb(0 0 0 / 25%)}
.back-to-top:hover{color:var(--ink);text-decoration:none;filter:brightness(1.06)}
.back-to-top:focus-visible,.mobile-nav summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
@media(max-width:1020px){
  .header-inner{display:grid;grid-template-columns:1fr auto;gap:0 12px;padding-top:7px;padding-bottom:8px}
  .mobile-nav{justify-self:end;align-self:center;background:transparent}
  .mobile-nav summary{padding:8px 11px;color:#fff;border:1px solid #61718e;border-radius:4px;line-height:1.4;white-space:nowrap}
  .mobile-nav nav{position:absolute;top:100%;left:0;right:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px;max-height:calc(100vh - 140px);max-height:calc(100dvh - 140px);overflow-y:auto;padding:8px max(24px,calc((100vw - var(--max))/2)) 16px;background:#22385c;box-shadow:0 7px 15px rgb(0 0 0 / 24%)}
  .head-actions{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:8px}
  .head-actions .button{min-height:40px;padding:8px 10px;font-size:14px}
}
@media(max-width:782px){body.admin-bar .site-header{top:0}}
@media(max-width:700px){.header-inner{min-height:0}.mobile-nav nav{padding-left:15px;padding-right:15px}.head-actions .button{min-height:40px;font-size:14px}}
@media(max-width:440px){.head-actions{gap:8px}.head-actions .button{font-size:13px;padding:8px 6px}.mobile-nav nav{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.entry-content figure .visual-mobile{display:none}
.entry-content .editorial-photo img{display:block;width:100%;height:auto;object-fit:contain;aspect-ratio:auto}
@media(max-width:700px){.entry-content figure .visual-desktop{display:none}.entry-content figure .visual-mobile{display:block}}
.article-shell .entry-content figure{margin-inline:auto}
.article-shell .entry-content figure.article-visual{margin-inline:auto}
.article-shell .entry-content figure img{margin-inline:auto}
.article-shell .entry-content figure figcaption{text-align:center}
