/* ─── Blog archive grid ─────────────────────────────────────────────────── */

.ld-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--ld-space-5);
    margin-bottom: var(--ld-space-6);
}

.ld-blog-card {
    background: var(--ld-surface);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.ld-blog-card:hover {
    box-shadow: 0 8px 24px rgba(30, 100, 255, .10);
    transform: translateY(-2px);
}

.ld-blog-card__thumb-link { display: block; line-height: 0; }
.ld-blog-card__thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.ld-blog-card__body {
    padding: var(--ld-space-4);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--ld-space-2);
}

.ld-blog-card__cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ld-primary);
    text-decoration: none;
}
.ld-blog-card__cat:hover { text-decoration: underline; }

.ld-blog-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.ld-blog-card__title a {
    color: var(--ld-text);
    text-decoration: none;
}
.ld-blog-card__title a:hover { color: var(--ld-primary); }

.ld-blog-card__excerpt {
    font-size: 14px;
    color: var(--ld-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.ld-blog-card__footer {
    display: flex;
    align-items: center;
    gap: var(--ld-space-2);
    padding-top: var(--ld-space-3);
    border-top: 1px solid var(--ld-border);
    font-size: 13px;
    color: var(--ld-muted);
    margin-top: auto;
}
.ld-blog-card__read::before { content: '· '; }

/* ─── Pagination ─────────────────────────────────────────────────────────── */

.ld-blog-pagination {
    display: flex;
    gap: var(--ld-space-2);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--ld-space-5);
}
.ld-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 var(--ld-space-2);
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--ld-text);
    transition: background .15s, border-color .15s, color .15s;
}
.ld-blog-pagination .page-numbers:hover,
.ld-blog-pagination .page-numbers.current {
    background: var(--ld-primary);
    border-color: var(--ld-primary);
    color: #fff;
}
.ld-blog-pagination .page-numbers.dots {
    pointer-events: none;
    background: none;
    border-color: transparent;
}

/* ─── Comments ───────────────────────────────────────────────────────────── */

.ld-post-comments {
    margin-top: var(--ld-space-7);
    padding-top: var(--ld-space-6);
    border-top: 1px solid var(--ld-border);
}

.ld-post-comments .ld-post-comments__title,
.ld-post-comments .comments-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 var(--ld-space-5);
    color: var(--ld-text);
}

/* Comment list */
.ld-post-comments .comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--ld-space-6);
}
.ld-post-comments .comment-list .comment {
    padding: var(--ld-space-4) 0;
    border-bottom: 1px solid var(--ld-border);
}
.ld-post-comments .comment-list .comment:last-child { border-bottom: none; }

.ld-post-comments .comment-body {
    display: flex;
    gap: var(--ld-space-3);
}
.ld-post-comments .comment-body > .comment-author { flex-shrink: 0; }
.ld-post-comments .comment-author img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: block;
}
.ld-post-comments .comment-author .fn {
    font-weight: 600;
    font-size: 14px;
    font-style: normal;
}
.ld-post-comments .comment-author .url {
    color: var(--ld-primary);
    text-decoration: none;
}
.ld-post-comments .comment-metadata {
    font-size: 12px;
    color: var(--ld-muted);
    margin-bottom: var(--ld-space-2);
}
.ld-post-comments .comment-metadata a {
    color: inherit;
    text-decoration: none;
}
.ld-post-comments .comment-content p {
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
    color: var(--ld-text);
}
.ld-post-comments .reply { margin-top: var(--ld-space-2); }
.ld-post-comments .comment-reply-link {
    font-size: 13px;
    color: var(--ld-primary);
    text-decoration: none;
    font-weight: 500;
}
.ld-post-comments .comment-reply-link:hover { text-decoration: underline; }

/* Nested replies */
.ld-post-comments .children {
    list-style: none;
    padding-left: var(--ld-space-5);
    margin: var(--ld-space-2) 0 0;
    border-left: 2px solid var(--ld-border);
}

