/* Rich article typography and native, keyboard-accessible FAQ cards. */
.blog-post { --reading-width: 900px; }
.blog-post.width-narrow { --reading-width: 720px; }
.blog-post.width-wide { --reading-width: 1160px; }
.blog-post > :is(header,article,.blog-comments,.blog-cover-above) { max-width: var(--reading-width); }
.blog-post .page-heading { padding-bottom: 32px; }
.blog-post .page-heading h1 { font-size: clamp(2.3rem,5vw,4.6rem); }
.blog-post article.content-section { padding-top: 15px; }
.blog-post .article-cover,
.blog-cover-above .article-cover { display: block; width: 100%; max-width: 1160px; height: auto; max-height: min(70vh, 760px); margin: 0 auto 30px; border-radius: 18px; object-fit: contain; object-position: center; background: #f5f6f3; }
.blog-cover-above { padding-top: 32px; }
.blog-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.blog-card { border: 1px solid #e2e8f0; border-radius: 18px; overflow: hidden; background: white; color: #172033; text-decoration: none; transition: transform .2s,box-shadow .2s; }
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px #17203312; }
.blog-card > img { width: 100%; aspect-ratio: 16/9; height: auto; object-fit: cover; }
.blog-card > div { padding: 22px; }
.blog-card h3 { font-size: 1.4rem; line-height: 1.25; margin: 12px 0; }
.blog-card p { color: #64748b; font-size: .95rem; }
.blog-card span:last-child { font-weight: 700; }
.blog-search { display: flex; gap: 18px; align-items: end; flex-wrap: wrap; margin-bottom: 30px; }
.blog-search label { flex: 1; min-width: 180px; }
:is(.blog-search,.blog-comments,.admin-form,.advanced-editor,.admin-panel) :is(input:not([type=checkbox]):not([type=color]),select,textarea) { display: block; width: 100%; padding: 11px 13px; border: 1px solid #cbd5e1; border-radius: 8px; background: white; color: #172033; font: inherit; }
.blog-pagination { display: flex; gap: 15px; margin: 30px 0; }
.blog-pagination a { padding: 8px 14px; border: 1px solid #e2e8f0; border-radius: 8px; }
.blog-pagination [aria-current] { background: #172033; color: white; }
.related-posts { max-width: 1160px; margin: 56px auto 80px; }
.related-posts .blog-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 20px; }
.related-posts .blog-card { display: flex; min-width: 0; flex-direction: column; height: 100%; }
.related-posts .blog-card > img { aspect-ratio: 16 / 9; flex: 0 0 auto; }
.related-posts .blog-card > div { display: flex; min-height: 220px; flex: 1; flex-direction: column; padding: 20px; }
.related-posts .blog-card h3 { margin: 10px 0; font-size: clamp(1.1rem, 1.6vw, 1.35rem); }
.related-posts .blog-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.related-posts .blog-card span:last-child { margin-top: auto; padding-top: 14px; }
.blog-comments { margin-block: 40px; }
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.article-toc { margin: 24px 0; padding: 24px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.article-toc h2 { font-size: 1.2rem; margin: 0 0 12px; }
.article-toc ol { padding-left: 22px; }
.article-toc li { margin: 8px 0; }
.article-toc.toc-minimal { background: transparent; border-width: 0 0 0 3px; border-radius: 0; }
.article-toc summary { cursor: pointer; font-weight: 700; }
.rich-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 12px 12px 0 0; background: #f8fafc; margin-top: 15px; }
.rich-toolbar :is(button,select) { width: auto; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; padding: 6px 9px; font-size: 13px; cursor: pointer; }
.rich-toolbar button:hover { background: #eef2ff; }
.rich-toolbar label { display: flex; gap: 5px; align-items: center; font-size: 12px; }
.rich-edit-frame { width: 100%; min-height: 620px; background: white; border: 1px solid #cbd5e1; border-radius: 8px; }
.editor-fullscreen { position: fixed; inset: 12px; z-index: 100; overflow: auto; background: white; padding: 24px; border-radius: 12px; box-shadow: 0 0 0 30px #17203380; }
.seo-panel ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seo-score { font-size: 1.5rem; color: #4338ca; }
.search-preview { padding: 20px; background: white; border: 1px solid #e2e8f0; border-radius: 10px; }
.search-preview h3 { color: #1a0dab; margin: 6px 0; }
@media(max-width:700px) { .blog-card-grid,.related-posts .blog-card-grid,.seo-panel ul { grid-template-columns: 1fr; } .blog-post .article-cover,.blog-cover-above .article-cover { max-height: 42vh; margin-bottom: 22px; border-radius: 12px; } .related-posts .blog-card > div { min-height: 0; } .rich-edit-frame { min-height: 480px; } .editor-fullscreen { inset: 0; padding: 12px; } }
@media(prefers-reduced-motion:reduce) { .blog-card { transition: none; } }
.article-html { line-height: 1.75; overflow-wrap: anywhere; min-width: 0; }
.article-html :is(h1,h2,h3,h4,h5,h6) { line-height: 1.25; margin: 1.6em 0 .65em; scroll-margin-top: 110px; }
.article-html :is(p,ul,ol,blockquote,figure,pre,table) { margin-block: 1em; }
.article-html :is(ul,ol) { padding-inline-start: 1.6em; }
.article-html li + li { margin-top: .4em; }
.article-html a { text-decoration: underline; text-underline-offset: .2em; }
.article-html :is(img,figure) { max-width: 100%; }
.article-html img { display: block; height: auto; border-radius: 12px; }
.article-html figure { margin-inline: 0; }
.article-html figcaption { margin-top: .6rem; color: #64748b; font-size: .875em; text-align: center; }
.article-html blockquote { border-inline-start: 3px solid #94a3b8; padding: .6em 1.2em; background: #f8fafc; }
.article-html pre,
.article-html > code { display: block; overflow-x: auto; max-width: 100%; margin-block: 1.25rem; padding: 1.15rem 1.25rem; border: 1px solid #263044; border-radius: 12px; background: #121826; color: #e7edf8; font: 500 .9rem/1.7 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; white-space: pre; tab-size: 2; }
.article-html pre code { display: block; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: inherit; }
.article-html :not(pre) > code { padding: .15em .4em; border-radius: 5px; background: #eef2f7; color: #243047; font: .9em ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-html table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-html :is(th,td) { padding: .75rem 1rem; border: 1px solid #e2e8f0; text-align: start; }
.article-html th { background: #f8fafc; font-weight: 700; }
.article-html hr { margin-block: 2rem; border: 0; border-top: 1px solid #e2e8f0; }
.article-html details { margin-block: 1rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px rgb(15 23 42 / 4%); overflow: hidden; line-height: 1.65; padding: 0 1.25rem; }
.article-html details > summary { position: relative; display: block; cursor: pointer; list-style: none; font-weight: 700; color: #0f172a; padding: 1.1rem 3rem 1.1rem 1.25rem; margin: 0 -1.25rem; transition: background-color .2s ease; }
.article-html details > summary::-webkit-details-marker { display: none; }
.article-html details > summary::marker { content: ''; }
.article-html details > summary:hover { background: #f8fafc; }
.article-html details > summary:focus-visible { outline: 3px solid #6366f1; outline-offset: -3px; border-radius: 10px; }
.article-html details > summary::after { content: '▼'; position: absolute; right: 1.25rem; top: 1.2rem; font-size: .8em; transition: transform .25s ease; }
.article-html details[open] > summary { border-bottom: 1px solid #f1f5f9; margin-bottom: 1rem; }
.article-html details[open] > summary::after { transform: rotate(180deg); }
.article-html details[open] { padding-bottom: 1.25rem; }
.article-html details > :last-child:not(summary) { margin-bottom: 0; }
@media (max-width: 600px) {
  .article-html { font-size: 1rem; }
  .article-html :is(th,td) { padding: .6rem; }
  .article-html details { padding-inline: 1rem; }
  .article-html details > summary { margin-inline: -1rem; padding-inline-start: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .article-html details > summary, .article-html details > summary::after { transition: none; }
}

/* Modern Blog Extras: Reading time, Share Bar, Author Bio, Prev/Next, Newsletter */
.blog-card-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.blog-card-meta .eyebrow { margin: 0; }
.reading-time { font-size: 0.8rem; color: #94a3b8; font-weight: 500; }
.read-badge { background: #f1f5f9; color: #475569; padding: 3px 9px; border-radius: 6px; font-size: 0.85em; font-weight: 600; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #64748b; font-size: 0.95rem; margin-top: 12px; }

.article-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 24px 0 28px; padding: 14px 18px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }
.article-share .share-label { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; margin-right: 6px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 700; text-decoration: none; border: 1px solid #cbd5e1; background: white; color: #1e293b; cursor: pointer; transition: all 0.15s ease; }
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.06); }
.share-btn.twitter { background: #000; color: #fff; border-color: #000; }
.share-btn.linkedin { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-btn.facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-btn.whatsapp { background: #25d366; color: #fff; border-color: #25d366; }
.share-btn.copy-btn { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }

.author-box { display: flex; gap: 20px; align-items: center; margin: 48px 0 32px; padding: 24px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.author-avatar { width: 56px; height: 56px; border-radius: 50%; background: #f97316; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; flex-shrink: 0; }
.author-content h4 { font-size: 1.15rem; margin: 0 0 6px; color: #0f172a; }
.author-content p { font-size: 0.95rem; color: #64748b; margin: 0 0 8px; line-height: 1.5; }
.author-content a { font-size: 0.9rem; font-weight: 600; color: #f97316; }

.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0; }
@media (max-width: 600px) { .article-nav { grid-template-columns: 1fr; } }
.article-nav-link { display: flex; flex-direction: column; padding: 18px 20px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; text-decoration: none; color: #0f172a; transition: border-color 0.2s, transform 0.2s; }
.article-nav-link:hover { border-color: #f97316; transform: translateY(-2px); }
.article-nav-link.next { text-align: right; }
.article-nav-link.empty { border: none; background: transparent; }
.article-nav-link .nav-dir { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #f97316; margin-bottom: 6px; }
.article-nav-link .nav-title { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.browse-all-link { margin-top: 20px; font-weight: 600; }
.browse-all-link a { color: #f97316; text-decoration: none; }

.newsletter-box { margin: 60px auto 40px; }
.newsletter-card { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: #0f172a; color: white; padding: 40px; border-radius: 20px; flex-wrap: wrap; }
.newsletter-copy { flex: 1; min-width: 280px; }
.newsletter-copy .eyebrow { color: #f97316; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.newsletter-copy .dot { width: 7px; height: 7px; border-radius: 50%; background: #f97316; display: inline-block; }
.newsletter-copy h3 { font-size: 1.5rem; line-height: 1.3; margin-bottom: 8px; color: #fff; }
.newsletter-copy p { color: #94a3b8; font-size: 0.95rem; margin: 0; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 300px; }
.newsletter-input-group { display: flex; gap: 10px; width: 100%; flex-wrap: wrap; }
.newsletter-form input[type=email], .newsletter-input-group input[type=email] { flex: 1; min-width: 200px; padding: 14px 16px; border-radius: 10px; border: 1px solid #334155; background: #1e293b; color: white; font-size: 0.95rem; outline: none; }
.newsletter-form input[type=email]:focus, .newsletter-input-group input[type=email]:focus { border-color: #f97316; }
.newsletter-form .button, .newsletter-input-group .button { padding: 14px 22px; border-radius: 10px; background: #f97316; color: white; font-weight: 700; border: none; cursor: pointer; white-space: nowrap; }
.newsletter-form .button:hover, .newsletter-input-group .button:hover { background: #ea580c; }
.newsletter-status { width: 100%; font-size: 0.95rem; font-weight: 600; min-height: 24px; margin-top: 4px; }
.newsletter-status.is-success, .newsletter-success { color: #34d399; font-weight: 700; }
.newsletter-status.is-error { color: #f87171; font-weight: 700; }
.newsletter-status.is-loading { color: #94a3b8; }

