/* ═══════════════════════════════════════════════════════════════════════════
   User Blog Listing — /bai-viet
   Brand Magenta: #E91E8C  |  Brand Blue: #2196F3
   ═══════════════════════════════════════════════════════════════════════════ */

.blog-page {
    padding: 40px 0 60px;
    min-height: 60vh;
}
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.blog-header { text-align: center; margin-bottom: 28px; }
.blog-header__title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
}
.blog-header__title i { color: #E91E8C; margin-right: 10px; }
.blog-header__desc {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

/* ─── Filter Bar ──────────────────────────────────────────────────────── */
.blog-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.blog-filter-search {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    transition: border-color 0.2s;
}
.blog-filter-search:focus-within {
    border-color: #E91E8C;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.08);
}
.blog-filter-search i {
    color: #94a3b8;
    font-size: 0.85rem;
}
.blog-filter-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
}
.blog-filter-search input::placeholder { color: #94a3b8; }

.blog-filter-select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.2s;
}
.blog-filter-select:focus {
    border-color: #E91E8C;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.08);
}

.blog-filter-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, #E91E8C, #d6196f);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s;
    white-space: nowrap;
}
.blog-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(233, 30, 140, 0.3);
    filter: brightness(1.1);
}

/* ─── Posts Grid ───────────────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-filter-bar { flex-direction: column; }
    .blog-filter-search { min-width: 100%; }
    .blog-filter-select { width: 100%; }
    .blog-filter-btn { width: 100%; justify-content: center; }
}

/* Post Card */
.blog-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(233, 30, 140, 0.1);
    border-color: #f9a8d4;
}

.blog-card__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f1f5f9;
}
.blog-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.blog-card:hover .blog-card__thumb img { transform: scale(1.04); }

.blog-card__thumb-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #cbd5e1;
}

.blog-card__cat {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: rgba(233, 30, 140, 0.9);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.blog-card__body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }

.blog-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 14px;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: #94a3b8;
}
.blog-card__meta i { margin-right: 4px; color: #E91E8C; }

/* Empty */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.blog-empty i { font-size: 3rem; margin-bottom: 16px; display: block; color: #E91E8C; }
.blog-empty p { font-size: 1rem; margin: 0; }

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
}
.blog-page-link {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.blog-page-link:hover {
    background: #E91E8C;
    color: #fff;
    border-color: #E91E8C;
}
.blog-page-link--active {
    background: #E91E8C;
    color: #fff;
    border-color: #E91E8C;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK THEME OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Header */
[data-theme="dark"] .blog-header__title { color: #f1f5f9; }
[data-theme="dark"] .blog-header__desc  { color: #94a3b8; }

/* Filter bar */
[data-theme="dark"] .blog-filter-search {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .blog-filter-search:focus-within {
    border-color: #E91E8C;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
}
[data-theme="dark"] .blog-filter-search i { color: #64748b; }
[data-theme="dark"] .blog-filter-search input { color: #e2e8f0; }
[data-theme="dark"] .blog-filter-search input::placeholder { color: #64748b; }

[data-theme="dark"] .blog-filter-select {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}
[data-theme="dark"] .blog-filter-select:focus {
    border-color: #E91E8C;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.15);
}

/* Blog card */
[data-theme="dark"] .blog-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .blog-card:hover {
    border-color: rgba(233, 30, 140, 0.35);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .blog-card__thumb { background: #0f172a; }
[data-theme="dark"] .blog-card__thumb-empty { color: #475569; }
[data-theme="dark"] .blog-card__title { color: #f1f5f9; }
[data-theme="dark"] .blog-card__excerpt { color: #94a3b8; }
[data-theme="dark"] .blog-card__meta { color: #64748b; }

/* Empty state */
[data-theme="dark"] .blog-empty { color: #64748b; }

/* Pagination */
[data-theme="dark"] .blog-page-link {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}
[data-theme="dark"] .blog-page-link:hover {
    background: #E91E8C;
    color: #fff;
    border-color: #E91E8C;
}
[data-theme="dark"] .blog-page-link--active {
    background: #E91E8C;
    color: #fff;
    border-color: #E91E8C;
}
