/* ======================================================================
   BLOG — /blog & /blog/{slug}
   Prefix: .bl-
====================================================================== */

.bl-page {
    background: var(--bg-page, #f9fafb);
    min-height: calc(100vh - var(--header-height, 60px));
}

/* ─────────────── HERO ─────────────── */
.bl-hero {
    position: relative;
    padding: 60px 20px 50px;
    background:
        radial-gradient(circle at 30% 40%, rgba(168, 85, 247, 0.18) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #FFFFFF;
    overflow: hidden;
    text-align: center;
}

.bl-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.12) 1px, transparent 0);
    background-size: 28px 28px;
    opacity: 0.5;
}

.bl-hero-inner {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.bl-hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.bl-hero-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    color: #FFFFFF;
}

.bl-hero-subtitle {
    margin: 0;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

/* ─────────────── CONTAINER ─────────────── */
.bl-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 20px 60px;
}

/* ─────────────── FILTERS ─────────────── */
.bl-filters {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.bl-filter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted, #6b7280);
    flex-shrink: 0;
}

.bl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bl-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-page, #f3f4f6);
    color: var(--text, #374151);
    border: 1.5px solid transparent;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.bl-chip:hover {
    background: white;
    border-color: var(--border, #d1d5db);
}
.bl-chip.is-active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}
.bl-chip.is-active .bl-chip-count {
    background: rgba(255,255,255,0.25);
    color: white;
}

.bl-chip-count {
    background: white;
    color: var(--muted, #6b7280);
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ─────────────── FEATURED CARD ─────────────── */
.bl-featured {
    margin-bottom: 36px;
}

.bl-featured-card {
    display: grid;
    grid-template-columns: 1fr;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bl-featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.10);
}

@media (min-width: 820px) {
    .bl-featured-card {
        grid-template-columns: 1.3fr 1fr;
    }
}

.bl-featured-media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #a78bfa, #6366f1);
}
@media (min-width: 820px) {
    .bl-featured-media { aspect-ratio: auto; min-height: 360px; }
}
.bl-featured-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.bl-featured-card:hover .bl-featured-media img {
    transform: scale(1.04);
}

.bl-featured-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 64px;
    color: white;
    opacity: 0.6;
}

.bl-featured-body {
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}
@media (min-width: 820px) {
    .bl-featured-body { padding: 40px; }
}

.bl-featured-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bl-featured-title {
    font-size: clamp(24px, 2.5vw, 30px);
    font-weight: 700;
    color: var(--text, #111827);
    margin: 4px 0 6px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.bl-featured-excerpt {
    color: var(--muted, #4b5563);
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bl-featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--muted, #6b7280);
    font-size: 13px;
    margin-top: 4px;
}

.bl-featured-cta {
    display: inline-block;
    color: #6366f1;
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
}

/* ─────────────── GRID ─────────────── */
.bl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.bl-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border, #e5e7eb);
    transition: all 0.2s;
}
.bl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    border-color: #6366f1;
}

.bl-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bl-card-media {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #e0e7ff, #f5d0fe);
}
.bl-card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.bl-card:hover .bl-card-media img {
    transform: scale(1.05);
}

.bl-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    opacity: 0.5;
}

.bl-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bl-card-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
}

.bl-card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text, #111827);
    margin: 2px 0 4px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bl-card-excerpt {
    color: var(--muted, #6b7280);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bl-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--muted, #9ca3af);
    font-size: 12px;
    margin-top: auto;
}

.bl-meta-sep {
    color: var(--muted, #d1d5db);
}

.bl-meta-author {
    color: var(--text, #374151);
    font-weight: 500;
}

/* ─────────────── EMPTY ─────────────── */
.bl-empty {
    background: white;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 60px 24px;
    text-align: center;
}
.bl-empty-icon {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.7;
}
.bl-empty h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text, #111827);
    margin: 0 0 6px;
}
.bl-empty p {
    color: var(--muted, #6b7280);
    margin: 0 0 16px;
    font-size: 14px;
}
.bl-empty-action {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}
.bl-empty-action:hover { text-decoration: underline; }


/* ======================================================================
   DETAIL PAGE
====================================================================== */

.bl-detail {
    max-width: 800px;
    margin: 0 auto;
}

.bl-detail-back-row {
    padding: 22px 20px 0;
}
.bl-detail-back {
    color: var(--muted, #6b7280);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.bl-detail-back:hover { color: #6366f1; }

.bl-detail-hero {
    position: relative;
    margin: 20px 20px 0;
    border-radius: 16px;
    overflow: hidden;
    min-height: 320px;
    background: linear-gradient(135deg, #1e1b4b, #5b21b6);
    color: white;
    display: flex;
    align-items: flex-end;
    padding: 80px 36px 32px;
}

.bl-detail-hero.no-image {
    background: linear-gradient(135deg, #0f172a 0%, #312e81 50%, #6d28d9 100%);
}

.bl-detail-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}

.bl-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.85) 100%);
    z-index: 1;
}

.bl-detail-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 700px;
}

.bl-detail-cat {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.15s;
}
.bl-detail-cat:hover { background: rgba(255,255,255,0.25); }

.bl-detail-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #FFFFFF;
}

.bl-detail-excerpt {
    color: rgba(255,255,255,0.9);
    font-size: 17px;
    line-height: 1.5;
    margin: 0;
}

/* Meta bar */
.bl-detail-meta-bar {
    max-width: 700px;
    margin: 28px auto 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.bl-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bl-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.bl-author-info {
    line-height: 1.3;
}

.bl-author-name {
    display: block;
    font-size: 14px;
    color: var(--text, #111827);
}

.bl-author-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--muted, #6b7280);
    font-size: 12px;
}

/* Share */
.bl-share {
    display: flex;
    gap: 6px;
}

.bl-share-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border, #e5e7eb);
    background: white;
    color: var(--muted, #6b7280);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    text-decoration: none;
    padding: 0;
}
.bl-share-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #eef2ff;
}

/* Body */
.bl-detail-body {
    max-width: 700px;
    margin: 28px auto 0;
    padding: 0 20px;
}

.bl-prose {
    color: var(--text, #1f2937);
    font-size: 17px;
    line-height: 1.75;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.bl-prose > * + * { margin-top: 1em; }

.bl-prose h2 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text, #111827);
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.bl-prose h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 21px;
    font-weight: 600;
    color: var(--text, #111827);
    margin-top: 1.4em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.bl-prose p { margin: 0 0 1em; }

.bl-prose a {
    color: #6366f1;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.bl-prose a:hover { color: #4f46e5; }

.bl-prose blockquote {
    margin: 1.5em 0;
    padding: 14px 22px;
    border-left: 4px solid #6366f1;
    background: var(--bg-page, #f9fafb);
    color: var(--text, #4b5563);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}
.bl-prose blockquote p { margin: 0; }

.bl-prose ul, .bl-prose ol {
    padding-left: 1.4em;
    margin: 0 0 1em;
}
.bl-prose li { margin-bottom: 0.5em; }

.bl-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.4em 0;
}

.bl-prose code {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
    background: var(--bg-page, #f3f4f6);
    padding: 2px 6px;
    border-radius: 4px;
    color: #dc2626;
}

.bl-prose pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.5;
}
.bl-prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Related */
.bl-related {
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 40px 20px 0;
    border-top: 1px solid var(--border, #e5e7eb);
}

.bl-related-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text, #111827);
    margin: 0 0 24px;
    letter-spacing: -0.01em;
}

.bl-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.bl-card-sm .bl-card-media { aspect-ratio: 16/10; }
.bl-card-sm .bl-card-title { font-size: 15px; }
