/* ════════════════════════════════════════════════════════════════
   ZEREST BLOG — archive (page-blog.php) + single post (single-post.php).
   Neither page runs through the zerest_* shortcode system in
   functions.php, so this stylesheet is enqueued separately (see
   zerest_enqueue_blog_assets in functions.php) rather than piggybacking
   on home.css. It reuses the same design tokens/typeface as home.css
   (--zh-* custom properties, 'Outfit') so the blog reads as the same
   site instead of bare Seedlet/WordPress defaults.
   ════════════════════════════════════════════════════════════════ */

@font-face {
    font-family: 'Outfit';
    src: url('fonts/outfit.woff2') format('woff2');
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
}

.zr-blog-archive,
.zr-blog-archive *,
.zr-post,
.zr-post * {
    box-sizing: border-box;
    font-family: 'Outfit', system-ui, sans-serif;
}

:root {
    --zh-bg: #ffffff;
    --zh-bg-soft: #f4f5f7;
    --zh-ink: #12141a;
    --zh-ink-mid: rgba(18, 20, 26, .62);
    --zh-ink-soft: rgba(18, 20, 26, .42);
    --zh-ink-faint: rgba(18, 20, 26, .16);
    --zh-line: rgba(18, 20, 26, .10);
    --zh-accent: #2c3ef0;
    --zh-accent-hover: #212fc7;
    --zh-accent-soft: rgba(44, 62, 240, .07);
    --zh-accent-border: rgba(44, 62, 240, .28);
    --zh-r-md: 16px;
}

/* Fixed, blurred #masthead nav (header-content.php) floats over the page
   rather than pushing content down — every other template that isn't a
   zerest shortcode page needs its own top clearance (see the identical
   body.woocommerce-page #main rule in header-content.php's own <style>). */
body.page-template-page-blog #main,
body.single-post #main {
    padding-top: 110px !important;
    background: var(--zh-bg);
}

/* Archive header lost its eyebrow line (removed per request), so the
   "Blog" title itself now needs enough clearance below the fixed nav —
   #main's shared 110px padding alone left it feeling cramped once that
   smaller label above it was gone. */
body.page-template-page-blog .zr-blog-hero {
    padding-top: 48px;
}

/* ── ARCHIVE (page-blog.php) ── */

.zr-blog-hero {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 56px;
    text-align: center;
}

.zr-blog-eyebrow {
    font-size: 12px;
    letter-spacing: .16em;
    color: var(--zh-accent);
    text-transform: uppercase;
    margin: 0 0 14px;
}

.zr-blog-title {
    font-size: clamp(32px, 4.5vw, 48px);
    font-weight: 600;
    letter-spacing: -.02em;
    color: var(--zh-ink);
    margin: 0 0 14px;
}

.zr-blog-sub {
    font-size: clamp(15px, 1.4vw, 17px);
    color: var(--zh-ink-mid);
    line-height: 1.7;
    margin: 0;
}

.zr-blog-content {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

/* Reset the Gutenberg wrapper chrome (inline padding + narrow flex column)
   around the Query Loop block — same class of fix as home.css's
   .wp-block-columns reset, needed here too since this page also renders
   through WordPress's default block wrapper markup. */
.zr-blog-content .wp-block-group {
    padding: 0 !important;
}
.zr-blog-content .wp-block-columns {
    display: block !important;
}
.zr-blog-content .wp-block-column {
    flex-basis: auto !important;
    width: 100% !important;
}

.zr-blog-content .wp-block-post-template {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.zr-blog-content li.wp-block-post {
    background: var(--zh-bg);
    border: 1px solid var(--zh-line);
    border-radius: var(--zh-r-md);
    overflow: hidden;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .zr-blog-content li.wp-block-post:hover {
        border-color: var(--zh-accent-border);
        transform: translateY(-4px);
        box-shadow: 0 20px 50px rgba(18, 20, 26, .10);
    }
}

.zr-blog-content .wp-block-post-featured-image {
    margin: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--zh-bg-soft);
}

.zr-blog-content .wp-block-post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

@media (hover: hover) and (pointer: fine) {
    .zr-blog-content li.wp-block-post:hover .wp-block-post-featured-image img {
        transform: scale(1.05);
    }
}

.zr-blog-content .wp-block-post-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.01em;
    color: var(--zh-ink);
    margin: 0;
    padding: 20px 20px 6px;
}

.zr-blog-content .wp-block-post-title a {
    color: inherit;
    text-decoration: none !important;
    border-bottom: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .zr-blog-content .wp-block-post-title a:hover {
        color: var(--zh-accent);
    }
}

.zr-blog-content .wp-block-post-excerpt {
    padding: 0 20px;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--zh-ink-mid);
}

.zr-blog-content .wp-block-post-date {
    padding: 0 20px 20px;
    font-size: 12.5px;
    letter-spacing: .04em;
    color: var(--zh-ink-soft);
}

.zr-blog-content .wp-block-post-date time {
    color: inherit;
}

