/* Blog index, single, comments, taxonomy chips */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.blog-header { margin-bottom: 1.25rem; }
.blog-intro { color: #64748b; max-width: 42rem; margin: .35rem 0 .75rem; }
.blog-feed-link { font-size: .9rem; margin: 0 0 1rem; }

.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 0 0 1.15rem;
}
.blog-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted, #475569);
    background: var(--panel, var(--paper, #f8fafc));
    border: 1px solid var(--line, #e2e8f0);
}
.blog-cat-chip:hover { text-decoration: none; color: var(--text, #0f172a); border-color: #94a3b8; }
.blog-cat-chip.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.blog-cat-count {
    font-size: .7rem;
    font-weight: 700;
    opacity: .85;
}
.blog-cat-chip--more {
    border-style: dashed;
    color: #2563eb;
}

.blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.blog-search { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; flex: 1; min-width: 14rem; margin-bottom: 0; }
.blog-search input[type="search"] {
    flex: 1;
    min-width: 12rem;
    padding: .65rem .85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: transparent;
    color: inherit;
}

.blog-view-toggle {
    display: inline-flex;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.blog-view-btn {
    padding: .45rem .85rem;
    font-size: .875rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    border-right: 1px solid #e2e8f0;
}
.blog-view-btn:last-child { border-right: none; }
.blog-view-btn:hover { color: #0f172a; text-decoration: none; background: #f8fafc; }
.blog-view-btn.is-active {
    background: #2563eb;
    color: #fff;
}

.blog-empty { color: #64748b; padding: 1rem 0; grid-column: 1 / -1; }

/* List (stacked) */
.post-list--list .post-item {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.post-list--list .post-item-has-thumb { padding-top: 0; overflow: hidden; }
.post-list--list .post-item-has-thumb .post-item-thumb {
    margin: 0 -1.25rem 1rem;
    border-radius: 8px 8px 0 0;
}
.post-list--list .post-item-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Grid (default) — uses theme CSS vars when present (dark themes: --panel/--text) */
.post-list--grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
.post-list--grid .post-item {
    background: var(--panel, var(--paper, #fff));
    color: var(--text, var(--ink, #0f172a));
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid var(--line, var(--hair, #e2e8f0));
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    padding: 0;
    height: 100%;
}
.post-list--grid .post-item-thumb { display: block; overflow: hidden; margin: 0 !important; border-radius: 0; }
.post-list--grid .post-item-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.post-list--grid .post-item-thumb:hover img { transform: scale(1.03); }
.post-list--grid .post-item-body {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-list--grid .post-item h2 {
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 .4rem;
}
.post-list--grid .post-item h2 a {
    color: var(--text, var(--ink, inherit));
    text-decoration: none;
}
.post-list--grid .post-item time {
    display: block;
    font-size: .8rem;
    color: var(--muted, #64748b);
    margin-bottom: .5rem;
}
.post-list--grid .post-item p {
    font-size: .9rem;
    color: #475569;
    margin: 0 0 .85rem;
    flex: 1;
}
.post-list--grid .post-read-more {
    font-size: .875rem;
    font-weight: 600;
    margin-top: auto;
}
.post-list--grid .post-item:not(.post-item-has-thumb) .post-item-body {
    padding-top: 1.15rem;
}

@media (max-width: 900px) {
    .post-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .post-list--grid { grid-template-columns: 1fr; }
    .blog-toolbar { align-items: stretch; }
    .blog-view-toggle { align-self: flex-start; }
}

.post-meta-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .75rem; }
.post-chip {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #f8fafc;
}
.post-chip:hover { text-decoration: none; border-color: #94a3b8; color: #0f172a; }
.post-chip-cat { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.post-chip-tag { background: #f1f5f9; }

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    align-items: center;
    margin: 1.5rem 0 0;
}
.blog-pagination .btn,
.blog-pagination .blog-page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding: .4rem .65rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    font-size: .9rem;
}
.blog-pagination .blog-page-num.is-current {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    font-weight: 600;
}
.blog-pagination .blog-page-ellipsis { opacity: .6; padding: 0 .25rem; }

.single-post time { display: block; color: #64748b; margin: .35rem 0 1rem; font-size: .9rem; }
.post-featured-image { margin: 1rem 0 1.5rem; }
.post-featured-image img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.post-content { line-height: 1.7; }
.post-content img { max-width: 100%; height: auto; }

.related-posts { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line, var(--hair, #e2e8f0)); }
.related-posts > h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--text, var(--ink, inherit)); }
.related-post-list.post-list--grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}
.related-post-list.post-list--grid .post-item h3 {
    font-size: .95rem;
    line-height: 1.35;
    margin: 0 0 .35rem;
    color: var(--text, var(--ink, inherit));
}
.related-post-list.post-list--grid .post-item h3 a {
    color: var(--text, var(--ink, inherit));
    text-decoration: none;
}
.related-post-list.post-list--grid .post-item h3 a:hover { text-decoration: underline; }
.related-post-list.post-list--grid .post-item time {
    color: var(--muted, #64748b);
}
.related-post-list.post-list--grid .post-item-thumb img {
    height: 140px;
}
@media (max-width: 1100px) {
    .related-post-list.post-list--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .related-post-list.post-list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .related-post-list.post-list--grid { grid-template-columns: 1fr; }
}

.post-comments { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0; }
.post-comments h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.comment-list { list-style: none; margin: 0 0 1.5rem; padding: 0; }
.comment-item {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    margin-bottom: .75rem;
}
.comment-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 0 0 .5rem; font-size: .875rem; color: #64748b; }
.comment-meta strong { color: #0f172a; }
.comment-body { line-height: 1.55; }
.comment-empty { color: #64748b; margin-bottom: 1rem; }
.comment-form .form-field { margin-bottom: 1rem; }
.comment-form .field-label { display: block; margin: 0 0 .4rem; font-weight: 500; font-size: .875rem; }
.comment-form .field-label .req { color: #dc2626; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: .7rem .85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    color: inherit;
}
.comment-form .form-note {
    margin: .65rem 0 0;
    padding: .65rem .85rem;
    border-radius: 8px;
    font-size: .8125rem;
    background: rgba(120, 120, 120, .08);
    color: #64748b;
}
.comment-form .form-actions { margin-top: 1rem; }
