/* ═══════════════════════════════════════════════════════════════════
   Blog Styles
   Page template: page-blog.php
   Single post badge: blog-setup.php (the_content filter)
   ═══════════════════════════════════════════════════════════════════ */


/* ── Page Header ─────────────────────────────────────────────────── */

.blog-header {
    padding: 3rem 0 1.5rem;
}

.blog-header__title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #0F2532;
    margin: 0 0 0.5rem;
}

.blog-header__sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.125rem;
    color: #64748B;
    margin: 0;
}


/* ── Category Filter Tabs ────────────────────────────────────────── */

.blog-filters-section {
    padding: 0 0 2rem;
}

.blog-filters {
    display: flex;
    gap: 0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    border-bottom: 1px solid #E2EFF2;
}

.blog-filters::-webkit-scrollbar {
    display: none;
}

.blog-filter {
    flex-shrink: 0;
    padding: 0.625rem 1.25rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #64748B;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.blog-filter:hover {
    color: #0891B2;
}

.blog-filter--active {
    color: #0891B2;
    border-bottom-color: #0891B2;
    font-weight: 600;
}


/* ── Featured Post ───────────────────────────────────────────────── */

.blog-featured-section {
    padding: 0 0 2rem;
}

.blog-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: #fff;
    border: 1px solid #E2EFF2;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.blog-featured:hover {
    border-color: #0891B2;
    box-shadow: 0 4px 20px rgba(8, 145, 178, 0.08);
}

.blog-featured__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-featured__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-featured__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 2rem 2rem 0;
}

.blog-featured__title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0F2532;
    margin: 0.5rem 0 0.75rem;
    line-height: 1.3;
}

.blog-featured__excerpt {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    color: #64748B;
    margin: 0 0 1rem;
    line-height: 1.6;
}


/* ── Post Grid ───────────────────────────────────────────────────── */

.blog-grid-section {
    padding: 0 0 3rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #E2EFF2;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.blog-card:hover {
    border-color: #0891B2;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.08);
}

.blog-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card__body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    flex: 1;
}

.blog-card__badge {
    display: inline-block;
    align-self: flex-start;
    padding: 0.25rem 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0891B2;
    background: #E0F7FA;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.blog-card__title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: #0F2532;
    margin: 0.5rem 0 0.5rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
    color: #64748B;
    margin: 0 0 0.75rem;
    line-height: 1.5;
    flex: 1;
}

.blog-card__meta {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    color: #64748B;
    margin-top: auto;
}


/* ── Single Post Article Header ────────────────────────────────── */
.blog-article-header {
    padding: 3rem 0 2rem;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}
.blog-article-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0F172A;
    margin: 0.75rem 0 1rem;
}
.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    color: #64748B;
}
.blog-article-meta__sep {
    color: #CBD5E1;
}
.blog-article-body {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}
.blog-article-body .container {
    max-width: 720px;
}


/* ── Single Post Typography ─────────────────────────────────────── */
.single-post .entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0891B2;
}
.single-post .entry-content h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}
.single-post .entry-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
}
.single-post .entry-content ul,
.single-post .entry-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.single-post .entry-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}
.single-post .entry-content blockquote {
    border-left: 4px solid #0891B2;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    color: #64748B;
}

/* ── Updated Badge (Single Posts) ────────────────────────────────── */

.blog-updated-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0891B2;
    background: #E0F7FA;
    border-radius: 4px;
    margin-bottom: 1rem;
}


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

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9375rem;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.blog-pagination a {
    color: #0F2532;
}

.blog-pagination a:hover {
    background: #E0F7FA;
    color: #0891B2;
}

.blog-pagination .current {
    background: #0891B2;
    color: #fff;
    font-weight: 600;
}

.blog-pagination .dots {
    color: #64748B;
}

.blog-pagination .prev,
.blog-pagination .next {
    font-weight: 500;
    color: #0891B2;
}


/* ── Empty State ─────────────────────────────────────────────────── */

.blog-empty {
    text-align: center;
    padding: 4rem 0;
}

.blog-empty p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.125rem;
    color: #64748B;
    margin: 0 0 1.5rem;
}


/* ── Responsive: 768px ───────────────────────────────────────────── */

@media (max-width: 768px) {

    .blog-header__title {
        font-size: 2rem;
    }

    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-featured__content {
        padding: 1.25rem;
    }

    .blog-featured__title {
        font-size: 1.25rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-filters {
        gap: 0;
    }

    .blog-filter {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .blog-pagination {
        flex-wrap: wrap;
    }
}
