/* ═══════════════════════════════════════════════════
   Blog Detail — Premium Article View
   ═══════════════════════════════════════════════════ */

/* ─────────────  LOADING  ───────────── */
.bd-loading {
    text-align: center;
    padding: 120px 0;
}

.bd-loading p {
    color: var(--text-muted);
    margin-top: 16px;
}

.bd-error {
    padding: 80px 0;
}

.bd-error-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--accent);
}

/* ─────────────  HERO  ───────────── */
.bd-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding: 60px 0 48px;
    overflow: hidden;
}

.bd-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    transform: scale(1.05);
}

.bd-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 14, 74, 0.92) 0%, rgba(var(--dark-rgb), 0.7) 40%, rgba(var(--primary-rgb), 0.3) 100%);
}

.bd-meta-top {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 18px;
    animation: bdFadeDown .6s ease both;
}

.bd-badge {
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
}

.bd-badge-type {
    background: rgba(var(--accent-rgb), 0.9);
    color: #fff;
}

.bd-badge-cat {
    background: rgba(var(--primary-rgb), 0.9);
    color: #fff;
}

.bd-title {
    color: #fff;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    animation: bdFadeDown .6s ease .1s both;
}

.bd-meta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    animation: bdFadeDown .6s ease .2s both;
}

.bd-meta-item {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.bd-meta-item i {
    margin-right: 4px;
    color: rgba(255, 255, 255, 0.5);
}

.bd-meta-sep {
    color: rgba(255, 255, 255, 0.3);
}

@keyframes bdFadeDown {
    from {
        opacity: 0;
        transform: translateY(-18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─────────────  BODY  ───────────── */
.bd-body {
    background: var(--bg);
    padding: 48px 0 60px;
}

/* ─────────────  SHARE BAR  ───────────── */
.bd-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    padding: 14px 20px;
    background: var(--surface);
    border-radius: 50px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.bd-share-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    margin-right: 4px;
}

.bd-share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
    font-size: 14px;
    padding: 0;
}

.bd-share-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.bd-share-copy:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* ─────────────  ARTICLE  ───────────── */
.bd-article {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px 44px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    font-size: 16px;
    line-height: 1.9;
    color: #444;
}

.bd-article h1,
.bd-article h2,
.bd-article h3,
.bd-article h4 {
    color: var(--dark);
    margin-top: 28px;
    margin-bottom: 14px;
}

.bd-article p {
    margin-bottom: 18px;
}

.bd-article img {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}

.bd-article blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    margin: 24px 0;
    background: var(--bg);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #555;
}

.bd-article ul,
.bd-article ol {
    padding-left: 24px;
    margin-bottom: 18px;
}

.bd-article li {
    margin-bottom: 8px;
}

.bd-article a {
    color: var(--primary);
    text-decoration: underline;
}

/* ─────────────  ARTICLE FOOTER  ───────────── */
.bd-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.bd-tag-row {
    display: flex;
    gap: 8px;
}

.bd-tag {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    background: var(--surface-alt);
    color: var(--primary);
    border: 1px solid var(--border);
}

.bd-back-btn {
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all .3s ease;
}

.bd-back-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

/* ─────────────  RELATED  ───────────── */
.bd-related-section {
    background: var(--surface);
    padding: 56px 0;
}

.bd-related-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 32px;
}

.bd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.bd-related-card {
    background: var(--bg);
    border-radius: 14px;
    overflow: hidden;
    transition: all .35s ease;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.bd-related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(var(--primary-rgb), 0.18);
    border-color: rgba(var(--primary-rgb), 0.15);
}

.bd-related-img {
    height: 160px;
    overflow: hidden;
}

.bd-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.bd-related-card:hover .bd-related-img img {
    transform: scale(1.08);
}

.bd-related-body {
    padding: 16px;
}

.bd-related-body h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.bd-related-body small {
    color: var(--text-faint);
    font-size: 12px;
}

/* ─────────────  RESPONSIVE  ───────────── */
@media (max-width: 991px) {
    .bd-hero {
        min-height: 320px;
    }

    .bd-title {
        font-size: 32px;
    }

    .bd-article {
        padding: 28px 24px;
    }

    .bd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .bd-hero {
        min-height: 280px;
        padding: 48px 0 36px;
    }

    .bd-title {
        font-size: 24px;
    }

    .bd-meta-bar {
        gap: 4px;
        font-size: 12px;
    }

    .bd-meta-sep {
        display: none;
    }

    .bd-meta-bar {
        flex-direction: column;
        gap: 6px;
    }

    .bd-article {
        padding: 24px 18px;
        font-size: 15px;
    }

    .bd-share-bar {
        flex-wrap: wrap;
        border-radius: 14px;
        gap: 8px;
    }

    .bd-related-grid {
        grid-template-columns: 1fr;
    }

    .bd-article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
