/* =========================================================
   BLOG DETAIL PAGE
   Dedicated styles — intentionally isolated from style.css
   ========================================================= */


/* =========================================================
   PAGE CONTAINER
   ========================================================= */

.blog-detail-page {
    max-width: 1150px;
    padding: 32px 9px 60px;
    overflow: visible;
}


/* =========================================================
   BLOG HEADER
   ========================================================= */

.blog-art-header {
    margin-bottom: 20px;
}


.blog-category-tag {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}


.blog-category-tag a {
    color: var(--red);
    text-decoration: none;
}


.blog-category-tag a:hover {
    text-decoration: underline;
}


.blog-art-header h1 {
    margin: 0 0 14px;
    font-family: var(--serif);
    font-size: clamp(26px, 3.5vw, 38px);
    line-height: 1.25;
    color: var(--dark);
}


.blog-art-byline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
}


.blog-art-byline strong {
    color: var(--dark);
}


.blog-byline-separator {
    color: var(--muted);
}


/* =========================================================
   BLOG COVER
   ========================================================= */

.blog-art-cover {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    margin-bottom: 32px;
    object-fit: contain;
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.blog-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 32px;
    align-items: stretch;
    overflow: visible !important;
}


/* =========================================================
   CONTENT CARD
   ========================================================= */

.blog-content-card {
    min-width: 0;
    background: var(--white);
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(15, 35, 55, .055);
    overflow: hidden;
}


/* =========================================================
   ARTICLE BODY
   ========================================================= */

.blog-article-body {
    padding: 32px;
    font-size: 17px;
    line-height: 1.85;
    color: var(--dark);
}


.blog-article-body > *:first-child {
    margin-top: 0;
}


.blog-article-body > *:last-child {
    margin-bottom: 0;
}


.blog-article-body p {
    margin: 0 0 20px;
}


.blog-article-body h2,
.blog-article-body h3,
.blog-article-body h4 {
    margin: 30px 0 14px;
    color: var(--dark);
    line-height: 1.35;
}


.blog-article-body h2 {
    font-size: 27px;
}


.blog-article-body h3 {
    font-size: 23px;
}


.blog-article-body h4 {
    font-size: 19px;
}


.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 22px;
    padding-left: 24px;
}


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


.blog-article-body a {
    color: var(--red);
    text-decoration: underline;
    text-underline-offset: 2px;
}


.blog-article-body a:hover {
    text-decoration-thickness: 2px;
}


.blog-article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
}


.blog-article-body blockquote {
    margin: 26px 0;
    padding: 16px 20px;
    border-left: 4px solid var(--red);
    background: #f7f9fb;
    color: var(--mid);
}


.blog-article-body table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
}


.blog-article-body th,
.blog-article-body td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
}


.blog-article-body th {
    font-weight: 700;
    background: #f7f9fb;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.blog-summary-quote {
    margin: 0 0 26px !important;
    padding: 2px 0 2px 18px;
    border-left: 4px solid var(--red);
    color: var(--mid);
    font-size: 18px;
    line-height: 1.7;
    font-style: italic;
}


/* =========================================================
   SHARE BAR
   ========================================================= */

.blog-share-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 18px 32px;
    border-top: 1px solid #e4e9ef;
    background: #fbfcfd;
}


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


.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 13px;
    border: 1px solid #dfe5eb;
    border-radius: 6px;
    background: var(--white);
    color: var(--dark);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition:
            color .2s ease,
            background-color .2s ease,
            border-color .2s ease,
            transform .2s ease;
}


.blog-share-btn:hover {
    color: var(--red);
    border-color: var(--red);
    transform: translateY(-1px);
}


/* =========================================================
   SIDEBAR CARD
   ========================================================= */

.blog-sidebar-card {
    position: relative;
    align-self: stretch;
    height: auto;
    background: var(--white);
    border: 1px solid #e4e9ef;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(15, 35, 55, .055);
}


.blog-sidebar-sticky {
    position: sticky;
    top: 100px;
    height: max-content;
}


/* =========================================================
   SIDEBAR SECTIONS
   ========================================================= */

.blog-sidebar-section {
    padding: 24px;
}


.blog-sidebar-section + .blog-sidebar-section {
    border-top: 1px solid #e4e9ef;
}


.blog-sidebar-section h4 {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.3;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--dark);
}

/* =========================================================
   LATEST BLOG ITEMS
   ========================================================= */

.blog-sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0 0 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #edf0f3;
}


.blog-sidebar-item:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}


/* Blog thumbnail */

.blog-sidebar-image-link {
    display: block;
    width: 92px;
    min-width: 92px;
    height: 58px;
    overflow: hidden;
    border-radius: 5px;
}


.blog-sidebar-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}


.blog-sidebar-image-link:hover .blog-sidebar-image {
    transform: scale(1.05);
}


/* Blog title + date */

.blog-sidebar-item-content {
    min-width: 0;
    flex: 1;
}


.blog-sidebar-item h5 {
    margin: 0 0 6px;
    font-family: var(--serif);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}


.blog-sidebar-item h5 a {
    color: var(--dark);
    text-decoration: none;
    transition: color .2s ease;
}


.blog-sidebar-item h5 a:hover {
    color: var(--red);
}


.blog-sidebar-item small {
    display: block;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}

/* =========================================================
   TOPICS
   ========================================================= */

.blog-topic-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #edf0f3;
    color: var(--dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition:
            color .2s ease,
            padding-left .2s ease;
}


.blog-topic-link:last-child {
    border-bottom: 0;
}


.blog-topic-link:hover {
    padding-left: 4px;
    color: var(--red);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .blog-detail-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }


    .blog-sidebar-card {
        align-self: auto;
    }


    .blog-sidebar-sticky {
        position: static;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .blog-detail-page {
        padding: 24px 12px 45px;
    }


    .blog-art-header {
        margin-bottom: 16px;
    }


    .blog-art-header h1 {
        font-size: 27px;
        line-height: 1.28;
    }


    .blog-art-byline {
        font-size: 12px;
    }


    .blog-art-cover {
        margin-bottom: 22px;
    }


    .blog-article-body {
        padding: 22px 18px;
        font-size: 16px;
        line-height: 1.75;
    }


    .blog-article-body h2 {
        font-size: 23px;
    }


    .blog-article-body h3 {
        font-size: 20px;
    }


    .blog-article-body h4 {
        font-size: 18px;
    }


    .blog-summary-quote {
        padding-left: 14px;
        font-size: 16px;
    }


    .blog-share-bar {
        padding: 16px 18px;
    }


    .blog-sidebar-section {
        padding: 20px 18px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 400px) {

    .blog-detail-page {
        padding-left: 10px;
        padding-right: 10px;
    }


    .blog-art-header h1 {
        font-size: 24px;
    }


    .blog-article-body {
        padding: 20px 16px;
    }


    .blog-share-bar {
        align-items: flex-start;
        flex-direction: column;
    }


    .blog-share-btn {
        width: 100%;
    }

}