/* Blog: list, categories, search, article and 404. Modelled on the webdesignerpune.com blog (Sanjay, 2026-11-10):
   compact headings, no faded background words, no big closing section; on articles a sidebar with search, categories
   and the Contents box with a reading line. Colours and type are this site's own (theme.json). */

.is-blog main { --bpad: clamp(28px, 3.5vw, 48px); }
.bsec { margin-block: 0; }
.bsec > * { margin-block: 0; }

/* ---------- compact heading section ---------- */
.bhero { padding-block: var(--bpad) clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--rule); }
.bhero .blabel { font-size: var(--wp--preset--font-size--xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* everything in the heading section starts at the left edge of the 1200px content column (the offset an auto margin would give) */
.bhero > * { margin-inline: max(0px, calc((100% - var(--wp--style--global--content-size, 1200px)) / 2)) 0 !important; }
.bhero .btitle { max-width: 26em; margin-top: 10px; font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.75rem); font-weight: 700; line-height: 1.08; letter-spacing: -.035em; }
.bhero .crumbs + .btitle { margin-top: 12px; }
.bhero .bintro { max-width: 40em; margin-top: 12px; font-size: var(--wp--preset--font-size--md); line-height: 1.55; color: var(--muted); }
.bhero .bintro p { margin: 0; }
.crumbs { font-size: var(--wp--preset--font-size--xs); line-height: 1.5; color: var(--muted); }
.crumbs a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.post-meta.wp-block-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin-top: 16px; font-size: var(--wp--preset--font-size--sm); color: var(--muted); }
.post-meta > * { margin: 0; }
.post-meta p { display: contents; }   /* the Shortcode block wraps the line in a paragraph; its parts sit in the row instead */
.post-meta .byline { font-weight: 600; color: var(--ink); }
.post-meta .readtime { padding-left: 18px; border-left: 1px solid var(--rule); }

/* ---------- category menu and search ---------- */
.catbar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-top: clamp(18px, 2vw, 28px); }
.catdrop { position: relative; }
.catdrop-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 18px; border: 1px solid var(--rule); border-radius: 999px; background: var(--wp--preset--color--surface); color: var(--ink); font: inherit; font-size: var(--wp--preset--font-size--sm); font-weight: 600; cursor: pointer; }
.catdrop-btn:hover { border-color: var(--ink); }
.catdrop-btn svg { transition: transform .2s ease; }
.catdrop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.catdrop-panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; min-width: 260px; padding: 8px; border: 1px solid var(--rule); border-radius: 14px; background: var(--wp--preset--color--surface); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .35); }
.catdrop-panel ul { margin: 0; padding: 0; list-style: none; }
.catdrop-panel a { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: var(--wp--preset--font-size--sm); text-decoration: none; }
.catdrop-panel a:hover { background: var(--wp--preset--color--background); }
.catdrop-panel a[aria-current] { font-weight: 700; color: var(--volt); }
.cat-count { color: var(--muted); font-size: var(--wp--preset--font-size--xs); font-weight: 400; }
.catsearch { position: relative; flex: 0 1 240px; margin: 0; }
.catsearch input[type="search"] { box-sizing: border-box; width: 100%; height: 42px; padding: 0 44px 0 18px; border: 1px solid var(--rule); border-radius: 999px; background: var(--wp--preset--color--surface); color: var(--ink); font: inherit; font-size: var(--wp--preset--font-size--sm); }
.catsearch input[type="search"]:focus { outline: 2px solid var(--volt); outline-offset: 2px; border-color: var(--volt); }
.catsearch button { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; }
.catsearch button:hover { color: var(--volt); }
@media (max-width: 640px) { .catsearch { flex-basis: 100%; } }

