/* =============================================
   EMC Clinic — Blog & Post Styles
   Dedicated stylesheet for blog.html and 
   single-post pages (post-*.html)
   ============================================= */

/* --- Blog Hero --- */
.blog-hero {
    text-align: center;
    padding: 4rem 0 2rem;
}

.blog-hero h1 {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.blog-hero p {
    color: #666;
    max-width: 600px;
    margin: 0 auto 2rem;
    font-weight: 300;
}

/* --- Category Filter Tabs --- */
.blog-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.filter-tab {
    padding: 0.6rem 1.5rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    background: transparent;
    color: #666;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* --- Blog Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    padding: 2rem 0;
}

.blog-card.hidden {
    display: none;
}

.blog-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.blog-image-placeholder {
    height: 220px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 500;
    letter-spacing: 1px;
}

.blog-card-image {
    height: 220px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.blog-content {
    padding: 2.5rem 2rem;
}

.blog-category {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--teal-btn);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 0.75rem;
}

.blog-meta .meta-dot {
    width: 3px;
    height: 3px;
    background: #ccc;
    border-radius: 50%;
}

.blog-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin: 0.5rem 0 1rem;
    color: #333;
    line-height: 1.2;
}

.blog-excerpt {
    color: #777;
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.blog-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 2px;
    transition: opacity 0.3s;
}

.blog-link:hover {
    opacity: 0.7;
}

/* --- Archives Section (blog.html bottom) --- */
.blog-archives-section {
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 1px solid #eee;
}

.blog-archives-section h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.archive-list {
    list-style: none;
    padding: 0;
    columns: 2;
    column-gap: 3rem;
}

.archive-list li {
    margin-bottom: 0.6rem;
}

.archive-list a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid transparent;
}

.archive-list a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.archive-count {
    font-size: 0.8rem;
    color: #aaa;
    background: #f5f5f5;
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
}

/* =============================================
   SINGLE POST PAGE — TWO-COLUMN LAYOUT
   ============================================= */

/* --- Breadcrumb --- */
.breadcrumb {
    padding: 1.5rem 0 0;
    font-size: 0.85rem;
    color: #999;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #ccc;
}

/* --- Container --- */
.single-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* --- Two-Column Grid --- */
.post-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 1rem;
}

/* --- LEFT SIDEBAR --- */
.post-sidebar {
    position: sticky;
    top: 180px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 2.5rem;
}

.sidebar-heading {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.15rem;
    font-weight: 400;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Sidebar Post Cards (vertical stack) */
.sidebar-post-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.sidebar-post-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.sidebar-post-image {
    height: 100px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.75rem;
}

.sidebar-post-content {
    padding: 0.8rem;
}

.sidebar-post-category {
    font-size: 0.65rem;
    color: var(--teal-btn);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
}

.sidebar-post-content h4 {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    color: #333;
    margin-top: 0.3rem;
    line-height: 1.3;
}

/* Sidebar Archive List */
.sidebar-archive-list {
    list-style: none;
    padding: 0;
}

.sidebar-archive-list li {
    margin-bottom: 0.4rem;
}

.sidebar-archive-list a {
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid transparent;
}

.sidebar-archive-list a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* --- RIGHT: Main Article Column --- */
.post-main {
    min-width: 0;
}

/* Post Header */
.post-header {
    text-align: left;
    padding: 2rem 0 3rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 3rem;
}

.post-category {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--teal-btn);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.post-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #333;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.post-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    color: #999;
    font-size: 0.9rem;
}

.post-meta .meta-dot {
    width: 4px;
    height: 4px;
    background: #ccc;
    border-radius: 50%;
}

/* Post Body */
.post-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #444;
}

.post-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin: 2.5rem 0 1rem;
    font-weight: 400;
}

.post-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #333;
    margin: 2rem 0 0.8rem;
    font-weight: 600;
}

.post-body p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #444;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.post-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
    color: #444;
}

.post-body blockquote {
    border-left: 3px solid var(--primary-color);
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: #f9fafa;
    color: #555;
    font-style: italic;
    border-radius: 0 4px 4px 0;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 2rem 0;
}

/* Social Share */
.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
    margin: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.post-share span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 50px;
    background: #fff;
    color: #555;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.share-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.share-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.share-btn.copied {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    margin: 3rem 0;
    background: #f7f9f8;
    border-radius: 8px;
    border: 1px solid #eee;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.author-info .author-title {
    font-size: 0.8rem;
    color: var(--teal-btn);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-info p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Prev / Next Navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.post-nav-link {
    flex: 1;
    text-decoration: none;
    padding: 1.2rem 1.5rem;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all 0.3s;
}

.post-nav-link:hover {
    border-color: var(--primary-color);
    background: #f7f9f8;
}

.post-nav-link .nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    display: block;
    margin-bottom: 0.4rem;
}

.post-nav-link .nav-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: #333;
    line-height: 1.3;
}

.post-nav-link.next {
    text-align: right;
}

/* Back to Blog */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 2rem;
    transition: opacity 0.3s;
}

.back-to-blog:hover {
    opacity: 0.7;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 960px) {

    /* Stack sidebar below article on tablets/mobile */
    .post-layout {
        grid-template-columns: 1fr;
    }

    .post-sidebar {
        position: static;
        max-height: none;
        order: 2;
        margin-top: 3rem;
        padding-top: 2rem;
        border-top: 1px solid #eee;
    }

    .post-main {
        order: 1;
    }

    .post-header {
        text-align: center;
    }

    .post-meta {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .single-post-container {
        padding: 0 1.5rem 3rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .post-meta .meta-dot {
        display: none;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .post-nav {
        flex-direction: column;
    }

    .post-nav-link.next {
        text-align: left;
    }

    .archive-list {
        columns: 1;
    }

    .post-share {
        flex-wrap: wrap;
    }

    .blog-filter-tabs {
        gap: 0.4rem;
    }

    .filter-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}