/* ============================================================
   MAYASEVEN — blog (/blog/, /th/blog/). Loaded only on blog pages, after main.css.
   ============================================================ */

/* ---------- index ---------- */
.blog-hero { padding-bottom: 48px; }
.blog-hero .lead { max-width: 720px; }
body.lang-th .blog-hero .lead { text-wrap: pretty; }
.section .wrap.blog-wrap { padding-top: 72px; padding-bottom: 88px; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 28px; }
.blog-grid-feat { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.post-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line-card); border-radius: 14px;
  background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.post-card:hover { border-color: #3a4352; transform: translateY(-2px); }
.pc-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--deep); border-bottom: 1px solid var(--line-inner); overflow: hidden; }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pc-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--t-dim);
  background: radial-gradient(120% 90% at 85% 0%, rgba(132,167,198,.10), transparent 60%),
              radial-gradient(90% 80% at 0% 100%, rgba(199,163,108,.08), transparent 60%), var(--deep); }
.pc-lang { position: absolute; top: 10px; left: 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  color: var(--t-high); background: rgba(10,14,22,.82); border: 1px solid var(--line-raised); border-radius: 6px; padding: 3px 7px; }
.pc-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pc-meta { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--t-dim); }
.post-card h3 { font-size: 17px; line-height: 1.4; font-weight: 600; margin: 0; color: var(--t-high); overflow-wrap: anywhere; }
body.lang-th .post-card h3 { line-height: 1.5; }
.post-card p { font-size: 14px; line-height: 1.6; color: var(--t-muted); margin: 0; overflow-wrap: anywhere; }
.post-card-big h3 { font-size: 18.5px; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cat-chips a { font-size: 13.5px; color: var(--t-soft); border: 1px solid var(--line-input); border-radius: 999px; padding: 7px 14px;
  background: rgba(255,255,255,.02); transition: border-color .15s, color .15s; }
.cat-chips a:hover { border-color: var(--human); color: var(--t-high); }
.cat-chips a span { font-family: var(--mono); font-size: 11px; color: var(--t-dim); margin-left: 4px; }
.blog-cat-title { font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; letter-spacing: -.01em; margin: 64px 0 0; scroll-margin-top: 24px;
  display: flex; align-items: baseline; gap: 12px; }
.blog-cat-title .count { font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--t-dim); }
body.lang-th .blog-cat-title { line-height: 1.4; }

.blog-th-callout { display: flex; flex-direction: column; gap: 10px; margin-top: 40px; padding: 28px 30px; border-radius: 14px;
  border: 1px solid #4a3f2c; background: linear-gradient(135deg, rgba(199,163,108,.08), rgba(132,167,198,.04)); }
.blog-th-callout strong { font-size: 20px; font-weight: 600; }
.blog-th-callout span:last-child { color: var(--t-body); font-size: 15px; line-height: 1.6; }
.blog-th-callout:hover { border-color: var(--human); }

/* ---------- post ---------- */
.post-hero { position: relative; z-index: 2; padding-top: 54px; padding-bottom: 44px; max-width: 816px; }
.post-hero h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.18; letter-spacing: -.02em; font-weight: 700; margin: 22px 0 0; overflow-wrap: anywhere; }
body.lang-th .post-hero h1 { line-height: 1.38; letter-spacing: 0; }
.post-meta { margin-top: 20px; font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em; color: var(--t-dim); }
.post-meta .dot { margin: 0 10px; color: var(--line-raised); }

.post { position: relative; z-index: 2; max-width: 816px; margin: 0 auto; padding: 8px 32px 72px; }
.old-notice { font-size: 14px; line-height: 1.6; color: var(--t-soft); border: 1px solid #4a3f2c; border-left: 3px solid var(--human);
  background: rgba(199,163,108,.06); border-radius: 8px; padding: 12px 16px; margin: 0 0 32px; }
.post-hero-img { margin: 0 0 36px; }
.post-hero-img img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line-card); }