/* pagination, if the query loop ever grows past one page */
.zr-blog-content .wp-block-query-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 56px;
}

.zr-blog-content .wp-block-query-pagination a,
.zr-blog-content .wp-block-query-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--zh-line);
    border-radius: 999px;
    font-size: 13px;
    color: var(--zh-ink-mid);
    text-decoration: none;
    transition: border-color .2s, color .2s;
}

.zr-blog-content .wp-block-query-pagination-numbers .current {
    color: #fff;
    background: var(--zh-accent);
    border-color: var(--zh-accent);
}

@media (hover: hover) and (pointer: fine) {
    .zr-blog-content .wp-block-query-pagination a:hover {
        border-color: var(--zh-accent);
        color: var(--zh-accent);
    }
}

@media (max-width: 1024px) {
    .zr-blog-content .wp-block-post-template {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 640px) {
    body.page-template-page-blog #main,
    body.single-post #main {
        padding-top: 90px !important;
    }
    .zr-blog-hero {
        padding: 0 20px 40px;
    }
    .zr-blog-content {
        padding: 0 20px 72px;
    }
    .zr-blog-content .wp-block-post-template {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ── SINGLE POST (single-post.php) ── */

.zr-post {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

.zr-post-nav {
    margin-bottom: 28px;
}

.zr-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--zh-ink-mid);
    text-decoration: none !important;
    border-bottom: none !important;
    font-size: 13px;
    letter-spacing: .04em;
    transition: color .2s;
}

.zr-back-link svg {
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    .zr-back-link:hover {
        color: var(--zh-accent);
    }
}

.zr-post-header {
    text-align: center;
    margin-bottom: 36px;
}

.zr-post-cat {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--zh-accent);
    background: var(--zh-accent-soft);
    border: 1px solid var(--zh-accent-border);
    border-radius: 999px;
    padding: 6px 16px;
    margin-bottom: 18px;
}

.zr-post-title {
    font-size: clamp(28px, 4.5vw, 44px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: var(--zh-ink);
    margin: 0 0 16px;
}

.zr-post-meta {
    font-size: 13px;
    letter-spacing: .04em;
    color: var(--zh-ink-soft);
}

.zr-post-thumb {
    margin: 0 0 48px;
    border-radius: var(--zh-r-md);
    overflow: hidden;
    border: 1px solid var(--zh-line);
    box-shadow: 0 30px 70px rgba(18, 20, 26, .10);
}

.zr-post-thumb img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.zr-post-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--zh-ink-mid);
}

.zr-post-content h2,
.zr-post-content h3,
.zr-post-content h4 {
    color: var(--zh-ink);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.3;
    margin: 40px 0 16px;
}

.zr-post-content h2 { font-size: 26px; }
.zr-post-content h3 { font-size: 20px; }
.zr-post-content h4 { font-size: 17px; }

.zr-post-content > *:first-child {
    margin-top: 0;
}

/* Seedlet ships a rule (`.entry-content > *:not(.alignwide):not(.alignfull)
   :not(.alignleft):not(.alignright):not(.wp-block-separator):not(
   .entry-attachment):not(.woocommerce)`) that caps every direct child of
   .entry-content to var(--responsive--aligndefault-width) with its own
   margin:auto. .zr-post-content keeps the entry-content class (other
   theme/plugin code may expect it), so every heading/paragraph/image
   inside a post was being individually re-centered and width-capped
   instead of simply filling this already-centered 760px column —
   producing a jagged, inconsistent left/right edge per element rather
   than one flush column. Mirrors Seedlet's own :not() list so aligned
   blocks (alignwide/alignfull/etc.) keep their normal behavior. */
.zr-post-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.entry-attachment):not(.woocommerce) {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.zr-post-content p {
    margin: 0 0 22px;
}

.zr-post-content strong {
    color: var(--zh-ink);
    font-weight: 600;
}

.zr-post-content a {
    color: var(--zh-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    border-bottom: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .zr-post-content a:hover {
        color: var(--zh-accent-hover);
    }
}

.zr-post-content ul,
.zr-post-content ol {
    margin: 0 0 22px;
    padding-left: 22px;
}

.zr-post-content li {
    margin-bottom: 8px;
}

.zr-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 8px 0;
}

.zr-post-content h2 img,
.zr-post-content h3 img,
.zr-post-content h4 img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    max-height: 160px;
    vertical-align: middle;
    margin: 6px 0 6px 12px;
    border-radius: 10px;
}

.zr-post-content hr {
    border: none;
    border-top: 1px solid var(--zh-line);
    margin: 40px 0;
}

.zr-post-content blockquote {
    margin: 0 0 22px;
    padding: 4px 0 4px 20px;
    border-left: 2px solid var(--zh-accent);
    color: var(--zh-ink);
    font-style: italic;
}

@media (max-width: 640px) {
    .zr-post {
        padding: 0 20px 72px;
    }
    .zr-post-thumb {
        margin-bottom: 32px;
    }
    .zr-post-content {
        font-size: 16px;
    }
}
