/* =========================================
   BLOG DETAIL PAGE — UPDATED STYLES
   ========================================= */

:root {
    --primary: #059EFF;
    --primary-dark: #0d6efd;
    --secondary: #DEF3FF;
    --text-dark: #1a1a1a;
    --text-body: #333333;
    --bg-page: #f4f7fb;
    --border-color: #E5E9F0;
    --radius-card: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
    --shadow-md: 0 6px 20px rgba(5,158,255,0.12);
}

* { box-sizing: border-box; }

.blog-detail-page {
    background-color: var(--bg-page);
    min-height: 100vh;
}

.section-padding {
    padding: 40px 0 60px;
}

/* ─── Main Layout: content + sidebar ────────── */
.bd-main-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 36px;
    align-items: start;
}

/* ─── Content Area ───────────────────────────── */
.bd-content-area {
    background: #ffffff;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* ─── Featured Image with title overlay ─────── */
.bd-featured-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.bd-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Gradient overlay at bottom of image */
.bd-featured-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 35%,
        rgba(0, 0, 0, 0.25) 60%,
        rgba(0, 0, 0, 0.72) 100%
    );
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

/* Title & meta overlaid on image bottom */
.bd-article-header {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 20px 26px 22px;
    pointer-events: none;
}

/* Wrap image + overlay header together */
.bd-featured-wrap {
    position: relative;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    overflow: hidden;
}

.bd-article-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.bd-article-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: rgba(255,255,255,0.88);
    font-weight: 500;
    pointer-events: all;
}

.bd-article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.bd-article-meta svg {
    width: 13px;
    height: 13px;
    opacity: 0.8;
}

.bd-article-meta .bd-meta-cat {
    color: #1a1a1a;
    font-weight: 700;
    background: #ffffff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bd-article-meta .bd-meta-cat::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-dark);
    display: inline-block;
    flex-shrink: 0;
}

/* ─── Article Body ───────────────────────────── */
.bd-article-body {
    padding: 28px 30px;
}

.bd-article-body h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 36px 0 14px;
    line-height: 1.3;
}

.bd-article-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 26px 0 12px;
}

.bd-article-body p {
    color: var(--text-body);
    font-size: 14.5px;
    line-height: 1.85;
    margin-bottom: 18px;
}

.bd-article-body strong,
.bd-article-body b {
    color: var(--text-dark);
    font-weight: 700;
}

.bd-article-body ul,
.bd-article-body ol {
    margin-bottom: 18px;
    padding-left: 22px;
    color: var(--text-body);
}

.bd-article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
    font-size: 14.5px;
}

.bd-article-body a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.bd-article-body a:hover {
    text-decoration: none;
}

/* ─── FAQ Section ────────────────────────────── */
.bd-faq-section {
    margin: 0 30px 28px;
    background: #f8fbff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 26px 28px;
}

.bd-faq-section h2 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 20px;
}

.bd-faq-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.bd-faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.bd-faq-item strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.bd-faq-answer {
    font-size: 14px;
    color: var(--text-body);
    line-height: 1.7;
}

/* ─── Right Sidebar ──────────────────────────── */
.bd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 24px;
}

/* ─── Related Blogs Widget ───────────────────── */
.bd-widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.bd-widget-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.bd-widget-title span {
    color: var(--primary-dark);
}

/* Related post cards */
.bd-related-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.bd-related-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    transition: opacity 0.2s;
}

.bd-related-item:hover {
    opacity: 0.8;
}

.bd-related-img {
    flex-shrink: 0;
    width: 72px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--secondary);
    border: 1px solid var(--border-color);
}

.bd-related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bd-related-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #deedfc, #c8e2f7);
}

.bd-related-info {
    flex: 1;
}

.bd-related-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bd-related-excerpt {
    font-size: 11.5px;
    color: #888;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Social Share Widget ────────────────────── */
.bd-share-widget {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.bd-share-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.bd-share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bd-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
    color: #fff;
    font-size: 16px;
}

.bd-share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.88;
}

.bd-share-btn.facebook  { background: #1877F2; }
.bd-share-btn.youtube   { background: #FF0000; }
.bd-share-btn.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

.bd-share-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ─── No-image fallback header ───────────────── */
.bd-article-header--plain {
    position: static;
    padding: 22px 26px 18px;
    border-bottom: 1px solid var(--border-color);
    pointer-events: all;
}

.bd-article-title--dark {
    color: var(--text-dark) !important;
    text-shadow: none !important;
}

.bd-article-meta--dark {
    color: #666 !important;
}

/* ─── No featured image fallback ────────────── */
.bd-no-image .bd-article-header {
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

/* ─── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
    .bd-main-layout {
        grid-template-columns: 1fr 250px;
        gap: 24px;
    }
}

@media (max-width: 900px) {
    .bd-main-layout {
        grid-template-columns: 1fr;
    }

    .bd-sidebar {
        position: static;
        order: 2;
    }

    .bd-related-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .bd-related-item {
        flex-direction: column;
    }

    .bd-related-img {
        width: 100%;
        height: 120px;
    }
}

@media (max-width: 580px) {
    .bd-article-header,
    .bd-article-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .bd-faq-section {
        margin-left: 18px;
        margin-right: 18px;
        padding: 18px;
    }

    .bd-article-title {
        font-size: 18px;
    }

    .bd-related-list {
        grid-template-columns: 1fr;
    }

    .bd-related-item {
        flex-direction: row;
    }

    .bd-related-img {
        width: 72px;
        height: 60px;
    }
}