/* ==========================================================================
   Template 2 — Blog Detail Stylesheet
   Uses the exact color scheme of Template 2 (matching blogs.css):
   - Deep Navy: #03142a, #06234b, #0f294a
   - Vibrant Teal & Cyan Accents: #00d2d3, #0d9488
   - Blue Accents & Links: #1a4fa0, #0284c7
   - Soft Gold: #fbbf24
   - Card Background: #ffffff on #f0f4f9
   ========================================================================== */

:root {
    --navy-darkest: #03142a;
    --navy-dark:    #06234b;
    --navy-title:   #0f294a;
    --blue-accent:  #1a4fa0;
    --blue-link:    #0284c7;
    --teal-bright:  #00d2d3;
    --teal-primary: #0d9488;
    --gold-soft:    #fbbf24;
    --white:        #ffffff;
    --bg-page:      #f0f4f9;
    --card-bg:      #ffffff;
    --card-border:  #e2e8f0;
    --text-body:    #334155;
    --text-muted:   #64748b;
    --radius-card:  12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: clip;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   MAIN LAYOUT (Left Article + Right Sidebar)
   ========================================================================== */
.bld-main {
    padding: 36px 0 76px;
}

.bld-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 32px;
    align-items: start;
    margin-bottom: 50px;
}

/* ==========================================================================
   LEFT: MAIN ARTICLE
   ========================================================================== */
.bld-article-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 34px 38px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.bld-back-nav {
    margin-bottom: 22px;
}

.bld-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--blue-link);
    text-decoration: none;
    padding: 6px 16px;
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.22);
    border-radius: 999px;
    transition: all 0.2s ease;
}

.bld-back-link:hover {
    background: var(--blue-link);
    color: #ffffff;
    border-color: var(--blue-link);
    gap: 10px;
}

.bld-article-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy-title);
    line-height: 1.3;
    margin-bottom: 16px;
}

/* Simplified Metadata */
.bld-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 22px;
    padding: 12px 0 16px;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.bld-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.bld-meta-item i.fa-calendar-alt {
    color: #0ea5e9;
    font-size: 0.88rem;
}

.bld-meta-item i.fa-user {
    color: var(--teal-primary);
    font-size: 0.88rem;
}

.bld-meta-item i.fa-eye {
    color: var(--teal-bright);
    font-size: 0.88rem;
}

/* Featured Book Cover / Article Image */
.bld-featured-media {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 440px;
    overflow: hidden;
}

.bld-featured-media img {
    max-width: 100%;
    max-height: 410px;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Article Content Typography */
.bld-article-content {
    font-size: 1.04rem;
    line-height: 1.85;
    color: #334155;
    word-wrap: break-word;
}

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

.bld-article-content h1,
.bld-article-content h2,
.bld-article-content h3,
.bld-article-content h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--navy-title);
    margin-top: 30px;
    margin-bottom: 14px;
    line-height: 1.35;
}

.bld-article-content blockquote {
    border-left: 4px solid var(--teal-bright);
    background: rgba(0, 210, 211, 0.06);
    padding: 16px 22px;
    margin: 24px 0;
    font-style: italic;
    color: #334155;
    border-radius: 0 8px 8px 0;
}

.bld-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e2e8f0;
}

.bld-article-content a {
    color: var(--blue-link);
    font-weight: 600;
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.2s;
}

.bld-article-content a:hover {
    color: #0369a1;
}

.bld-article-content ul,
.bld-article-content ol {
    margin: 18px 0;
    padding-left: 28px;
}

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

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */
.bld-comments-section {
    margin-top: 48px;
    padding-top: 36px;
    border-top: 1px solid #eef2f6;
}

.bld-comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.bld-comments-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--navy-title);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bld-comments-title i {
    color: var(--teal-primary);
}

.bld-comments-badge {
    background: rgba(0, 210, 211, 0.15);
    color: #0f766e;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 999px;
}

/* Compact Comment Form */
.bld-comment-form-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 30px;
}

.bld-comment-form-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy-title);
    margin-bottom: 12px;
}

.bld-comment-textarea {
    width: 100%;
    min-height: 85px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-body);
    background: #ffffff;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 12px;
}

