﻿.blog-hero {
    padding: 90px 0;
    background: linear-gradient(135deg,#eef6ff,#ffffff);
}

.blog-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 25px;
}

.blog-subtitle {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 35px;
}

.blog-search {
    max-width: 700px;
}

    .blog-search input {
        height: 58px;
        border-radius: 14px 0 0 14px;
    }

    .blog-search button {
        border-radius: 0 14px 14px 0;
        padding: 0 30px;
    }

.blog-hero-card {
    background: #fff;
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,.08);
}

.blog-hero-item {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #edf2f7;
}

    .blog-hero-item:last-child {
        border: none;
    }

    .blog-hero-item strong {
        display: block;
    }

    .blog-hero-item small {
        color: #6c757d;
    }

@media(max-width:768px) {

    .blog-title {
        font-size: 2rem;
    }

    .blog-hero {
        padding: 60px 0;
    }

    .blog-hero-card {
        margin-top: 35px;
    }
}

/*=========================================
FEATURED POST (FIXED OVERLAP & GRID)
=========================================*/

.featured-post-section {
    padding-top: 30px;
}

.featured-post-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e3e9f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(20, 40, 70, 0.06);
}

.featured-post-image-column {
    min-height: 380px;
    background: #f1f5f9;
}

.featured-post-image-link {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 380px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #f1f5f9;
    text-decoration: none !important;
}

.featured-post-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.4s ease;
}

.featured-post-card:hover .featured-post-image {
    transform: scale(1.03);
}

.featured-post-content {
    height: 100%;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    position: relative;
    z-index: 2;
    background: #ffffff;
}

.featured-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 600;
    margin-bottom: 20px;
}

.featured-post-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #6b7788;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.featured-post-title-wrapper {
    margin: 0.5rem 0 1rem;
}

.featured-post-title {
    display: block;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    line-height: 1.3;
    font-weight: 700;
    color: #0d6efd;
    text-decoration: none;
}

    .featured-post-title:hover {
        color: #0b5ed7;
        text-decoration: underline;
    }

.featured-post-summary {
    margin-bottom: 1.5rem;
    color: #596678;
    font-size: 0.98rem;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-post-button {
    align-self: flex-start;
    margin-top: auto;
}

@media(max-width:991.98px) {
    .featured-post-image-column,
    .featured-post-image-link {
        min-height: 280px !important;
    }

    .featured-post-content {
        min-height: auto;
        padding: 1.75rem;
    }

    .featured-post-button {
        margin-top: 1rem;
    }
}

@media(max-width:767.98px) {
    .featured-post-image-column,
    .featured-post-image-link {
        min-height: 220px !important;
    }

    .featured-post-content {
        padding: 1.25rem;
    }

    .featured-post-title {
        font-size: 1.35rem;
    }

    .featured-post-summary {
        font-size: 0.9rem;
    }

    .featured-post-button {
        width: 100%;
        text-align: center;
    }
}

/*=========================================
BLOG GRID
=========================================*/

.blog-grid-section {
    padding-top: 40px;
    padding-bottom: 70px;
}

    .blog-grid-section .section-title {
        margin-bottom: 12px;
    }

    .blog-grid-section .section-subtitle {
        max-width: 720px;
        color: #6c757d;
        line-height: 1.8;
    }

    .blog-grid-section .article-card {
        height: 100%;
        transition: transform .3s ease, box-shadow .3s ease;
    }

        .blog-grid-section .article-card:hover {
            transform: translateY(-6px);
        }

/*=========================================
PAGINATION
=========================================*/

.pagination-section {
    padding-top: 10px;
}

.custom-pagination {
    gap: 10px;
    flex-wrap: wrap;
}

    .custom-pagination .page-link {
        border: none;
        border-radius: 14px;
        min-width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        color: #495057;
        box-shadow: 0 5px 15px rgba(0,0,0,.05);
        transition: .3s;
    }

        .custom-pagination .page-link:hover {
            background: #0d6efd;
            color: #fff;
        }

    .custom-pagination .active .page-link {
        background: #0d6efd;
        color: #fff;
    }

    .custom-pagination .disabled .page-link {
        opacity: .45;
        pointer-events: none;
    }

/*=========================================
POPULAR CATEGORIES
=========================================*/

.popular-category-section {
    background: #f8fbff;
    padding: 60px 0;
    border-top: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
}

.category-chip-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #fff;
    color: #172033;
    text-decoration: none;
    border: 1px solid #dbe4ef;
    font-size: 14px;
    font-weight: 500;
    transition: .2s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,.03);
}

    .category-chip:hover {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(13, 110, 253, .15);
        text-decoration: none;
    }

