/* ============================================================
   Vedam Journal (WordPress) - additions on top of the main site's
   /assets/css/site.css. The header, footer, hero, listing cards,
   chips, pager and CTA band all come from site.css; this file only
   styles what a single article needs (body copy, tables, FAQ, author).
   ============================================================ */

/* long article titles in the hero need a smaller size and a wider measure */
.pagehero--post h1.post-hero__title{font-size:clamp(1.7rem,1.1rem + 2.6vw,3.2rem);max-width:26ch;line-height:1.12}
.pagehero--post .pagehero__sub{letter-spacing:.04em}

.post-section{padding-top:clamp(40px,6vw,80px)}
.post{max-width:820px;margin-inline:auto}

/* featured image: full width at its own aspect ratio (infographics must not be cropped) */
.post-featured-img{width:100%;border-radius:12px;overflow:hidden;margin-bottom:clamp(28px,4vw,44px);background:var(--bone);border:1px solid var(--line)}
.post-featured-img img{display:block;width:100%;height:auto}

/* ---------- article body ---------- */
.post-body{font-size:1.04rem;line-height:1.85;color:var(--ink-2);overflow-wrap:break-word}
.post-body>*+*{margin-top:0}
.post-body p{margin:0 0 1.35em}
.post-body h2{font-size:clamp(1.45rem,1.15rem + 1vw,1.95rem);color:var(--ink);margin:2em 0 .7em;line-height:1.2}
.post-body h3{font-size:clamp(1.2rem,1.05rem + .5vw,1.45rem);color:var(--ink);margin:1.7em 0 .6em;line-height:1.25}
.post-body h4{font-family:"Hanken Grotesk",system-ui,sans-serif;font-weight:600;font-size:1.05rem;color:var(--ink);margin:1.5em 0 .5em}
.post-body ul,.post-body ol{margin:0 0 1.35em;padding-left:1.4em}
.post-body ul{list-style:disc}
.post-body ol{list-style:decimal}
.post-body li{margin-bottom:.55em;padding-left:.2em}
/* Google-Docs pastes wrap each bullet's text in its own <p> - keep bullets compact */
.post-body li>p{margin:0}
.post-body a{color:var(--brass);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.post-body a:hover{color:var(--ink)}
.post-body img{max-width:100%;height:auto;border-radius:10px;margin:.6em 0 1.5em}
.post-body figure{margin:0 0 1.5em}
.post-body figcaption{font-size:.85rem;color:var(--stone);text-align:center;margin-top:-.8em}
.post-body blockquote{border-left:3px solid var(--brass);background:var(--bone);padding:18px 24px;margin:1.8em 0;border-radius:0 10px 10px 0;color:var(--ink)}
.post-body blockquote p:last-child{margin-bottom:0}
.post-body strong,.post-body b{color:var(--ink);font-weight:600}
.post-body hr{border:0;border-top:1px solid var(--line);margin:2.2em 0}
.post-highlight{border-left:3px solid var(--brass);background:var(--bone);border-radius:0 12px 12px 0;padding:20px 24px;margin:2em 0}
.post-highlight h2,.post-highlight h3{margin:0 0 10px}
.post-highlight p{margin:0}

@media (min-width:701px){
  /* justified copy on desktop, direct children only so tables/headings/FAQ keep their own alignment */
  .post-body>p,.post-body>ul>li,.post-body>ol>li{text-align:justify;hyphens:auto}
}

/* ---------- tables: one uniform look for every table, whoever pasted it ----------
   Client / Google-Docs / Word pastes arrive as raw <table> with inline widths,
   heights, black borders and Mso junk, so !important is deliberate (no stored
   post content is touched; removing this block reverts the look). */
.post-body .table-scroll{overflow-x:auto;margin:0 0 1.6em}
.post-body table{width:100% !important;max-width:100% !important;height:auto !important;margin:0 0 1.8em !important;border-collapse:separate !important;border-spacing:0 !important;border:1px solid var(--line) !important;border-radius:12px;overflow:hidden;font-size:.92rem;line-height:1.6;table-layout:auto !important;background:var(--bone)}
.post-body table col,.post-body table colgroup{width:auto !important}
.post-body table th,.post-body table td{padding:12px 16px !important;border:0 !important;border-bottom:1px solid var(--line) !important;text-align:left !important;vertical-align:top !important;width:auto !important;height:auto !important;background:transparent;color:var(--ink-2)}
.post-body table th p,.post-body table td p{margin:0 !important}
.post-body table td p+p,.post-body table td ul+p,.post-body table td p+ul{margin-top:8px !important}
.post-body table td ul{margin:0;padding-left:18px}
.post-body table td li{margin-bottom:6px}
.post-body table td li:last-child{margin-bottom:0}
.post-body table tr:last-child>td,.post-body table tr:last-child>th{border-bottom:0 !important}
/* header row = <thead> if present, else the first row of the body (not tbody:first-child:
   pasted tables put a <colgroup> first) */
.post-body table>thead>tr>*,
.post-body table:not(:has(>thead))>tbody>tr:first-child>*{background:var(--ink) !important;color:#fff !important;font-weight:600;font-size:.85rem;letter-spacing:.03em;border-bottom:0 !important}
.post-body table>thead>tr>* *,
.post-body table:not(:has(>thead))>tbody>tr:first-child>* *{color:inherit !important;font-family:inherit !important;font-size:inherit !important;font-weight:inherit !important}
.post-body table:has(>thead)>tbody>tr:nth-child(even)>td{background:var(--paper)}
.post-body table:not(:has(>thead))>tbody>tr:nth-child(odd):not(:first-child)>td{background:var(--paper)}
.post-body table th:not(:last-child),.post-body table td:not(:last-child){border-right:1px solid var(--line) !important}
.post-body table>thead>tr>*:not(:last-child),
.post-body table:not(:has(>thead))>tbody>tr:first-child>*:not(:last-child){border-right:1px solid rgba(255,255,255,.2) !important}
@media (max-width:700px){
  .post-body table{display:block;overflow-x:auto;white-space:normal}
  .post-body table th,.post-body table td{min-width:120px}
}

/* ---------- tags, author, FAQ ---------- */
.post-tags{display:flex;flex-wrap:wrap;gap:8px;margin:2.4em 0 0}
.post-tags a{font-size:.68rem;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2);border:1px solid var(--line);background:var(--bone);padding:7px 14px;border-radius:999px;transition:border-color .3s,color .3s}
.post-tags a:hover{border-color:var(--brass);color:var(--brass)}

.author-box{display:flex;gap:20px;align-items:center;background:var(--bone);border:1px solid var(--line);border-radius:12px;padding:24px;margin:2.6em 0 0}
.author-box img{width:66px;height:66px;border-radius:50%;object-fit:cover;flex:0 0 66px}
.author-box h4{font-size:1.05rem;margin:0 0 6px;color:var(--ink)}
.author-box p{font-size:.88rem;line-height:1.65;color:var(--ink-2);margin:0}

.post-faq{margin:2.8em 0 0}
.post-faq h2{font-size:clamp(1.45rem,1.15rem + 1vw,1.95rem);color:var(--ink);margin:0 0 1em}
.post-faq-item{border:1px solid var(--line);background:var(--bone);border-radius:12px;padding:20px 24px;margin-bottom:14px}
.post-faq-item h4{font-family:"Hanken Grotesk",system-ui,sans-serif;font-weight:600;font-size:1rem;color:var(--ink);margin:0 0 8px;line-height:1.4}
.post-faq-item p{font-size:.93rem;line-height:1.7;color:var(--ink-2);margin:0}

/* ---------- related stories ---------- */
.related-section{margin-top:clamp(48px,7vw,88px);padding-top:clamp(36px,5vw,56px);border-top:1px solid var(--line)}
.related-heading{font-size:var(--fs-h2);color:var(--ink);text-align:center;margin:0 0 clamp(24px,3vw,40px)}
.related-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.related-grid .blog-card__body{padding:18px 20px 22px}
.related-grid .blog-card__body h3{font-size:1.1rem}
.related-grid .blog-card__body p{display:none}
@media (max-width:980px){.related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.related-grid{grid-template-columns:1fr}}

/* blog chips are links here (static site uses buttons) */
a.blog-filter{display:inline-block}

/* ---------- share buttons (Copy link / Share / WhatsApp) ---------- */
.post-share{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;position:relative}
.post-share--top{margin:0 0 clamp(20px,3vw,30px)}
.post-share--bottom{margin:2.4em 0 0;padding:20px 24px;background:var(--bone);border:1px solid var(--line);border-radius:12px}
.post-share__label{font-size:.7rem;letter-spacing:.18em;text-transform:uppercase;color:var(--stone)}
.post-share__btns{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.share-btn{display:inline-flex;align-items:center;gap:8px;font:inherit;font-size:.82rem;font-weight:500;letter-spacing:.02em;color:var(--ink-2);background:#fff;border:1px solid var(--line);padding:9px 16px;border-radius:999px;cursor:pointer;line-height:1;text-decoration:none;transition:border-color .25s,color .25s,background .25s}
.share-btn svg{flex:0 0 auto}
.share-btn:hover,.share-btn:focus-visible{border-color:var(--brass);color:var(--brass)}
.share-btn--wa{color:#1a7f4b;border-color:rgba(26,127,75,.35)}
.share-btn--wa:hover,.share-btn--wa:focus-visible{background:#1a7f4b;border-color:#1a7f4b;color:#fff}
.share-pop{position:relative;display:inline-block}
.share-menu{position:absolute;z-index:20;left:0;top:calc(100% + 8px);min-width:180px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 14px 36px rgba(0,0,0,.14);padding:6px;display:flex;flex-direction:column}
.share-menu[hidden]{display:none}
.share-menu a{padding:10px 14px;border-radius:8px;font-size:.88rem;color:var(--ink-2);text-decoration:none}
.share-menu a:hover,.share-menu a:focus-visible{background:var(--bone);color:var(--brass)}
.share-toast{font-size:.8rem;color:#1a7f4b;opacity:0;transition:opacity .25s;min-height:1em}
.share-toast.is-on{opacity:1}
@media (max-width:560px){
  .post-share--bottom{padding:16px}
  .share-btn{padding:9px 13px}
  .share-menu{left:auto;right:0}
}