.post-body { font-size: 17px; line-height: 1.8; color: var(--t-body); min-width: 0; overflow-wrap: anywhere; }
body.lang-th .post-body { font-size: 17.5px; line-height: 1.95; }
.post-body > :first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.25em; }
.post-body h2, .post-body h3, .post-body h4 { color: var(--t-high); font-weight: 600; letter-spacing: -.01em; margin: 2em 0 .7em; line-height: 1.4; }
.post-body h2 { font-size: 26px; }
.post-body h3 { font-size: 22px; }
.post-body h4 { font-size: 19px; }
body.lang-th .post-body h2, body.lang-th .post-body h3, body.lang-th .post-body h4 { line-height: 1.55; letter-spacing: 0; }
.post-body strong { color: var(--t-high); font-weight: 600; }
.post-body a { color: var(--machine); text-decoration: underline; text-decoration-color: rgba(132,167,198,.4); text-underline-offset: 3px; }
.post-body a:hover { color: #a9c4dc; text-decoration-color: currentColor; }
.post-body ul, .post-body ol { margin: 0 0 1.25em; padding-left: 1.4em; }
.post-body li { margin: .35em 0; }
.post-body li::marker { color: var(--t-dim); }
.post-body blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--line-raised); color: var(--t-soft); }
.post-body hr { border: 0; border-top: 1px solid var(--line-inner); margin: 2.5em 0; }
.post-body figure { margin: 1.8em 0; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line-card); background: var(--deep); }
.post-body figure a, .post-body figure a:hover { text-decoration: none; }
.post-body figure img { margin: 0 auto; }
.post-body figcaption { margin-top: 10px; font-size: 13.5px; line-height: 1.6; color: var(--t-dim); text-align: center; }
.post-body code { font-family: var(--mono); font-size: .86em; background: var(--console); border: 1px solid var(--line-inner);
  border-radius: 5px; padding: .1em .38em; color: var(--t-soft); }
.post-body pre { font-family: var(--mono); font-size: 13.5px; line-height: 1.65; color: var(--t-soft); background: var(--console);
  border: 1px solid var(--line-card); border-radius: 10px; padding: 18px 20px; margin: 1.6em 0; overflow-x: auto;
  white-space: pre; overflow-wrap: normal; tab-size: 4; }
.post-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.post-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.6em 0; font-size: 15px; overflow-wrap: normal; }
.post-body th, .post-body td { border: 1px solid var(--line-card); padding: 8px 12px; text-align: left; vertical-align: top; min-width: 90px; }
.post-body th { color: var(--t-high); background: var(--surface); }

.video-card { position: relative; display: block; margin: 1.8em 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-card);
  background: var(--deep); text-decoration: none !important; }
.video-card img { width: 100%; height: auto; border: 0; border-radius: 0; opacity: .78; transition: opacity .15s; }
.video-card:hover img { opacity: .95; }
.video-card .vc-label { position: absolute; left: 16px; bottom: 16px; font-family: var(--mono); font-size: 13px; color: #11130f;
  background: var(--human); border-radius: 8px; padding: 8px 14px; }
.video-card:not(:has(img)) { padding: 28px; }
.video-card:not(:has(img)) .vc-label { position: static; display: inline-block; }
.link-card { display: inline-block; margin: .6em 0 1.4em; font-family: var(--mono); font-size: 13px; color: var(--machine) !important;
  border: 1px solid var(--line-input); border-radius: 8px; padding: 10px 14px; text-decoration: none !important; }
.link-card:hover { border-color: var(--machine); }

.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line-inner); }
.post-tags .tag { font-family: var(--mono); font-size: 11.5px; color: var(--t-dim); border: 1px solid var(--line-inner); border-radius: 6px; padding: 4px 9px; }

.post-cta { position: relative; z-index: 2; padding: 0 32px 88px; }
.post-cta-box { max-width: 816px; margin: 0 auto; padding: 34px 36px; border-radius: 16px; border: 1px solid var(--line-card);
  background: radial-gradient(90% 120% at 100% 0%, rgba(199,163,108,.10), transparent 55%),
              radial-gradient(80% 120% at 0% 100%, rgba(132,167,198,.08), transparent 55%), var(--surface); }
.post-cta-box h2 { font-size: clamp(21px, 2.4vw, 26px); line-height: 1.35; font-weight: 600; margin: 0 0 12px; }
body.lang-th .post-cta-box h2 { line-height: 1.5; }
.post-cta-box p { font-size: 15.5px; line-height: 1.7; color: var(--t-body); margin: 0 0 22px; max-width: 640px; }
.post-cta-box .cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.related .wrap { padding-top: 72px; padding-bottom: 88px; }

/* ---------- small screens (keep at END of file) ---------- */
@media (max-width: 640px) {
  .post { padding: 4px 18px 56px; }
  .post-hero { padding-top: 36px; padding-bottom: 30px; }
  .post-body, body.lang-th .post-body { font-size: 16.5px; }
  .post-body pre { font-size: 12.5px; padding: 14px; border-radius: 8px; }
  .post-cta { padding: 0 18px 64px; }
  .post-cta-box { padding: 26px 22px; }
  .blog-grid { grid-template-columns: 1fr; }
  .section .wrap.blog-wrap, .related .wrap { padding-top: 52px; padding-bottom: 64px; }
  .blog-th-callout { padding: 22px; }
}
