/* ============================================
   MarkellosArt Blog Styles
   ============================================ */

/* --- Blog Listing (blog.php) --- */
#blog-page .content h1 {
    font-family: 'Tangerine', cursive;
    font-size: 3em;
    color: #333;
    margin-bottom: 0.1em;
}
.blog-subtitle {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 1.1em;
    color: #777;
    margin-bottom: 2em;
}
.no-posts {
    font-style: italic;
    color: #999;
    padding: 2em 0;
}

/* --- Card Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2em;
    margin-bottom: 2em;
}
.blog-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: box-shadow 300ms ease, transform 200ms ease;
}
.blog-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}
.blog-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f0ede8;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}
.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}
.video-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding-left: 3px;
}
.blog-card-body {
    padding: 1.2em;
}
.blog-card-body time {
    font-size: 0.8em;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.blog-card-body h2 {
    font-family: 'Oswald', sans-serif;
    font-weight: 400;
    font-size: 1.25em;
    margin: 0.4em 0;
    color: #333;
    line-height: 1.3;
}
.blog-card-body p {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.8em;
}
.read-more {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    font-size: 0.9em;
    color: #4496d2;
}

/* --- Pagination --- */
.blog-pagination {
    text-align: center;
    padding: 1.5em 0;
}
.blog-pagination a,
.blog-pagination .current-page {
    display: inline-block;
    padding: 0.4em 0.8em;
    margin: 0 0.2em;
    text-decoration: none;
}
.blog-pagination a {
    color: #4496d2;
}
.blog-pagination a:hover {
    background: #4496d2;
    color: #fff;
}
.blog-pagination .current-page {
    background: #333;
    color: #fff;
}

/* --- Single Post (blog-post.php) --- */
#blog-post-page .content {
    max-width: 800px;
    margin: 0 auto;
}
.back-to-blog {
    display: inline-block;
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    color: #4496d2;
    margin-bottom: 1em;
    text-decoration: none;
}
.back-to-blog:hover {
    text-decoration: underline;
}
/* V9_T_BLOG_TITLE_FIX_2026-05-07_v3: fluid sizing + max-width — ID-based specificity.
   Iter-1 (.post-header h1, 0,1,1) lost to main.css cascade.
   Iter-2 (.page-article .content-wrapper .post-header h1, 0,3,1) ALSO lost — main.css selector is
   `article.page-article.non-image-bg > section.content-wrapper h1` = (0,3,3) which I miscounted.
   Iter-3: use #blog-post-page ID (article element has id="blog-post-page") = (1,1,1).
   ID-based specificity (1,1,1) wins over any class-only selector regardless of class count.
   main.css cascades 7em desktop / small.css 5em mobile (375px) / medium.css 6em tablet / tiny.css 4em (≤320px).
   Now: 32px mobile → 52px 4K via clamp, max-width 30ch → 2-3 lines max.
   Cursive font-family preserved (visual identity per AC-5). */
#blog-post-page .post-header h1 {
    font-family: 'Tangerine', cursive;
    font-size: clamp(2rem, 5vw + 0.5rem, 3.25rem);
    color: #333;
    /* V9_T_BLOG_TITLE_FIX_2026-05-07_v4: center the constrained H1 box +
       text-align center so wrapped lines are visually balanced. Greek + Chinese
       fallback fonts have wider `0` glyph than Tangerine → at narrow viewport
       the 30ch box was hugging left edge; this restores the visual balance. */
    margin: 0 auto 0.3em auto;
    line-height: 1.15;
    max-width: 30ch;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
}
#blog-post-page .post-header time {
    text-align: center;
}
.post-header time {
    font-size: 0.85em;
    color: #999;
    display: block;
    margin-bottom: 1.5em;
}

.post-video {
    margin-bottom: 1.5em;
}
.post-video video {
    width: 100%;
    max-height: 500px;
    background: #000;
    display: block;
}
.post-video-embed {
    margin-bottom: 1.5em;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.post-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.post-body {
    font-size: 1.05em;
    line-height: 1.7;
    color: #444;
    margin-bottom: 2em;
}
.post-body p {
    margin-bottom: 1em;
}
.post-body img {
    max-width: 100%;
    height: auto;
}

/* --- Related Painting --- */
.related-painting {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5em;
    margin-bottom: 1.5em;
}
.related-painting h3 {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    margin-bottom: 0.8em;
    color: #555;
}
.painting-link {
    display: inline-block;
    text-decoration: none;
    color: #333;
}
.painting-link img {
    max-width: 250px;
    height: auto;
    border: 1px solid #ddd;
    margin-bottom: 0.5em;
    display: block;
}
.painting-link span {
    font-size: 0.9em;
    color: #4496d2;
}

/* --- Share --- */
.post-share {
    border-top: 1px solid #e0e0e0;
    padding: 1em 0;
    margin-bottom: 1.5em;
}
.post-share span {
    font-family: 'Oswald', sans-serif;
    font-weight: 300;
    color: #777;
    margin-right: 0.8em;
}
.post-share a {
    display: inline-block;
    padding: 0.3em 0.8em;
    margin-right: 0.5em;
    font-size: 0.85em;
    text-decoration: none;
    color: #fff;
    border-radius: 3px;
}
.share-fb  { background: #3b5998; }
.share-tw  { background: #1da1f2; }
.share-pin { background: #bd081c; }
.post-share a:hover { opacity: 0.85; color: #fff; text-decoration: none; }

/* --- Responsive --- */
@media screen and (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    #blog-page .content h1 {
        font-size: 2.2em;
    }
    /* V9_T_BLOG_TITLE_FIX_2026-05-07: .post-header h1 removed from this override —
       clamp() in main rule handles responsive sizing natively across all viewports. */
    .blog-card-body h2 {
        font-size: 1.1em;
    }
}
@media screen and (min-width: 481px) and (max-width: 767px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2em;
    }
}

/* ── Blog featured image frame — uses photo-frame.css border-image (same as painting.php) ── */
.post-featured-image {
    margin-bottom: 1.5em;
    position: relative;
}
.post-featured-image::before,
.post-featured-image::after {
    display: none;
}
.post-featured-image .photo-frame {
    --frame-w: 60px;
}
@media (max-width: 767px) {
    .post-featured-image .photo-frame { --frame-w: 30px; }
}
@media (max-width: 380px) {
    .post-featured-image .photo-frame { --frame-w: 22px; }
}
.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}
/* Video — breathing space below frame */
#postVideoWrap {
    position: relative;
    margin-top: 0;
    margin-bottom: 1.5em;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ── Video autoplay controls ──────────────────────────────────────────── */
#postVideoWrap video {
    width: 100%;
    max-height: 520px;
    display: block;
    background: #000;
}
.video-controls {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 8px 0 2px;
    opacity: 1;
    pointer-events: all;
    background: transparent;
}
.btn-video-pause,
.btn-video-mute {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: rgba(0, 0, 0, 0.07);
    color: #444;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 24px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}
.btn-video-pause:hover,
.btn-video-mute:hover {
    background: rgba(0, 0, 0, 0.14);
}
.btn-video-pause { font-size: 16px; padding: 6px 14px; }