/* ---------- article list: text left, picture right ---------- */
.blist { padding-block: 0 clamp(40px, 5vw, 72px); background: var(--wp--preset--color--surface); }
.plist.wp-block-post-template { display: grid; margin: 0; padding: 0; list-style: none; }
.plist > li { margin: 0; min-width: 0; }
.blog-list .pcard { display: grid; grid-template-columns: minmax(0, 1fr) 220px; grid-template-rows: auto auto 1fr; align-content: start; column-gap: clamp(20px, 4vw, 48px); row-gap: 10px; padding-block: 32px; border-bottom: 1px solid var(--rule); }
.blog-list .pcard > * { grid-column: 1; margin: 0; }
.blog-list .pcard .pc-img { grid-column: 2; grid-row: 1 / 4; align-self: start; }
@media (max-width: 720px) {
	.blog-list .pcard { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
	.blog-list .pcard .pc-img { grid-column: 1; grid-row: auto; order: -1; }
}
.pc-img { display: block; overflow: hidden; border-radius: 14px; background: var(--wp--preset--color--background); aspect-ratio: 3 / 2; }
.pc-img a { display: block; height: 100%; }
.pc-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.pcard:hover .pc-img img { transform: scale(1.03); }
.pc-meta { margin: 0; font-size: var(--wp--preset--font-size--xs); font-weight: 600; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase; color: var(--volt); }
.pc-meta a { color: inherit; text-decoration: none; }
.pc-meta .wp-block-post-terms__separator { color: var(--muted); }
.pc-title { margin: 0; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.blog-list .pc-title { max-width: 22em; font-size: clamp(1.375rem, 1.1rem + .9vw, 1.875rem); }
.pc-title a { color: var(--ink); text-decoration: none; }
.pc-title a:hover { text-decoration: underline; text-decoration-color: var(--volt); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.pc-excerpt { max-width: 38em; font-size: .9375rem; line-height: 1.6; color: var(--muted); }
.pc-excerpt .wp-block-post-excerpt__excerpt { margin: 0; }
.pc-excerpt .wp-block-post-excerpt__more-text { margin: 6px 0 0; }
.pc-excerpt .wp-block-post-excerpt__more-link { display: inline-block; padding-block: 10px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--volt); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.pager.wp-block-query-pagination { margin-top: 32px; gap: 8px; font-size: var(--wp--preset--font-size--sm); font-weight: 600; }
.pager a, .pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); text-decoration: none; }
.pager .page-numbers.current { border-color: var(--ink); background: var(--ink); color: #fff; }
.pager .page-numbers.dots { border: 0; }
.pager a:hover { border-color: var(--ink); }
.no-posts { padding-block: 32px; color: var(--muted); }
.no-posts a { color: var(--ink); }

/* ---------- article: text left, sidebar right ---------- */
.post-b { padding-block: clamp(28px, 3vw, 40px) clamp(48px, 6vw, 88px); background: var(--wp--preset--color--surface); }
.post-cols.wp-block-group { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 64px); }
.post-cols > * { margin: 0; }
.post-art.wp-block-group { grid-column: 1; grid-row: 1; display: grid; align-content: start; gap: clamp(24px, 3vw, 40px); min-width: 0; }
.post-art > * { margin: 0; }
.post-side.wp-block-group { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 28px; }
.post-side > * { margin: 0; }
.post-art .feat img { display: block; width: 100%; height: auto; border-radius: 16px; }
.side-search { flex: none; }
@media (max-width: 1020px) {
	.post-cols.wp-block-group { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.post-side.wp-block-group { grid-column: 1; gap: 16px; }
	.post-art.wp-block-group { grid-row: 2; }
	.side-cats { display: none; }
}

/* article text: reading size, left aligned, modest headings */
.prose { max-width: 46em; font-size: 1.0625rem; line-height: 1.7; }
.prose > * { margin-block: 0 1.1em; margin-inline: 0 !important; }
.prose > :last-child { margin-bottom: 0; }
.prose :is(h1, h2, h3, h4, p, ul, ol, li, blockquote) { text-align: left !important; }
.prose h2 { margin-top: 1.8em; margin-bottom: .55em; font-size: clamp(1.375rem, 1.2rem + .5vw, 1.625rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.prose h3 { margin-top: 1.5em; margin-bottom: .45em; font-size: clamp(1.1875rem, 1.1rem + .3vw, 1.3125rem); font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.prose > :first-child { margin-top: 0; }
.prose :is(ul, ol) { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--volt); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose a:hover { color: var(--volt); }
.prose blockquote { padding-left: 20px; border-left: 3px solid var(--volt); color: var(--ink); font-size: 1.125rem; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose figure { margin-inline: 0; }
.prose figcaption { margin-top: 8px; font-size: var(--wp--preset--font-size--sm); color: var(--muted); }
.prose .wp-block-table { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.prose :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-weight: 700; }
.post-tags { font-size: var(--wp--preset--font-size--sm); color: var(--muted); }
.post-tags a { color: var(--ink); }

/* sidebar: categories */
.side-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--wp--preset--font-size--sm); font-weight: 700; }
.side-ico, .toc-ico { display: grid; place-items: center; width: 20px; height: 20px; color: var(--ink); }
.side-cats ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.side-cats a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: var(--wp--preset--font-size--sm); text-decoration: none; }
.side-cats a:hover { color: var(--volt); }
.side-cats .is-current a { font-weight: 700; }

/* ---------- Contents box ---------- */
.toc { --tp: 15px; overflow: clip; border: 1px solid var(--rule); border-radius: 16px; background: var(--wp--preset--color--raised); }
.toc summary { position: relative; display: flex; align-items: center; gap: 8px; padding: 14px var(--tp); list-style: none; font-size: var(--wp--preset--font-size--sm); font-weight: 700; cursor: pointer; }
.toc summary::-webkit-details-marker { display: none; }
.toc-title { flex: 1 1 auto; }
.toc-count { font-size: var(--wp--preset--font-size--xs); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.toc[open] summary { border-bottom: 1px solid var(--rule); }
.toc-list { position: relative; margin: 0; padding: 12px 12px 18px 0; list-style: none; }
.toc-list a { display: flex; align-items: center; padding: 5px 10px 5px calc(var(--tp) + 10px); border-left: 3px solid transparent; color: var(--muted); font-size: .875rem; line-height: 1.35; text-decoration: none; }
.toc-list a:hover { color: var(--ink); }
.toc-list ol { margin: 0 0 2px; padding: 0; list-style: none; }
.toc-list ol a { padding: 3px 10px 3px calc(var(--tp) + 30px); font-size: .8125rem; }
.toc-list > li.is-active:not(.sub-on) > a, .toc-list ol a.is-here { border-left-color: var(--volt); color: var(--volt); font-weight: 600; }
.toc-marked .toc-list > li.is-active:not(.sub-on) > a, .toc-marked .toc-list ol a.is-here { border-left-color: transparent; }
.toc-mark { position: absolute; left: 0; top: 0; width: 3px; height: 0; background: var(--volt); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.toc-mark.is-on { opacity: 1; }
/* topics slide in and out as the reading position moves */
.toc-focus .toc-list > li { max-height: 160px; overflow: hidden; transition: max-height .4s cubic-bezier(.2, .7, .2, 1), opacity .3s ease; }
.toc-focus .toc-list > li.is-active { max-height: 520px; }
.toc-focus .toc-list > li.toc-off { max-height: 0; opacity: 0; pointer-events: none; visibility: hidden; transition: max-height .4s cubic-bezier(.2, .7, .2, 1), opacity .3s ease, visibility 0s .4s; }
.toc-focus .toc-list > li > ol { max-height: 0; opacity: 0; overflow: hidden; visibility: hidden; transition: max-height .4s cubic-bezier(.2, .7, .2, 1), opacity .3s ease, visibility 0s .4s; }
.toc-focus .toc-list > li.is-active > ol { max-height: 400px; opacity: 1; visibility: visible; transition: max-height .4s cubic-bezier(.2, .7, .2, 1), opacity .3s ease; }
.toc-list > li.toc-more { max-height: 48px; }
.toc-list > li.toc-more > a { display: inline-flex; gap: 6px; margin: 6px 0 6px calc(var(--tp) + 10px); padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--wp--preset--color--surface); color: var(--ink); font-size: var(--wp--preset--font-size--xs); font-weight: 500; }
.toc-list > li.toc-more > a:hover { border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .toc-focus .toc-list > li, .toc-focus .toc-list > li > ol { transition: none; } }
@media (min-width: 1021px) {
	.post-side .toc { position: sticky; top: 96px; }
	.post-side .toc[open] summary { background: var(--wp--preset--color--accent-tint); cursor: default; }
	/* reading line: grows along the bottom of the Contents title as the article is read */
	.post-side .toc[open] summary::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: calc(var(--read, 0) * 100%); background: var(--volt); pointer-events: none; }
}
@media (max-width: 1020px) {
	.toc summary::after { content: ""; width: 8px; height: 8px; margin: 0 4px 3px 4px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .2s ease; }
	.toc[open] summary::after { transform: rotate(225deg); margin-bottom: -3px; }
}

/* phones and tablets: the topic bar under the header, with the reading line along its bottom edge */
.toc-strip { display: none; }
@media (max-width: 1020px) {
	.toc-strip { position: fixed; z-index: 49; left: 0; right: 0; display: block; background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--rule); box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .4); transform: translateY(-110%); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .25s ease, opacity .2s ease, visibility 0s .25s; }
	.toc-strip.is-on { transform: none; opacity: 1; pointer-events: auto; visibility: visible; transition: transform .25s ease, opacity .2s ease; }
	.toc-strip::before, .toc-strip::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; pointer-events: none; }
	.toc-strip::before { right: 0; background: color-mix(in srgb, var(--ink) 12%, transparent); }
	.toc-strip::after { width: calc(var(--read, 0) * 100%); background: var(--volt); }
	.toc-strip-bar { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px var(--wp--style--root--padding-left, 16px); }
	.toc-now { flex: 1 1 auto; min-width: 0; overflow: hidden; padding: 8px 0 8px 10px; border-left: 3px solid var(--volt); color: var(--volt); font-size: .8125rem; font-weight: 600; line-height: 1.3; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
	.toc-drop { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; touch-action: manipulation; }
	.toc-drop::after { content: ""; position: absolute; inset: -10px; }
	.toc-drop svg { pointer-events: none; transition: transform .2s ease; }
	.toc-strip.is-open .toc-drop svg { transform: rotate(180deg); }
	.toc-panel { display: none; max-height: min(18rem, 60vh); margin: 0; padding: 4px var(--wp--style--root--padding-left, 16px) 12px; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--rule); list-style: none; }
	.toc-strip.is-open .toc-panel { display: block; }
	.toc-panel li { margin: 0; }
	.toc-panel a { display: block; padding: 9px 10px; border-left: 3px solid transparent; color: var(--muted); font-size: .8125rem; line-height: 1.3; text-decoration: none; }
	.toc-panel a.is-active { border-left-color: var(--volt); color: var(--volt); font-weight: 600; }
}
@media (prefers-reduced-motion: reduce) { .toc-strip { transition: none; } }

