/* =========================================
   BLOG SYSTEM STYLES
   ========================================= */

/* Hero */
.blog-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0f172a 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    margin-top: var(--nav-height);
}

.blog-hero h1 {
    font-size: 3.5rem;
    margin: 10px 0;
    color: white;
}

.sub-tag {
    color: var(--secondary);
    font-family: 'Oswald', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Filter Bar */
.blog-filter-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: var(--nav-height);
    z-index: 90;
}

.filter-flex {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.search-box {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    padding: 10px 15px;
    border: none;
    outline: none;
    width: 250px;
    background: var(--bg-body);
    color: var(--text-main);
}

.search-btn {
    background: var(--secondary);
    border: none;
    padding: 0 15px;
    cursor: pointer;
    color: white;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}

.b-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.b-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.b-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

.b-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    line-height: 1.3;
}

.b-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.b-link {
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Single Post Layout */
.single-post-wrapper {
    margin-top: var(--nav-height);
}

.post-header-section {
    padding: 60px 0 40px;
    background: var(--bg-body);
    text-align: center;
}

.entry-title {
    font-size: 3rem;
    max-width: 900px;
    margin: 15px auto;
}

.meta-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.featured-img-box img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 40px;
}

.content-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 50px;
}

.post-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
}

.post-body h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    padding-bottom: 5px;
}

.post-body p {
    margin-bottom: 20px;
}

.post-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.post-body li {
    margin-bottom: 10px;
    list-style: disc;
}

.sticky-widget {
    position: sticky;
    top: 120px;
}

.toc-list li {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.toc-list a {
    color: var(--text-muted);
}

.toc-list a:hover {
    color: var(--secondary);
}

/* Mobile */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }


    /* Hide TOC on mobile for simplicity */
    .blog-hero h1,
    .entry-title {
        font-size: 2.2rem;
    }
}

/* =======================================================
   ONLY FOR SINGLE BLOG POST PAGE (MODERN DESIGN)
   ======================================================= */

/* --- 1. Page Background --- */
/* Single page ko thoda grey background dete hain taaki content ubhar ke aaye */
body:has(.single-post-wrapper) {
    background-color: #f8f9fa;
}

/* --- 2. Header Section (Title & Meta) --- */
.single-post-wrapper {
    margin-top: 80px;
    /* Nav height adjustment */
}

.post-header-section {
    background: #fff;
    padding: 60px 0 80px;
    /* Neeche jagah taaki photo overlap kare */
    text-align: center;
    border-bottom: 1px solid #eaeaea;
}

.breadcrumb {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}

.breadcrumb a {
    text-decoration: none;
    color: #999;
}

.entry-title {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    color: #002D62;
    /* Navy Blue */
    line-height: 1.2;
    max-width: 900px;
    margin: 10px auto 20px;
}

.meta-info {
    display: inline-flex;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* --- 3. Featured Image (Overlap Effect) --- */
.featured-img-box {
    margin-top: -50px;
    /* Header ke upar chadhayenge */
    position: relative;
    z-index: 2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    /* Soft shadow */
    background: #fff;
}

.featured-img-box img {
    width: 100%;
    max-height: 550px;
    object-fit: cover;
    display: block;
}

/* --- 4. Layout (Sidebar + Content) --- */
.content-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    /* Left Sidebar fixed, Right Content auto */
    gap: 50px;
    margin-top: 60px;
    margin-bottom: 100px;
}

/* --- 5. Sidebar Styling --- */
.sticky-widget {
    position: sticky;
    top: 100px;
    /* Scroll karte waqt chipka rahega */
    background: #fff;
    padding: 25px;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.sticky-widget h3 {
    font-size: 1.1rem;
    border-bottom: 2px solid #D32F2F;
    /* Red Line */
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: inline-block;
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    text-decoration: none;
    color: #555;
    font-size: 0.95rem;
    transition: 0.2s;
    display: block;
    border-left: 3px solid transparent;
    padding-left: 10px;
}

.toc-list a:hover {
    color: #D32F2F;
    border-left-color: #D32F2F;
    background: #fff5f5;
}

/* --- 6. Share Buttons (Round) --- */
.share-widget {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.share-icons {
    display: flex;
    gap: 10px;
}

.share-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Gol Button */
    color: white;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.2s;
}

.share-icons a:hover {
    transform: translateY(-3px);
}

#shareLinkedin {
    background: #0077b5;
}

#shareWhatsapp {
    background: #25D366;
}

#shareTwitter {
    background: #000000;
}

/* --- 7. Main Article Typography (Reading Experience) --- */
.post-body {
    background: #fff;
    padding: 40px;
    /* Card jaisa look */
    border-radius: 8px;
    border: 1px solid #eee;
    font-size: 1.15rem;
    /* Font thoda bada padhne ke liye */
    line-height: 1.8;
    /* Line mein gap */
    color: #333;
    font-family: 'Manrope', sans-serif;
}

.post-body h2 {
    font-size: 2rem;
    color: #002D62;
    margin: 40px 0 20px;
    font-family: 'Oswald', sans-serif;
}

.post-body p {
    margin-bottom: 25px;
}

.post-body ul,
.post-body ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.post-body li {
    margin-bottom: 10px;
}

.post-body blockquote {
    border-left: 5px solid #D32F2F;
    background: #fff5f5;
    margin: 30px 0;
    padding: 20px;
    font-style: italic;
    color: #555;
    font-size: 1.2rem;
}

.post-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 30px 0;
}

/* --- 8. Mobile Responsiveness --- */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
        /* Sidebar niche chala jayega */
        gap: 30px;
    }

    .post-sidebar {
        order: 2;
        /* Content upar, Sidebar niche */
    }

    .entry-title {
        font-size: 2.2rem;
    }

    .featured-img-box {
        margin-top: 0;
        /* Overlap hata do mobile par */
        border-radius: 0;
    }

    .post-body {
        padding: 20px;
        /* Padding kam karo mobile par */
        font-size: 1.05rem;
        border: none;
    }
}

/* =========================================
   SHARE ICONS & MOBILE FIX
   ========================================= */

/* 1. Icons Styling (Colorful Buttons) */
.share-icons {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.share-icons a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.share-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Brand Colors */
#shareLinkedin {
    background: #0077b5;
    /* Blue */
}

#shareLinkedin:hover {
    background: white;
    color: #0077b5;
    border-color: #0077b5;
}

#shareWhatsapp {
    background: #25D366;
    /* Green */
}

#shareWhatsapp:hover {
    background: white;
    color: #25D366;
    border-color: #25D366;
}

#shareTwitter {
    background: #000000;
    /* Black */
}

#shareTwitter:hover {
    background: white;
    color: #000000;
    border-color: #000000;
}

/* 2. MOBILE VISIBILITY FIX */
@media (max-width: 992px) {

    /* Mobile par Sidebar ko dikhana hai */
    .post-sidebar {
        display: block !important;
        order: 2;
        /* Content ke baad dikhega */
        margin-top: 40px;
        border-top: 1px solid #eee;
        padding-top: 30px;
    }

    .sticky-widget {
        position: static;
        /* Mobile par chipkega nahi */
        box-shadow: none;
        border: none;
        padding: 0;
    }

    /* Mobile par TOC ko thoda simple rakhein */
    .toc-list {
        background: #f9f9f9;
        padding: 15px;
        border-radius: 8px;
    }
}