/* ═══════════════════════════════════════════════════════════════
   blog-details.css  — mirrors project-details.css conventions
   ═══════════════════════════════════════════════════════════════ */

/* ── Loading / not-found states ─────────────────────────────── */
.bd-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.bd-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
    gap: 16px;
}

.bd-btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: #c0392b;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.bd-btn-primary:hover { background: #a93226; color: #fff; }

/* ── Body layout ─────────────────────────────────────────────── */
.bd-body {
    padding: 56px 0 64px;
    background: #f7f7f7;
}

.bd-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 991px) {
    .bd-grid { grid-template-columns: 1fr; }
}

/* ── Main column ─────────────────────────────────────────────── */
.bd-main {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

/* Hero image */
.bd-hero-img {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
}
.bd-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Meta bar */
.bd-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 32px 0;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 18px;
}
.bd-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}
.bd-meta-item i { font-size: 16px; color: #c0392b; }
.bd-cat-badge {
    background: #fdf0ee;
    color: #c0392b;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 600;
}

/* Lead paragraph */
.bd-lead {
    padding: 24px 32px 0;
    font-size: 18px;
    line-height: 1.7;
    color: #444;
    font-style: italic;
    border-left: 4px solid #c0392b;
    margin: 24px 32px 0;
    background: #fdf9f9;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
}

/* Content text blocks */
.bd-content-text {
    padding: 28px 32px 0;
}
.bd-content-text p { margin-bottom: 1.25rem; }
.bd-content-text blockquote {
    border-left: 4px solid #c0392b;
    margin: 24px 0;
    padding: 16px 20px;
    background: #fdf9f9;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}
.bd-content-text h2, .bd-content-text h3 {
    margin-top: 1.5rem;
    margin-bottom: .75rem;
    color: #1a1a1a;
}

/* Content images */
.bd-content-img {
    padding: 28px 32px 0;
}
.bd-content-img img {
    width: 100%;
    border-radius: 8px;
    display: block;
    object-fit: cover;
}

/* Video */
.bd-video-wrap {
    padding: 28px 32px 0;
}
.bd-video-wrap .ratio {
    border-radius: 10px;
    overflow: hidden;
}

/* Block divider */
.bd-block-divider {
    margin: 32px 32px 0;
    border-top: 1px dashed #e8e8e8;
}

/* Read more */
.bd-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 16px 32px 0;
    padding: 9px 20px;
    background: transparent;
    border: 2px solid #c0392b;
    color: #c0392b;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s;
}
.bd-readmore-btn:hover {
    background: #c0392b;
    color: #fff;
}

/* Extra gallery */
.bd-extra-images {
    padding: 32px 32px 0;
}
.bd-img-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.bd-img-grid-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}
.bd-img-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.bd-img-grid-item:hover img { transform: scale(1.06); }
.bd-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(192,57,43,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
    color: #fff;
    font-size: 22px;
}
.bd-img-grid-item:hover .bd-img-overlay { opacity: 1; }

/* Section label */
.bd-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #c0392b;
    margin-bottom: 6px;
}

/* Back link */
.bd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 32px 32px 32px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}
.bd-back-link:hover { color: #c0392b; }

/* ── Sidebar ──────────────────────────────────────────────────── */
.bd-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 100px;
}

.bd-sidebar-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}

.bd-sidebar-card-header {
    background: #1a1a1a;
    padding: 18px 24px;
}
.bd-sidebar-card-header h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.bd-sidebar-meta {
    padding: 8px 0;
}

.bd-sidebar-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 24px;
    border-bottom: 1px solid #f5f5f5;
}
.bd-sidebar-row:last-child { border-bottom: none; }

.bd-sidebar-key {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .8px;
    min-width: 90px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding-top: 2px;
}
.bd-sidebar-key i { color: #c0392b; }

.bd-sidebar-val {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    flex: 1;
}

.bd-cat-badge {
    background: #fdf0ee;
    color: #c0392b;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
}

/* CTA card */
.bd-sidebar-cta {
    background: #1a1a1a;
    color: #fff;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
}
.bd-sidebar-cta p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    opacity: .92;
}
.bd-sidebar-cta a {
    display: inline-block;
    padding: 10px 24px;
    background: #fff;
    color: #1a1a1a;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all .2s;
}
.bd-sidebar-cta a:hover {
    background: #444;
    color: #fff;
}

/* Sidebar related posts */
.bd-sidebar-related {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.bd-sidebar-related .bd-section-label { margin-bottom: 14px; }

.bd-related-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: background .15s;
    border-radius: 6px;
}
.bd-related-item:last-child { border-bottom: none; }
.bd-related-item:hover { background: #fdf9f9; }

.bd-related-thumb {
    width: 72px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.bd-related-info { flex: 1; min-width: 0; }

.bd-related-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bd-related-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Related full-width section ──────────────────────────────── */
.bd-related-full {
    background: #1a1a1a;
    padding-bottom: 60px;
}

.bd-related-heading {
    padding: 56px 0 32px;
    text-align: center;
}
.bd-related-heading h2 {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}
.bd-related-heading p {
    color: rgba(255,255,255,.6);
    font-size: 16px;
}

.bd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.bd-related-card {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}
.bd-related-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}
.bd-related-card:hover img { transform: scale(1.06); }

.bd-related-always {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.bd-related-card-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}
.bd-related-card-sub {
    color: rgba(255,255,255,.7);
    font-size: 12px;
    margin-top: 3px;
}

.bd-related-overlay {
    position: absolute;
    inset: 0;
    background: rgba(192,57,43,.88);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity .3s ease;
}
.bd-related-card:hover .bd-related-overlay { opacity: 1; }
.bd-related-card:hover .bd-related-always { opacity: 0; }

/* ── CTA Banner — identical to project-details ───────────────── */
.bd-cta-banner {
    background: #1a1a1a;
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid #2a2a2a;
}
.bd-cta-banner h2 {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}
.bd-cta-banner p {
    color: rgba(255,255,255,.65);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.bd-cta-btn {
    display: inline-block;
    padding: 14px 36px;
    background: #c0392b;
    color: #fff !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: background .2s, transform .2s;
}
.bd-cta-btn:hover {
    background: #a93226;
    transform: translateY(-2px);
}

/* ── Lightbox ────────────────────────────────────────────────── */
.bd-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bd-lightbox-inner {
    position: relative;
    max-width: 900px;
    width: 100%;
}
.bd-lightbox-inner img {
    width: 100%;
    border-radius: 8px;
    display: block;
}
.bd-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