/* Awaiting moderation */
.ld-post-comments .comment-awaiting-moderation {
    font-size: 13px;
    color: var(--ld-muted);
    font-style: italic;
}

/* ─── Comment form ───────────────────────────────────────────────────────── */

.ld-post-comments #respond { margin-top: var(--ld-space-5); }

.ld-post-comments .comment-reply-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 var(--ld-space-4);
    color: var(--ld-text);
    display: flex;
    align-items: center;
    gap: var(--ld-space-3);
}
.ld-post-comments .comment-reply-title small { font-size: 13px; font-weight: 400; }
.ld-post-comments .comment-reply-title a {
    font-size: 13px;
    font-weight: 400;
    color: var(--ld-primary);
}

.ld-post-comments .comment-form {
    display: flex;
    flex-direction: column;
    gap: var(--ld-space-3);
}
.ld-post-comments .comment-form p { margin: 0; }

.ld-post-comments .comment-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ld-muted);
    margin-bottom: 5px;
}
.ld-post-comments .comment-form .required { color: var(--ld-danger); }

.ld-post-comments .comment-form input[type="text"],
.ld-post-comments .comment-form input[type="email"],
.ld-post-comments .comment-form input[type="url"],
.ld-post-comments .comment-form textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ld-border);
    border-radius: var(--ld-radius-sm);
    font-family: var(--ld-font);
    font-size: 15px;
    color: var(--ld-text);
    background: var(--ld-surface);
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.ld-post-comments .comment-form input:focus,
.ld-post-comments .comment-form textarea:focus {
    outline: none;
    border-color: var(--ld-primary);
    box-shadow: 0 0 0 3px rgba(30, 100, 255, .10);
}
.ld-post-comments .comment-form textarea {
    min-height: 130px;
    resize: vertical;
}
.ld-post-comments .comment-notes {
    font-size: 13px;
    color: var(--ld-muted);
    margin: 0;
}
.ld-post-comments .form-submit { margin-top: var(--ld-space-1); }
.ld-post-comments .comment-form .submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--ld-primary) 0%, var(--ld-primary-700, #0f4fd9) 100%);
    color: #fff;
    font-family: var(--ld-font);
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--ld-radius-sm);
    cursor: pointer;
    transition: opacity .15s;
}
.ld-post-comments .comment-form .submit:hover { opacity: .88; }

/* ─── Logged-in notice ───────────────────────────────────────────────────── */
.ld-post-comments .logged-in-as {
    font-size: 13px;
    color: var(--ld-muted);
    margin: 0;
}
.ld-post-comments .logged-in-as a { color: var(--ld-primary); }

/* ─── Comments closed notice ─────────────────────────────────────────────── */
.ld-post-comments .no-comments {
    font-size: 14px;
    color: var(--ld-muted);
    font-style: italic;
    padding: var(--ld-space-4) 0;
}

/* ===== Blog category filter nav ===== */
.ld-blog-cats-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.ld-blog-cats-nav__item {
    display: inline-flex;
    align-items: center;
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid #e5eaf2;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}
.ld-blog-cats-nav__item:hover { background: #eef3ff; border-color: #1e64ff; color: #1e64ff; }
.ld-blog-cats-nav__item--active { background: #1e64ff; border-color: #1e64ff; color: #fff; }
.ld-blog-cats-nav__count { margin-left: 5px; font-size: 11px; opacity: .65; }

/* ===== Blog intro block (main blog page only) ===== */
.ld-blog-intro {
    background: #f8fafc;
    border: 1px solid #e5eaf2;
    border-left: 4px solid #1e64ff;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 28px;
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
}
.ld-blog-intro p { margin: 0; }
.ld-blog-intro p + p { margin-top: 10px; }
.ld-blog-intro__list {
    margin: 10px 0 10px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ld-blog-intro__list li { color: #475569; }
.ld-blog-intro strong { color: #0f172a; }
.ld-blog-intro a { color: #1e64ff; text-decoration: none; }
.ld-blog-intro a:hover { text-decoration: underline; }