/*=========================================
NEWSLETTER CTA
=========================================*/

.newsletter-section {
    padding: 70px 0;
}

.newsletter-box {
    background: linear-gradient(135deg,#0d6efd,#084298);
    color: #fff;
    border-radius: 26px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(13,110,253,.25);
}

    .newsletter-box h2 {
        font-size: 2.3rem;
        font-weight: 700;
        margin-bottom: 20px;
    }

    .newsletter-box p {
        max-width: 760px;
        margin: auto;
        line-height: 1.9;
        opacity: .95;
    }

.newsletter-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 35px;
}

    .newsletter-actions .btn {
        border-radius: 50px;
        padding: 14px 28px;
        font-weight: 600;
    }

@media(max-width:768px) {

    .newsletter-box {
        padding: 40px 20px;
    }

        .newsletter-box h2 {
            font-size: 1.8rem;
        }

    .newsletter-actions {
        flex-direction: column;
    }

        .newsletter-actions .btn {
            width: 100%;
        }
}

/*=========================================
EDITOR PICKS
=========================================*/

.editors-section {
    background: #fff;
}

.editor-card {
    background: #fff;
    border-radius: 22px;
    padding: 35px;
    height: 100%;
    border: 1px solid #edf2f7;
    transition: .35s;
    position: relative;
}

    .editor-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 45px rgba(0,0,0,.08);
    }

.editor-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #eef5ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 25px;
}

.editor-card h4 {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

    .editor-card h4 a {
        text-decoration: none;
        color: #212529;
    }

        .editor-card h4 a:hover {
            color: #0d6efd;
        }

/* =========================================================
   ARTICLE CARD IMAGE FIX (LATEST & RECENT)
   ========================================================= */

.latest-article-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.latest-article-image-link {
    display: block !important;
    width: 100% !important;
    height: 220px !important;
    overflow: hidden !important;
    background: #f1f5f9;
    flex-shrink: 0;
}

.latest-article-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

.latest-article-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.25rem;
}

.latest-article-title {
    margin: 0.8rem 0;
    font-size: 1.15rem;
    line-height: 1.45;
}

    .latest-article-title a {
        text-decoration: none;
    }

        .latest-article-title a:hover {
            text-decoration: underline;
        }

.latest-article-summary {
    color: #687386;
    font-size: 0.95rem;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: #718096;
    font-size: 0.82rem;
}

.latest-article-body .read-more {
    margin-top: auto;
    padding-top: 0.5rem;
}

/* RECENT POSTS */

.recent-post-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    background: #ffffff;
}

    .recent-post-card .row {
        height: 100%;
    }

    .recent-post-card .col-4 {
        height: 100%;
        min-height: 170px;
    }

.recent-post-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 170px;
    object-fit: cover !important;
    object-position: center !important;
    background: #f1f5f9;
}

.recent-post-body {
    padding: 1.25rem;
}

    .recent-post-body h3 {
        margin: 0.65rem 0;
        font-size: 1.05rem;
        line-height: 1.45;
    }

        .recent-post-body h3 a {
            text-decoration: none;
        }

            .recent-post-body h3 a:hover {
                text-decoration: underline;
            }

@media (max-width: 767.98px) {
    .latest-article-image-link {
        height: 200px !important;
    }

    .recent-post-card .col-4,
    .recent-post-image {
        min-height: 140px;
    }
}
/* =========================================================
   OVERLAP FIX FOR FEATURED POST
   ========================================================= */

.featured-post-card {
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    border: 1px solid #e2e8f0 !important;
}

.featured-post-image-column {
    background: #f8fafc !important;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-post-image-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
}

