/* ============================================================
   blog-page.css  —  Blog index page matching reference design
   ============================================================ */

/* ── Page wrapper ─────────────────────────────────────────── */
.bp-page {
    background: #eef2ff;
    padding: 20px 0 40px;
}

/* ── HERO ─────────────────────────────────────────────────── */
.bp-hero {
    display: flex;
    align-items: center;
    gap: 48px;
    padding-bottom: 32px;
}

.bp-hero__text {
    flex: 1 1 0;
    min-width: 0;
}

.bp-hero__media {
    flex: 0 0 360px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.bp-badge {
    display: inline-block;
    background: #dbeafe;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.bp-title {
    font-size: 38px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
    margin: 0 0 14px;
    letter-spacing: -0.4px;
}

.bp-subtitle {
    font-size: 15px;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    max-width: 480px;
}

.bp-hero__img {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    mix-blend-mode: multiply;
}

.bp-dots {
    position: absolute;
    top: 30px;
    right: -40px;
    width: 60px;
    height: 60px;
    background-image: radial-gradient(circle, #93c5fd 2px, transparent 2px);
    background-size: 14px 14px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

/* ── CATEGORY FILTER ROW ──────────────────────────────────── */
.bp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.bp-filter-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 20px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}

.bp-filter-btn:hover,
.bp-filter-btn:focus {
    border-color: #2563eb;
    color: #2563eb;
    text-decoration: none;
    transform: scale(1.04);
}

.bp-filter-btn--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.bp-filter-btn--active:hover,
.bp-filter-btn--active:focus {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
    transform: scale(1.04);
}

/* ── BODY: article grid + sidebar ────────────────────────── */
.bp-body {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    margin-bottom: 24px;
}

/* ── Article card grid ────────────────────────────────────── */
.bp-articles {
    flex: 1 1 0;
    min-width: 0;
}

.bp-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

/* Blog post card overrides (within .bp-articles) */
.bp-articles .blog-post-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.bp-articles .blog-post-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(37,99,235,.13);
    text-decoration: none;
    color: inherit;
}

.bp-articles .blog-post-image {
    margin: 0;
    padding: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
    background: #e2e8f0;
}

.bp-articles .blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.bp-articles .blog-post-item:hover .blog-post-image img {
    transform: scale(1.05);
}

.bp-articles .blog-post-item-bottom {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bp-articles .blog-post-category {
    display: inline-block;
    background: #dbeafe;
    color: #2563eb;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    align-self: flex-start;
}

.bp-articles .blog-post-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-articles .blog-post-sub-title {
    font-size: 13px;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 14px;
}

.bp-articles .blog-post-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
    margin-top: auto;
}

/* Hide old tags wrapper and author elements if they still render */
.bp-articles .blog-post-tags-wrapper,
.bp-articles .blog-post-author-image { display: none; }

.bp-articles .blog-post-date,
.bp-articles .blog-post-readtime {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

.bp-articles .blog-post-date svg,
.bp-articles .blog-post-readtime svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #94a3b8;
}

/* ── Pagination ───────────────────────────────────────────── */
.bp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 0 4px;
}

.bp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.bp-page-btn:hover,
.bp-page-btn:focus {
    border-color: #2563eb;
    color: #2563eb;
    text-decoration: none;
}

.bp-page-btn--active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.bp-page-btn--active:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.bp-page-btn--arrow { color: #64748b; }
.bp-page-btn--arrow svg { width: 15px; height: 15px; }
.bp-page-dots { color: #94a3b8; font-size: 13px; padding: 0 2px; line-height: 36px; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.bp-sidebar {
    flex: 0 0 260px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bp-sidebar-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    padding: 16px;
}

.bp-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

/* Popular topics list */
.bp-topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bp-topic-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
}

.bp-topic-item:last-child { border-bottom: none; }

