/* ═══════════════════════════════════════════════════════════
   BLOG LISTING — Premium Card Redesign
   ═══════════════════════════════════════════════════════════ */

:root {
    --bl-surface: #ffffff;
    --bl-surface-raised: #f8f9fb;
    --bl-border: #eef0f4;
    --bl-border-hover: #d1d5db;
    --bl-text: #1a1a2e;
    --bl-text-secondary: #64748b;
    --bl-text-muted: #94a3b8;
    --bl-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    --bl-shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.10);
    --bl-radius: 14px;
    --bl-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark {
    --bl-surface: #161b22;
    --bl-surface-raised: #1c2128;
    --bl-border: rgba(255, 255, 255, 0.06);
    --bl-border-hover: rgba(255, 255, 255, 0.14);
    --bl-text: #e6e8eb;
    --bl-text-secondary: #8b949e;
    --bl-text-muted: #6e7681;
    --bl-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    --bl-shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.4);
}

/* ── Blog Grid ── */
.blog-listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Blog Card ── */
.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--bl-radius);
    border: 1px solid var(--bl-border);
    background: var(--bl-surface);
    overflow: hidden;
    box-shadow: var(--bl-shadow);
    transition: all var(--bl-transition);
    text-decoration: none !important;
    color: inherit;
}

.blog-card:hover {
    box-shadow: var(--bl-shadow-hover);
    transform: translateY(-4px);
    border-color: var(--bl-border-hover);
    color: inherit;
    text-decoration: none !important;
}

/* Accent line on hover */
.blog-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--bl-border-hover);
    opacity: 0;
    transition: opacity var(--bl-transition);
    z-index: 2;
}

.blog-card:hover::after {
    opacity: 1;
}

/* ── Card Image ── */
.blog-card-img-wrap {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-card-img-wrap::before {
    display: none;
}

.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-img {
    transform: scale(1.04);
}

/* Subtle gradient at image bottom */
.blog-card-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.15));
    pointer-events: none;
}

/* ── Category Badge — over image ── */
.blog-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ── Card Body ── */
.blog-card-body {
    flex: 1;
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--bl-text) !important;
    margin: 0 0 8px !important;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.blog-card:hover .blog-card-title {
    color: var(--bl-text) !important;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--bl-border);
    font-size: 12px;
    font-weight: 600;
    color: var(--bl-text-muted);
}

.blog-card-meta i {
    font-size: 14px;
}

/* ── Staggered Entrance ── */
.blog-card {
    animation: bl-cardIn 0.45s ease both;
}

.blog-card:nth-child(1) { animation-delay: 0s; }
.blog-card:nth-child(2) { animation-delay: 0.06s; }
.blog-card:nth-child(3) { animation-delay: 0.1s; }
.blog-card:nth-child(4) { animation-delay: 0.14s; }
.blog-card:nth-child(5) { animation-delay: 0.18s; }
.blog-card:nth-child(6) { animation-delay: 0.22s; }
.blog-card:nth-child(n+7) { animation-delay: 0.26s; }

@keyframes bl-cardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
    .blog-listing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .blog-card-img-wrap {
        height: 190px;
    }
}

@media (max-width: 575px) {
    .blog-listing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .blog-card-img-wrap {
        height: 200px;
    }

    .blog-card-body {
        padding: 14px 16px 16px;
    }

    .blog-card-title {
        font-size: 15px;
    }
}