.bld-comment-textarea:focus {
    outline: none;
    border-color: var(--blue-link);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.bld-comment-submit-btn {
    background: var(--blue-link);
    color: #ffffff;
    border: none;
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.bld-comment-submit-btn:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

.bld-comment-login-box {
    background: #f0fdfa;
    border: 1px dashed rgba(13, 148, 136, 0.35);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 26px;
    font-size: 0.9rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bld-comment-login-box i {
    color: var(--teal-primary);
    font-size: 1.2rem;
}

.bld-comment-login-box a {
    color: var(--blue-link);
    font-weight: 600;
    text-decoration: underline;
}

/* Comments List */
.bld-comments-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bld-comment-item {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.bld-comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--blue-link) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    flex-shrink: 0;
}

.bld-comment-content {
    flex: 1;
    min-width: 0;
}

.bld-comment-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.bld-comment-author {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--navy-title);
}

.bld-comment-date {
    font-size: 0.78rem;
    color: #94a3b8;
}

.bld-comment-text {
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.55;
}

.bld-no-comments {
    text-align: center;
    padding: 30px 14px;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ==========================================================================
   RIGHT SIDEBAR: RECENT PUBLICATIONS
   ========================================================================== */
.bld-sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 24px 22px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    position: sticky;
    top: 90px;
}

.bld-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--teal-bright);
}

.bld-sidebar-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--navy-title);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bld-sidebar-title i {
    color: var(--blue-link);
    font-size: 1rem;
}

.bld-slider-nav {
    display: flex;
    gap: 6px;
    align-items: center;
}

.bld-nav-btn {
    background: rgba(2, 132, 199, 0.08);
    border: 1px solid rgba(2, 132, 199, 0.2);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-link);
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.bld-nav-btn:hover {
    background: var(--blue-link);
    color: #ffffff;
    border-color: var(--blue-link);
}

.bld-slider-viewport {
    height: 410px;
    overflow: hidden;
    position: relative;
    margin: 4px 0 0;
}

.bld-slider-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.bld-pub-slide {
    padding: 5px 0;
}

.bld-pub-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.22s ease;
}

.bld-pub-item:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.bld-pub-thumb {
    width: 62px;
    height: 62px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 4px;
}

.bld-pub-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bld-pub-thumb-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--blue-accent) 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
}

.bld-pub-info {
    flex: 1;
    min-width: 0;
}

.bld-pub-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy-title);
    line-height: 1.35;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.bld-pub-item:hover .bld-pub-title {
    color: var(--blue-link);
}

.bld-pub-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bld-pub-meta span i {
    color: var(--teal-primary);
    font-size: 0.75rem;
}

.bld-sidebar-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.bld-view-all-pubs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--blue-link);
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
}

.bld-view-all-pubs:hover {
    color: #0369a1;
    gap: 10px;
}

/* ==========================================================================
   BOTTOM: MORE BLOG POSTS (Balanced Row)
   ========================================================================== */
.bld-bottom-section {
    margin-top: 20px;
    padding-top: 40px;
    border-top: 1px solid #e2e8f0;
}

.bld-bottom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.bld-bottom-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--navy-title);
    position: relative;
    padding-bottom: 6px;
}

.bld-bottom-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 44px;
    height: 3px;
    background: var(--teal-bright);
    border-radius: 2px;
}

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

.bld-more-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    padding: 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.bld-more-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border-color: #cbd5e1;
}

.bld-more-thumb {
    width: 100%;
    height: 135px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
    margin-bottom: 12px;
}

.bld-more-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.bld-more-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bld-more-date i {
    color: #0ea5e9;
    font-size: 0.78rem;
}

.bld-more-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--navy-title);
    line-height: 1.35;
    margin-bottom: 12px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.bld-more-card:hover .bld-more-card-title {
    color: var(--blue-link);
}

.bld-more-read-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue-link);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    transition: gap 0.2s;
}

.bld-more-card:hover .bld-more-read-link {
    gap: 8px;
}

/* ==========================================================================
   RESPONSIVE (Mobile layout)
   ========================================================================== */
@media (max-width: 1100px) {
    .bld-layout-grid {
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 24px;
    }

    .bld-more-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .bld-layout-grid {
        grid-template-columns: 1fr;
    }

    .bld-sidebar-card {
        position: static;
        margin-top: 10px;
    }

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

@media (max-width: 600px) {
    .bld-main {
        padding: 24px 0 50px;
    }

    .bld-article-card {
        padding: 20px 16px;
    }

    .bld-article-title {
        font-size: 1.45rem;
    }

    .bld-meta-bar {
        gap: 12px;
        font-size: 0.8rem;
    }

    .bld-featured-media {
        max-height: 280px;
        padding: 8px;
        margin-bottom: 20px;
    }

    .bld-featured-media img {
        max-height: 260px;
    }

    .bld-article-content {
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .bld-comments-section {
        margin-top: 36px;
        padding-top: 24px;
    }

    .bld-comment-form-card {
        padding: 14px;
    }

    .bld-more-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .bld-more-card {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .bld-more-thumb {
        width: 76px;
        height: 76px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .bld-more-card-title {
        font-size: 0.88rem;
        margin-bottom: 6px;
    }
}