.bp-topic-item:hover { color: #2563eb; text-decoration: none; }

.bp-topic-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.bp-topic-icon svg { width: 12px; height: 12px; }

.bp-topic-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.bp-topic-item:hover .bp-topic-name { color: #2563eb; }

.bp-topic-count {
    flex-shrink: 0;
    background: #dbeafe;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Sidebar newsletter */
.bp-sidebar-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 14px;
}

.bp-nl-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bp-nl-input {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 14px;
    font-size: 13px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.bp-nl-input:focus { border-color: #2563eb; }
.bp-nl-input::placeholder { color: #94a3b8; }

.bp-nl-btn {
    display: block;
    width: 100%;
    height: 42px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.bp-nl-btn:hover { background: #1d4ed8; transform: translateY(-1px); }
.bp-nl-btn:active { transform: translateY(0); }

.bp-nl-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin: 0;
}

/* ── NEWSLETTER BANNER ────────────────────────────────────── */
.bp-banner {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    padding: 32px 36px;
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 28px;
}

.bp-banner__text { flex: 1 1 0; min-width: 0; }

.bp-banner__title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}

.bp-banner__sub {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.bp-banner__form {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.bp-banner__input {
    width: 260px;
    height: 46px;
    padding: 0 16px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}

.bp-banner__input:focus { border-color: #2563eb; }
.bp-banner__input::placeholder { color: #94a3b8; }

.bp-banner__btn {
    height: 46px;
    padding: 0 24px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, transform 0.1s;
}

.bp-banner__btn:hover { background: #1d4ed8; transform: translateY(-1px); }
.bp-banner__btn:active { transform: translateY(0); }

/* ── STATS ROW ────────────────────────────────────────────── */
.bp-stats {
    display: flex;
    gap: 20px;
}

.bp-stat-item {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.bp-stat-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
}

.bp-stat-icon svg { width: 22px; height: 22px; }

.bp-stat-body { min-width: 0; }

.bp-stat-body strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}

.bp-stat-body span {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
    margin-top: 2px;
}

/* ── Card wrapper (grid cell; min-width prevents blowout) ─── */
.bp-card-wrap {
    min-width: 0;
}

/* ── Empty state ──────────────────────────────────────────── */
.bp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #94a3b8;
    text-align: center;
    gap: 14px;
}

.bp-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.bp-empty p {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

/* ── Disabled pagination arrow ────────────────────────────── */
.bp-page-btn--disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.bp-page-btn--disabled:hover {
    border-color: #e2e8f0;
    color: #64748b;
    background: transparent;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 1200px) {
    .bp-hero__media { flex: 0 0 300px; }
    .bp-sidebar { flex: 0 0 230px; }
}

@media (max-width: 960px) {
    .bp-hero {
        flex-direction: column-reverse;
        gap: 16px;
        padding-bottom: 24px;
    }
    .bp-hero__media {
        flex: none;
        width: 100%;
        max-width: 280px;
        align-self: center;
        justify-content: center;
    }
    .bp-title { font-size: 30px; }
    .bp-body { flex-direction: column; }
    .bp-sidebar {
        flex: none;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .bp-sidebar-card { flex: 1 1 260px; }
    .bp-card-grid { grid-template-columns: 1fr 1fr; }
    .bp-stats { flex-wrap: wrap; }
    .bp-stat-item { flex: 1 1 calc(50% - 10px); }
}

@media (max-width: 700px) {
    .bp-page { padding: 20px 0 40px; }
    .bp-card-grid { grid-template-columns: 1fr; }
    .bp-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 24px 20px;
    }
    .bp-banner__form { flex-direction: column; width: 100%; }
    .bp-banner__input { width: 100%; }
    .bp-banner__btn { width: 100%; }
    .bp-sidebar { flex-direction: column; }
    .bp-stats { flex-direction: column; gap: 12px; }
    .bp-stat-item { flex: none; }
}

@media (max-width: 500px) {
    .bp-filters { gap: 8px; }
    .bp-filter-btn { height: 32px; padding: 0 14px; font-size: 12px; }
    .bp-title { font-size: 26px; }
}