/* ---------- call to action card and related articles ---------- */
.post-endcta { padding-block: clamp(40px, 5vw, 64px) 0; background: var(--wp--preset--color--surface); }
.blog-list .post-endcta, .nf-page .post-endcta { padding-block: 0 clamp(48px, 6vw, 88px); }
.nf-page .post-endcta { padding-top: clamp(40px, 5vw, 64px); }
.post-cta.wp-block-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; padding: clamp(28px, 4vw, 48px); border-radius: 24px; background: var(--volt); color: var(--on-volt); }
.post-cta > *, .post-cta-text > * { margin: 0; }
.post-cta .cta-h { margin-bottom: 10px; color: inherit; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.post-cta .cta-p { max-width: 34em; opacity: .92; }
.post-cta .wp-block-buttons { gap: 12px; flex-wrap: wrap; }
.post-cta .cta-go .wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; background: #fff; color: var(--ink); }
.post-cta .cta-alt .wp-block-button__link { min-height: 52px; display: inline-flex; align-items: center; border: 1.5px solid currentColor; background: transparent; color: inherit; }
.post-cta .wp-block-button__link:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
@media (max-width: 760px) { .post-cta.wp-block-group { grid-template-columns: minmax(0, 1fr); } }
.post-rel { padding-block: clamp(48px, 6vw, 88px); background: var(--wp--preset--color--surface); }
.rel-h { margin: 0 auto 24px !important; /* auto keeps it in the 1200px column; 0 pushed it to the page edge above 1250px */ padding-bottom: 14px; border-bottom: 1px solid var(--rule); font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; }
.rel-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; margin: 0; padding: 0; list-style: none; }
.rel-list > li { margin: 0; min-width: 0; }
.rel-list .pcard { display: flex; flex-direction: column; gap: 12px; }
.rel-list .pc-title { font-size: 1.0625rem; }
@media (max-width: 1020px) { .rel-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .rel-list { grid-template-columns: minmax(0, 1fr); } }

/* 404 */
.nf-page .bhero .side-search { margin-top: 20px; max-width: 360px; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 20px 0 0; padding: 0; list-style: none; font-weight: 600; }
.nf-links a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--volt); text-decoration-thickness: 2px; text-underline-offset: 5px; }
