/* ==========================================================
   Blog - Studia | 21
   ========================================================== */

/* ---------- Listing ---------- */
.blog-grid { row-gap: 32px; }

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}
.blog-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-secondary);
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.blog-card:hover .blog-card-image img { transform: scale(1.06); }
.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--accent);
    opacity: .5;
}
.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: .8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.blog-meta i { color: var(--accent); margin-right: 6px; }
.blog-card-title {
    font-size: 1.3rem;
    line-height: 1.35;
    margin: 0 0 12px;
}
.blog-card-title a { color: var(--text-primary); text-decoration: none; }
.blog-card-title a:hover { color: var(--accent); }
.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}
.blog-read-more {
    margin-top: auto;
    color: var(--accent);
    font-weight: 700;
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}
.blog-read-more i { margin-left: 8px; transition: transform .3s ease; }
.blog-read-more:hover { color: var(--accent-hover); }
.blog-read-more:hover i { transform: translateX(5px); }

/* ---------- Single post ---------- */
.post-header {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
.post-header h1 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    line-height: 1.2;
    margin: 12px 0 20px;
}
.post-header .blog-meta { justify-content: center; font-size: .9rem; margin-bottom: 0; }
.post-cover {
    max-width: 1000px;
    margin: 40px auto 0;
}
.post-cover img {
    width: 100%;
    height: auto;
    max-height: 560px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    box-shadow: var(--shadow-md);
}

.post-body {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-secondary);
}
.post-body h2, .post-body h3, .post-body h4 {
    color: var(--text-primary);
    line-height: 1.3;
    margin: 2.2em 0 .7em;
}
.post-body h2 { font-size: 1.9rem; }
.post-body h3 { font-size: 1.5rem; }
.post-body h4 { font-size: 1.2rem; }
.post-body p { margin-bottom: 1.4em; }
.post-body a { color: var(--accent); text-decoration: underline; }
.post-body a:hover { color: var(--accent-hover); }
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.2em 0;
}
.post-body ul, .post-body ol { margin: 0 0 1.4em 1.4em; padding-left: .6em; }
.post-body li { margin-bottom: .5em; }
.post-body blockquote {
    margin: 2em 0;
    padding: 6px 0 6px 24px;
    border-left: 3px solid var(--accent);
    font-style: italic;
    color: var(--text-primary);
}
.post-body pre {
    background: #1A1612;
    color: #F5F0E8;
    padding: 18px 20px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: .9rem;
    margin: 1.6em 0;
}
.post-body code { font-size: .92em; }
.post-body table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .95rem; }
.post-body th, .post-body td { border: 1px solid var(--border-hover); padding: 10px 14px; text-align: left; }
.post-body iframe, .post-body .ql-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 6px;
    margin: 1.4em 0;
}
.post-body hr { border: 0; border-top: 1px solid var(--border-hover); margin: 2.5em 0; }

/* alignment / indent classes produced by the editor */
.post-body .ql-align-center { text-align: center; }
.post-body .ql-align-right { text-align: right; }
.post-body .ql-align-justify { text-align: justify; }
.post-body .ql-indent-1 { padding-left: 2em; }
.post-body .ql-indent-2 { padding-left: 4em; }
.post-body .ql-indent-3 { padding-left: 6em; }

.post-share {
    max-width: 760px;
    margin: 50px auto 0;
    padding-top: 28px;
    border-top: 1px solid var(--border-hover);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.post-share-label {
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .8rem;
    color: var(--text-muted);
    margin-right: 6px;
}
.post-share a, .post-share button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-hover);
    background: transparent;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    transition: all .3s ease;
}
.post-share a:hover, .post-share button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.draft-banner {
    background: #fff3cd;
    color: #664d03;
    text-align: center;
    padding: 10px 16px;
    font-size: .9rem;
    font-weight: 700;
    position: relative;
    z-index: 5;
}

.blog-empty { text-align: center; padding: 60px 0; }
.blog-empty i { font-size: 4rem; color: var(--text-muted); margin-bottom: 20px; }

@media (max-width: 767px) {
    .post-body { font-size: 1.02rem; }
    .blog-card-body { padding: 20px; }
}