.featured-post-image {
    width: 100% !important;
    height: 100% !important;
    max-height: 380px !important;
    object-fit: contain !important; /* इमेज पूरी दिखेगी, कटेगी नहीं */
    display: block !important;
}

.featured-post-content {
    padding: 2.5rem !important;
    background: #ffffff !important;
    position: relative !important;
    z-index: 10 !important; /* टेक्स्ट को इमेज के पीछे या ऊपर मिक्स होने से बचाएगा */
}

.featured-post-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #0d6efd !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

    .featured-post-title:hover {
        color: #0b5ed7 !important;
        text-decoration: underline !important;
    }

.featured-post-summary {
    color: #4b5563 !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-top: 10px !important;
    margin-bottom: 20px !important;
}

@media (max-width: 991px) {
    .featured-post-content {
        padding: 1.5rem !important;
    }

    .featured-post-image-column {
        min-height: 220px;
    }
}
/* =========================================================
   CRITICAL OVERLAP & GRID FIX (ISOLATED STYLES)
   ========================================================= */

/* 1. FEATURED POST CARD FIX */
.featured-post-card {
    display: block !important;
    position: relative !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07) !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 30px !important;
}

    .featured-post-card .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .featured-post-card .col-lg-5,
    .featured-post-card .col-lg-7 {
        position: relative !important;
        padding: 0 !important;
        float: none !important;
    }

@media (min-width: 992px) {
    .featured-post-card .col-lg-5 {
        flex: 0 0 45% !important;
        max-width: 45% !important;
    }

    .featured-post-card .col-lg-7 {
        flex: 0 0 55% !important;
        max-width: 55% !important;
    }
}

.featured-post-image-column {
    background: #f8fafc !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 350px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.featured-post-image-link {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    text-decoration: none !important;
}

.featured-post-image {
    width: 100% !important;
    height: 100% !important;
    max-height: 420px !important;
    object-fit: cover !important;
    display: block !important;
    position: static !important; /* Forces normal document flow */
    transform: none !important;
}

.featured-post-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 3rem 2.5rem !important;
    background: #ffffff !important;
    position: relative !important;
    z-index: 5 !important;
    width: 100% !important;
    height: 100% !important;
}

.featured-post-meta {
    position: static !important;
    margin-bottom: 0.75rem !important;
    color: #64748b !important;
}

.featured-post-title-wrapper {
    position: static !important;
    margin: 0 0 1rem 0 !important;
}

.featured-post-title {
    font-size: clamp(1.4rem, 2.2vw, 1.9rem) !important;
    font-weight: 700 !important;
    color: #0d6efd !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    display: block !important;
    position: static !important;
}

.featured-post-summary {
    position: static !important;
    color: #475569 !important;
    font-size: 0.98rem !important;
    line-height: 1.65 !important;
    margin-bottom: 1.75rem !important;
}

.featured-post-button {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: fit-content !important;
}

/* 2. BLOG GRID CARDS OVERFLOW & HEIGHT FIX */
.blog-grid-section .card,
.blog-grid-section .article-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
}

    .blog-grid-section .card-img-top,
    .blog-grid-section .article-card img {
        width: 100% !important;
        height: 210px !important;
        object-fit: cover !important;
        display: block !important;
    }

.blog-grid-section .card-body,
.blog-grid-section .article-card-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 1.25rem !important;
}

/* Responsive Rules for Mobile */
@media (max-width: 991px) {
    .featured-post-card .col-lg-5,
    .featured-post-card .col-lg-7 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .featured-post-image-column {
        min-height: 240px !important;
    }

    .featured-post-content {
        padding: 1.5rem !important;
    }
}
/* =========================================================
   OVERRIDE SITE.CSS GLOBAL CONFLICTS
   ========================================================= */

/* 1. Featured Post Overlap Fix */
.blog-page .featured-post-card {
    display: block !important;
    position: relative !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    margin-bottom: 35px !important;
}

    .blog-page .featured-post-card .row {
        display: flex !important;
        flex-wrap: wrap !important;
        margin: 0 !important;
        width: 100% !important;
    }

