/* =====================================================================
   WordPress-only styles: blog posts, pagination, editor content, admin bar.
   The design itself is in style.css (same file as the static site).
   ===================================================================== */

/* Sticky header below the admin bar when logged in */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* Post hero: show the whole featured image (old banners have text on them) */
.page-hero .post-hero-photo { aspect-ratio: auto; background: #fff; }
.page-hero .post-hero-photo img { height: auto; object-fit: contain; }

/* Post content written in the editor */
.post-body h2, .post-body h3 { scroll-margin-top: calc(var(--header-h) + 20px); }
.post-body img { max-width: 100%; height: auto; border-radius: 14px; }
.post-body figure, .post-body .wp-caption { max-width: 100%; margin: 1.6rem 0; }
.post-body figcaption, .post-body .wp-caption-text { font-size: .88rem; color: var(--muted); margin-top: .5rem; text-align: center; }
.post-body .alignleft { float: left; margin: .3rem 1.4rem 1rem 0; }
.post-body .alignright { float: right; margin: .3rem 0 1rem 1.4rem; }
.post-body .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.post-body table { border-collapse: collapse; margin-bottom: 1.4rem; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: .6rem .8rem; }
.post-body th { background: var(--soft); color: var(--ink); }
.post-body iframe { max-width: 100%; }
.post-body::after { content: ""; display: table; clear: both; }
@media (max-width: 575.98px) { .post-body .alignleft, .post-body .alignright { float: none; margin: 1rem 0; } }

/* Long tables of contents scroll inside the sticky box */
.toc ol { max-height: calc(100vh - var(--header-h) - 230px); overflow-y: auto; padding-right: .3rem; }

/* Blog pagination (paginate_links) */
.blog-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .45rem; margin-top: 3rem; font-weight: 700; }
.blog-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 44px; height: 44px; padding: 0 .9rem; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; }
.blog-pager a.page-numbers:hover { border-color: var(--navy); color: var(--navy); }
.blog-pager .page-numbers.current { background: var(--navy); border-color: var(--navy); color: #fff; }
.blog-pager .page-numbers.dots { border: 0; background: none; min-width: 0; padding: 0 .2rem; color: var(--muted); }
.blog-pager .prev { margin-right: .6rem; }
.blog-pager .next { margin-left: .6rem; }

/* Accessibility helper WordPress expects */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
