/* ============================================================
   Blog Stylesheet — Dr. Gaurav Kackar Homeopathic Specialist
   Used by: blog.html and all blog post pages
   ============================================================ */

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

:root {
    --primary-color: #4caf50;
    --primary-dark: #388e3c;
    --secondary-color: #2196f3;
    --text-dark: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg-light: #f9f9f9;
    --bg-green: #f1f8f1;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.12);
    --border-radius: 8px;
    --border-radius-lg: 14px;
    --transition: all 0.3s ease;
    --border: #e8e8e8;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Navigation ── */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.logo p {
    font-size: 0.82rem;
    color: var(--text-light);
}

.nav-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.45rem 0.9rem;
    border-radius: var(--border-radius);
    border: 1.5px solid var(--border);
    transition: var(--transition);
}

.nav-back-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.nav-back-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ── Blog Hero ── */
.blog-hero {
    background: linear-gradient(135deg, var(--bg-green) 0%, #e8f5e9 100%);
    padding: 3.5rem 20px 3rem;
    text-align: center;
    border-bottom: 1px solid #d4edda;
}

.blog-hero-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 0.75rem;
}

.blog-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.blog-hero p {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto 1.5rem;
}

.blog-hero-cta {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.blog-hero-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(76,175,80,0.3);
}

/* ── Category Filter Bar ── */
.blog-categories {
    padding: 1.5rem 20px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 65px;
    z-index: 100;
}

.blog-categories-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* ── Blog Grid ── */
.blog-main {
    padding: 3rem 20px 4rem;
}

.blog-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ── Blog Card ── */
.blog-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #b2dfb4;
}

.blog-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.blog-card-thumb-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.blog-card-body {
    padding: 1.25rem 1.4rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.blog-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary-dark);
    background: var(--bg-green);
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
}

.blog-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-card-read-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

.blog-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 0.6rem;
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    flex: 1;
}

.blog-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-color);
}

.blog-card:hover .blog-card-read-more {
    gap: 0.5rem;
}

/* ── Featured Card (first card, full-width) ── */
.blog-card.blog-card--featured {
    grid-column: 1 / -1;
    flex-direction: row;
}

.blog-card--featured .blog-card-thumb-placeholder {
    width: 360px;
    flex-shrink: 0;
    aspect-ratio: auto;
    min-height: 240px;
    font-size: 5rem;
}

.blog-card--featured .blog-card-body {
    padding: 2rem 2rem 2rem;
}

.blog-card--featured h2 {
    font-size: 1.5rem;
}

.blog-card--featured p {
    font-size: 0.95rem;
}

/* ── Coming Soon Cards ── */
.blog-card--coming-soon {
    opacity: 0.6;
    pointer-events: none;
}

.blog-card--coming-soon .blog-card-category {
    background: #f5f5f5;
    color: #999;
}

/* ── Book CTA Banner ── */
.blog-cta-banner {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
    margin: 2rem 0 0;
}

.blog-cta-banner h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.blog-cta-banner p {
    font-size: 1rem;
    opacity: 0.88;
    margin-bottom: 1.5rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.blog-cta-btn {
    display: inline-block;
    background: var(--white);
    color: #1b5e20;
    font-weight: 700;
    padding: 0.8rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.blog-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ── Footer ── */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.75);
    padding: 2rem 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: var(--white); }

/* ─────────────────────────────────────────
   BLOG POST PAGE STYLES
   ───────────────────────────────────────── */

/* Post hero */
.post-hero {
    background: linear-gradient(135deg, var(--bg-green), #e8f5e9);
    padding: 3rem 20px 2.5rem;
    border-bottom: 1px solid #d4edda;
}

.post-hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.post-breadcrumb {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.post-breadcrumb a {
    color: var(--primary-dark);
    text-decoration: none;
}

.post-breadcrumb a:hover { text-decoration: underline; }

.post-breadcrumb span { opacity: 0.5; }

.post-category-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--primary-dark);
    background: var(--bg-green);
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    border: 1px solid #b2dfb4;
}

.post-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-meta-author {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-dark);
    font-weight: 600;
}

.post-meta-author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.post-meta-sep { opacity: 0.35; }

/* Post layout */
.post-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 20px 4rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    align-items: start;
}

/* Post content */
.post-content {
    min-width: 0;
}

.post-featured-emoji {
    font-size: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16/7;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: var(--border-radius-lg);
    margin-bottom: 2rem;
}

.post-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}

.post-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1.5rem 0 0.5rem;
}

.post-content p {
    margin-bottom: 1.2rem;
    color: #444;
    line-height: 1.8;
    font-size: 1.02rem;
}

.post-content ul,
.post-content ol {
    margin: 0.75rem 0 1.2rem 1.4rem;
    color: #444;
    font-size: 1.02rem;
    line-height: 1.8;
}

.post-content li { margin-bottom: 0.4rem; }

.post-content strong { color: var(--text-dark); }

/* Callout box */
.post-callout {
    background: var(--bg-green);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-size: 0.97rem;
    color: #2e7d32;
}

.post-callout strong { color: #1b5e20; }

/* Key facts box */
.post-key-facts {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.post-key-facts-title {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.post-key-facts ul {
    margin: 0;
    list-style: none;
    padding: 0;
}

.post-key-facts li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.post-key-facts li:last-child { border-bottom: none; }

.post-key-facts li::before {
    content: "✓";
    color: var(--primary-color);
    font-weight: 700;
    flex-shrink: 0;
}

/* In-article CTA */
.post-inline-cta {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.75rem 1.75rem;
    margin: 2rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.post-inline-cta-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.3rem;
}

.post-inline-cta-text p {
    font-size: 0.9rem;
    opacity: 0.88;
    color: var(--white);
    margin: 0;
}

.post-inline-cta-btn {
    display: inline-block;
    background: var(--white);
    color: #1b5e20;
    font-weight: 700;
    padding: 0.65rem 1.6rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.92rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.post-inline-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* Post sidebar */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    position: sticky;
    top: 90px;
}

.sidebar-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Table of contents */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.toc-list a {
    display: block;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    transition: var(--transition);
}

.toc-list a:hover,
.toc-list a.active {
    background: var(--bg-green);
    color: var(--primary-dark);
    font-weight: 500;
}

/* Author card */
.author-card {
    text-align: center;
}

.author-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}

.author-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.author-bio {
    font-size: 0.83rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.author-consult-btn {
    display: block;
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
}

.author-consult-btn:hover {
    background: var(--primary-dark);
}

/* Post tags */
.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 2rem 0 1rem;
}

.post-tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.post-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-green);
}

/* Disclaimer */
.post-disclaimer {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    margin-top: 2.5rem;
    font-size: 0.83rem;
    color: #5d4037;
    line-height: 1.7;
}

.post-disclaimer strong { color: #4e342e; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-card--featured {
        flex-direction: column;
    }

    .blog-card--featured .blog-card-thumb-placeholder {
        width: 100%;
        min-height: auto;
        aspect-ratio: 16 / 9;
    }

    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        order: -1;
    }

    .sidebar-card {
        position: static;
    }
}

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

    .blog-hero {
        padding: 2.5rem 16px 2rem;
    }

    .post-hero {
        padding: 2rem 16px 2rem;
    }

    .post-layout {
        padding: 1.5rem 16px 3rem;
    }

    .post-inline-cta {
        flex-direction: column;
        text-align: center;
    }
}