.blog-page .featured-post-image-column {
    flex: 0 0 42% !important;
    max-width: 42% !important;
    background: #f8fafc !important;
    min-height: 380px !important;
    position: relative !important;
}

    .blog-page .featured-post-image-column a {
        display: block !important;
        height: 100% !important;
        width: 100% !important;
    }

.blog-page .featured-post-image {
    width: 100% !important;
    height: 100% !important;
    max-height: 400px !important;
    object-fit: contain !important; /* पूरी इमेज साफ दिखेगी */
    display: block !important;
    position: static !important;
}

.blog-page .featured-post-content {
    flex: 0 0 58% !important;
    max-width: 58% !important;
    padding: 3rem 2.5rem !important;
    background: #ffffff !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}

    .blog-page .featured-post-content * {
        position: static !important;
    }

.blog-page .featured-post-title {
    font-size: clamp(1.4rem, 2vw, 1.85rem) !important;
    font-weight: 700 !important;
    color: #0d6efd !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    margin: 10px 0 !important;
    display: block !important;
}

/* 2. Blog Grid Cards Alignment Fix */
.blog-page .article-card,
.blog-page .card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
}

    .blog-page .article-card img,
    .blog-page .card-img-top {
        width: 100% !important;
        height: 210px !important;
        object-fit: cover !important;
        display: block !important;
    }

/* Responsive Fix for Mobile */
@media (max-width: 991px) {
    .blog-page .featured-post-image-column,
    .blog-page .featured-post-content {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .blog-page .featured-post-image-column {
        min-height: 240px !important;
    }

    .blog-page .featured-post-content {
        padding: 1.5rem !important;
    }
}
/* =========================================================
   FINAL BLOG IMAGE & CARD LAYOUT FIX
   Do not add another duplicate image fix below this block.
   ========================================================= */


/* =========================================================
   FEATURED ARTICLE
   ========================================================= */

.blog-page .featured-post-card {
    width: 100%;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07) !important;
}


    /* Bootstrap row */

    .blog-page .featured-post-card > .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        margin: 0 !important;
        align-items: stretch !important;
    }


        /* Image column */

        .blog-page .featured-post-card > .row > .featured-post-image-column {
            flex: 0 0 45% !important;
            max-width: 45% !important;
            min-height: 380px !important;
            height: 380px !important;
            padding: 0 !important;
            background: #f1f5f9 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            overflow: hidden !important;
        }


/* Image link */

.blog-page .featured-post-image-link {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
    text-decoration: none !important;
}


/* Actual featured image */

.blog-page .featured-post-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f1f5f9 !important;
    position: static !important;
    transform: none !important;
}


/* Content column */

.blog-page .featured-post-card > .row > .col-lg-7 {
    flex: 0 0 55% !important;
    max-width: 55% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
}


/* Content itself */

.blog-page .featured-post-content {
    width: 100% !important;
    height: auto !important;
    min-height: 380px !important;
    padding: 2.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: #ffffff !important;
    position: static !important;
}


/* Meta */

.blog-page .featured-post-meta {
    position: static !important;
    margin-bottom: 0.75rem !important;
    color: #64748b !important;
}


/* Title */

.blog-page .featured-post-title {
    display: block !important;
    margin: 0.5rem 0 1rem !important;
    font-size: clamp(1.45rem, 2.2vw, 2rem) !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
    color: #0d6efd !important;
    text-decoration: none !important;
    position: static !important;
}


/* Summary */

.blog-page .featured-post-summary {
    display: -webkit-box !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin: 0 0 1.5rem !important;
    color: #475569 !important;
    line-height: 1.7 !important;
    position: static !important;
}


/* Button */

.blog-page .featured-post-button {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;
    margin: 0 !important;
    position: static !important;
}


/* =========================================================
   BLOG GRID / LATEST ARTICLES
   ========================================================= */

.blog-page .blog-grid-section {
    width: 100%;
}


    /* Every article card */

    .blog-page .blog-grid-section .article-card,
    .blog-page .blog-grid-section .latest-article-card {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
    }


/* Image wrapper */

.blog-page .article-image-wrapper,
.blog-page .latest-article-image-link {
    display: block !important;
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    overflow: hidden !important;
    background: #f1f5f9 !important;
    flex-shrink: 0 !important;
}


    /* Latest / Blog images */

    .blog-page .article-image,
    .blog-page .latest-article-image,
    .blog-page .article-image-wrapper img,
    .blog-page .latest-article-image-link img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        object-position: center !important;
        background: #f1f5f9 !important;
        margin: 0 !important;
    }


/* Article body */

.blog-page .article-body,
.blog-page .article-card-body,
.blog-page .latest-article-body {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    padding: 1.25rem !important;
    min-width: 0 !important;
}

/* Pasted lesson HTML is rendered inside .article-content after document-level
   style blocks are removed. Keep its typography and lesson intro styling here. */
.article-page .article-content {
    color: #17324d;
    font-family: "Noto Sans Devanagari", "Nirmala UI", sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.article-page .article-content h1,
.article-page .article-content h2,
.article-page .article-content h3,
.article-page .article-content h4 {
    color: #123f70 !important;
    font-family: "Noto Sans Devanagari", "Nirmala UI", sans-serif;
    line-height: 1.4 !important;
    margin: 2rem 0 0.75rem !important;
}

.article-page .article-content h1 {
    font-size: clamp(2rem, 4vw, 2.7rem) !important;
    font-weight: 750;
}

.article-page .article-content h2 {
    border-bottom: 1px solid #cfe0ed;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem) !important;
    padding-bottom: 0.45rem !important;
}

.article-page .article-content h3 {
    font-size: 1.3rem !important;
}

.article-page .article-content p {
    line-height: 1.8 !important;
    margin: 0 0 1rem !important;
}

.article-page .article-content ul,
.article-page .article-content ol {
    margin: 0 0 1.25rem !important;
    padding-left: 1.5rem !important;
}

.article-page .article-content li {
    margin-bottom: 0.4rem;
    padding-left: 0.2rem;
}

.article-page .article-content blockquote {
    background: #f2f8fc;
    border-left: 4px solid #2e86c1;
    border-radius: 0 0.5rem 0.5rem 0;
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
}

.article-page .article-content table {
    border-collapse: collapse;
    display: block;
    margin: 1.25rem 0;
    max-width: 100%;
    overflow-x: auto;
    width: 100%;
}

.article-page .article-content th,
.article-page .article-content td {
    border: 1px solid #d7e1ea;
    padding: 0.65rem 0.8rem;
    text-align: left;
}

.article-page .article-content th {
    background: #f1f6fa;
}

/* Lesson HTML commonly groups its label, title, subtitle, and introduction in
   a first wrapper. Restore the tinted, padded hero treatment from standalone files. */
.article-page .article-content > div:first-child:has(> h1),
.article-page .article-content > div:first-child:has(> h2),
.article-page .article-content > section:first-child:has(> h1),
.article-page .article-content > section:first-child:has(> h2) {
    background: linear-gradient(120deg, #eef7fc 0%, #eff8f2 100%);
    border: 1px solid #d8e8df;
    border-radius: 1.25rem;
    margin: 0 0 2rem;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.article-page .article-content > div:first-child:has(> h1) h1,
.article-page .article-content > div:first-child:has(> h2) h1,
.article-page .article-content > section:first-child:has(> h1) h1,
.article-page .article-content > section:first-child:has(> h2) h1 {
    margin-top: 0 !important;
}

/* The sanitizer unwraps document-level <header> tags from pasted full pages.
   Rebuild the same hero panel when that leaves a category paragraph followed by a title. */
.article-page .article-content:has(> p:first-child + h1) > :nth-child(-n+5) {
    background: linear-gradient(120deg, #eef7fc 0%, #eff8f2 100%);
    margin: 0 !important;
    padding-left: clamp(1.5rem, 4vw, 3rem) !important;
    padding-right: clamp(1.5rem, 4vw, 3rem) !important;
}

.article-page .article-content:has(> p:first-child + h1) > p:first-child {
    border: 1px solid #d8e8df;
    border-bottom: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    color: #14804a;
    font-weight: 700;
    padding-top: clamp(1.5rem, 4vw, 3rem) !important;
}

.article-page .article-content:has(> p:first-child + h1) > h1 {
    border-left: 1px solid #d8e8df;
    border-right: 1px solid #d8e8df;
    margin: 0 !important;
    padding-top: 0.25rem !important;
}

.article-page .article-content:has(> p:first-child + h1) > p:nth-child(2) {
    border-left: 1px solid #d8e8df;
    border-right: 1px solid #d8e8df;
    color: #365b7d;
    font-size: 1.2rem;
}

.article-page .article-content:has(> p:first-child + h1) > :nth-child(5) {
    border: 1px solid #d8e8df;
    border-top: 0;
    border-radius: 0 0 1.25rem 1.25rem;
    margin-bottom: 2rem !important;
    padding-bottom: clamp(1.5rem, 4vw, 3rem) !important;
}

@media (max-width: 767.98px) {
    .article-page .article-content {
        font-size: 1rem;
    }

    .article-page .article-content > div:first-child:has(> h1),
    .article-page .article-content > div:first-child:has(> h2),
    .article-page .article-content > section:first-child:has(> h1),
    .article-page .article-content > section:first-child:has(> h2) {
        border-radius: 0.9rem;
        padding: 1.25rem;
    }

    .article-page .article-content:has(> p:first-child + h1) > p:first-child,
    .article-page .article-content:has(> p:first-child + h1) > :nth-child(5) {
        border-radius: 0.9rem 0.9rem 0 0;
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .article-page .article-content:has(> p:first-child + h1) > :nth-child(5) {
        border-radius: 0 0 0.9rem 0.9rem;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 991.98px) {

    .blog-page .featured-post-card > .row {
        flex-wrap: wrap !important;
    }

        .blog-page .featured-post-card > .row > .featured-post-image-column,
        .blog-page .featured-post-card > .row > .col-lg-7 {
            flex: 0 0 100% !important;
            max-width: 100% !important;
        }

        .blog-page .featured-post-card > .row > .featured-post-image-column {
            height: 300px !important;
            min-height: 300px !important;
        }

    .blog-page .featured-post-content {
        min-height: auto !important;
        padding: 1.75rem !important;
    }
}


@media (max-width: 767.98px) {

    .blog-page .featured-post-card > .row > .featured-post-image-column {
        height: 240px !important;
        min-height: 240px !important;
    }

    .blog-page .featured-post-content {
        padding: 1.25rem !important;
    }

    .blog-page .featured-post-title {
        font-size: 1.4rem !important;
    }

    .blog-page .article-image-wrapper,
    .blog-page .latest-article-image-link {
        height: 200px !important;
        min-height: 200px !important;
    }
}
/* =========================================================
   BLOG DETAILS
   RELATED ARTICLES
   ========================================================= */

.related-articles-section {
    background: #ffffff;
}

.related-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

    .related-section-heading .section-title {
        margin-bottom: 0;
    }

    .related-section-heading .section-subtitle {
        max-width: 520px;
    }


/* Related article card */

.related-article-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e3e9f0;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}


    .related-article-card:hover {
        transform: translateY(-4px);
        border-color: #cbd5e1;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
    }


/* Icon */

.related-article-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: #eff6ff;
    font-size: 1.25rem;
}


/* Title */

.related-article-title {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    line-height: 1.5;
    font-weight: 700;
}


    .related-article-title a {
        color: #0d6efd;
        text-decoration: none;
    }


        .related-article-title a:hover {
            text-decoration: underline;
        }


/* Read Article */

.related-article-link {
    margin-top: auto;
    color: #0d6efd;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}


    .related-article-link:hover {
        text-decoration: underline;
    }


/* =========================================================
   BLOG DETAILS SIDEBAR
   ========================================================= */

.blog-page .sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


/* Sidebar card */

.blog-page .sidebar-block {
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}


    /* Sidebar heading */

    .blog-page .sidebar-block h2 {
        margin: 0 0 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e9eef5;
        color: #0f172a;
        font-size: 1.15rem;
        line-height: 1.4;
        font-weight: 700;
    }


    /* Sidebar post links */

    .blog-page .sidebar-block p {
        margin: 0;
        padding: 0.7rem 0;
        border-bottom: 1px solid #f1f5f9;
        line-height: 1.5;
    }


        .blog-page .sidebar-block p:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }


        .blog-page .sidebar-block p:first-of-type {
            padding-top: 0;
        }


        .blog-page .sidebar-block p a {
            display: block;
            color: #0d6efd;
            font-size: 0.92rem;
            font-weight: 500;
            text-decoration: none;
            transition: color 0.15s ease;
        }


            .blog-page .sidebar-block p a:hover {
                color: #084298;
                text-decoration: underline;
            }


/* =========================================================
   CATEGORY SIDEBAR
   ========================================================= */

.blog-page .sidebar-category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}


.blog-page .sidebar-category-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}


    .blog-page .sidebar-category-chip:hover {
        background: #eff6ff;
        border-color: #93c5fd;
        color: #0d6efd;
    }


/* =========================================================
   DETAILS PAGE MAIN CONTENT
   ========================================================= */

.blog-page .article-detail {
    min-width: 0;
}


    .blog-page .article-detail h1 {
        margin-bottom: 1rem;
        font-size: clamp(1.8rem, 3vw, 2.7rem);
        line-height: 1.25;
        font-weight: 700;
    }


    .blog-page .article-detail .lead {
        margin-bottom: 1.5rem;
        color: #64748b;
        font-size: 1.05rem;
        line-height: 1.7;
    }


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 991.98px) {

    .related-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .blog-page .sidebar {
        margin-top: 1rem;
    }
}


@media (max-width: 767.98px) {

    .related-article-card {
        padding: 1.25rem;
    }

    .related-article-title {
        font-size: 1.05rem;
    }

    .blog-page .sidebar-block {
        padding: 1rem;
    }

        .blog-page .sidebar-block h2 {
            font-size: 1.05rem;
        }
}
/* =========================================================
   SIDEBAR POSTS - ANIMATED LINKS
   ========================================================= */

.blog-page .sidebar-block p {
    position: relative;
    margin: 0 0 0.55rem !important;
    padding: 0 !important;
    border: 0 !important;
}


    /* Individual link */

    .blog-page .sidebar-block p a {
        position: relative;
        display: flex !important;
        align-items: center;
        min-height: 42px;
        padding: 0.65rem 0.75rem 0.65rem 0.9rem !important;
        background: #f8fafc;
        border: 1px solid #e8eef5;
        border-radius: 10px;
        color: #0d6efd !important;
        font-size: 0.88rem !important;
        line-height: 1.45 !important;
        font-weight: 500;
        text-decoration: none !important;
        transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, padding-left 0.2s ease;
    }


        /* Small arrow */

        .blog-page .sidebar-block p a::after {
            content: "→";
            flex-shrink: 0;
            margin-left: auto;
            padding-left: 0.6rem;
            color: #0d6efd;
            font-size: 1rem;
            font-weight: 700;
            opacity: 0;
            transform: translateX(-6px);
            transition: opacity 0.2s ease, transform 0.2s ease;
        }


        /* Hover */

        .blog-page .sidebar-block p a:hover {
            background: #eff6ff;
            border-color: #bfdbfe;
            color: #084298 !important;
            transform: translateX(4px);
            box-shadow: 0 5px 14px rgba(13, 110, 253, 0.08);
            padding-left: 1.05rem !important;
        }


            .blog-page .sidebar-block p a:hover::after {
                opacity: 1;
                transform: translateX(0);
            }


/* =========================================================
   RELATED POSTS - SLIGHTLY DIFFERENT LOOK
   ========================================================= */

.blog-page .sidebar-block:first-child p a {
    background: #ffffff;
}


/* =========================================================
   RECENT POSTS
   ========================================================= */

.blog-page .sidebar-block:nth-child(2) p a {
    background: #f8fafc;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .blog-page .sidebar-block p a {
        min-height: 40px;
        padding: 0.6rem 0.7rem 0.6rem 0.8rem !important;
        font-size: 0.86rem !important;
    }

        .blog-page .sidebar-block p a:hover {
            transform: translateX(2px);
            padding-left: 0.9rem !important;
        }
}
