/* ============================================================
   AA Rheumatology - Blog Stylesheet
   Shared by blog.html and all individual article pages
   ============================================================ */

/* ============================================================
   BLOG INDEX HERO
   ============================================================ */
.blog-index-hero {
    position: relative;
    background: var(--primary-color);
    padding: 160px 0 80px;
    overflow: hidden;
}

.blog-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 50%, rgba(197, 165, 90, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 80% at 10% 80%, rgba(143, 169, 139, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.blog-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 40px,
        rgba(255,255,255,0.015) 40px,
        rgba(255,255,255,0.015) 41px
    );
}

.blog-hero-content {
    position: relative;
    max-width: 720px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover { color: var(--accent-light); }

.breadcrumb i {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
}

.blog-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 52px);
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 18px;
    font-weight: 700;
}

.blog-hero-content p {
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    max-width: 580px;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.blog-filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
    position: sticky;
    top: 105px;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(45,74,62,0.06);
}

.filter-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-light);
    padding: 7px 18px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-sage-tint);
}

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

/* ============================================================
   BLOG LISTING MAIN
   ============================================================ */
.blog-listing {
    padding: 70px 0 80px;
    background: var(--bg-cream-light);
}

/* ---- Featured Article ---- */
.featured-article {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 60px;
    border: 1px solid rgba(221,213,200,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(45,74,62,0.14);
}

.featured-image {
    position: relative;
    overflow: hidden;
    min-height: 380px;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.featured-article:hover .featured-image img {
    transform: scale(1.04);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-color);
    color: white;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.featured-content {
    padding: 50px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    line-height: 1.3;
    color: var(--text-dark);
    margin: 14px 0 18px;
}

.featured-content h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.featured-content h2 a:hover { color: var(--primary-color); }

.featured-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 24px;
}

.article-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.article-meta-row span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta-row i {
    color: var(--accent-color);
}

.read-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
    align-self: flex-start;
}

.read-article-btn:hover {
    background: var(--secondary-color);
    gap: 12px;
}

/* ---- Article Tag Colours ---- */
.article-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.tag-joint    { background: #EEF2EC; color: #2D4A3E; }
.tag-autoimmune { background: #EDF1FB; color: #2B4A8A; }
.tag-treatment  { background: #FBF3ED; color: #8A4A2B; }
.tag-pain       { background: #FBF0ED; color: #8A2B2B; }
.tag-nutrition  { background: #F3FBEF; color: #2B6A2B; }
.tag-spine      { background: #F3EEF8; color: #5A2B8A; }

/* ---- Articles Grid ---- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(221,213,200,0.5);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-image-link {
    display: block;
    overflow: hidden;
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--primary-color);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.06);
}

.card-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.card-body h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.card-body h3 a:hover { color: var(--primary-color); }

.card-body p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
    flex: 1;
}

.card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-meta i { color: var(--accent-color); }

.card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: gap 0.2s, color 0.2s;
    align-self: flex-start;
}

.card-read-more:hover {
    gap: 10px;
    color: var(--primary-color);
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 40px;
    margin-bottom: 16px;
    display: block;
    color: var(--border-color);
}

/* ============================================================
   BLOG CTA BANNER
   ============================================================ */
.blog-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 70px 0;
}

.blog-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.blog-cta-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    color: var(--white);
    margin-bottom: 10px;
}

.blog-cta-text p {
    color: rgba(255,255,255,0.78);
    font-size: 16px;
    max-width: 560px;
}

/* ============================================================
   INDIVIDUAL ARTICLE PAGE — PAGE HERO
   ============================================================ */
.article-page-hero {
    background: var(--primary-color);
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
}

.article-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 80% 30%, rgba(197, 165, 90, 0.1) 0%, transparent 55%),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 50px,
            rgba(255,255,255,0.012) 50px,
            rgba(255,255,255,0.012) 51px
        );
    pointer-events: none;
}

.article-page-hero .breadcrumb {
    margin-bottom: 24px;
}

.article-page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 4vw, 44px);
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 28px;
    max-width: 800px;
    font-weight: 700;
}

.hero-author-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.hero-author-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    flex-shrink: 0;
}

.hero-author-info strong {
    display: block;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
}

.hero-author-info span {
    color: rgba(255,255,255,0.65);
    font-size: 13px;
}

.hero-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.hero-meta-bar span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-meta-bar i { color: var(--accent-color); }

/* ============================================================
   ARTICLE LAYOUT (individual pages)
   ============================================================ */
.article-page-body {
    background: var(--bg-cream-light);
    padding: 70px 0 80px;
}

.article-page-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: flex-start;
}

/* Article Content */
.article-content {
    background: var(--white);
    border-radius: 12px;
    padding: 50px 52px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(221,213,200,0.4);
}

.article-content .article-intro {
    font-size: 19px;
    line-height: 1.8;
    color: var(--text-dark);
    border-left: 4px solid var(--accent-color);
    padding-left: 22px;
    margin-bottom: 36px;
}

.article-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--primary-color);
    margin: 44px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-cream);
    line-height: 1.3;
}

.article-content h3 {
    font-size: 20px;
    color: var(--text-dark);
    margin: 28px 0 12px;
    font-weight: 600;
}

.article-content p {
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--text-light);
    margin-bottom: 18px;
}

.article-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.article-content ul li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 9px;
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.7;
}

.article-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 7px;
    height: 7px;
    background: var(--accent-color);
    border-radius: 50%;
}

/* Callout */
.article-callout {
    background: linear-gradient(135deg, rgba(45,74,62,0.04), rgba(197,165,90,0.07));
    border: 1px solid rgba(197,165,90,0.22);
    border-left: 5px solid var(--accent-color);
    border-radius: 10px;
    padding: 30px 32px;
    margin: 44px 0;
}

.article-callout h2 {
    font-size: 21px;
    color: var(--primary-color);
    margin: 0 0 12px;
    padding: 0;
    border: none;
}

.article-callout p {
    font-size: 15.5px;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.75;
}

.article-callout p:last-child { margin-bottom: 0; }
.article-callout strong { color: var(--primary-color); }

/* FAQ within article */
.article-faq {
    margin-top: 44px;
}

.article-faq-item {
    background: var(--bg-cream-light);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 12px;
    transition: border-left-color 0.2s;
}

.article-faq-item:hover {
    border-left-color: var(--accent-color);
}

.article-faq-item h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin: 0 0 8px;
    font-weight: 600;
    line-height: 1.4;
}

.article-faq-item p {
    font-size: 14.5px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.7;
}

/* Share + Tags row */
.article-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    background: var(--bg-sage-tint);
    color: var(--primary-color);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.tag-pill:hover { background: var(--sage-light); }

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-share span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-cream);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}

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

/* ============================================================
   SIDEBAR
   ============================================================ */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: sticky;
    top: 130px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(221,213,200,0.4);
}

.sidebar-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-cream);
}

/* Author card */
.sidebar-author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 16px;
    border: 3px solid var(--accent-color);
}

.sidebar-author-name {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.sidebar-author-title {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.sidebar-credentials {
    list-style: none;
    padding: 0;
    margin-bottom: 18px;
}

.sidebar-credentials li {
    font-size: 13px;
    color: var(--text-light);
    padding: 5px 0;
    border-bottom: 1px solid var(--bg-cream);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-credentials li i {
    color: var(--accent-color);
    width: 14px;
    flex-shrink: 0;
}

/* Related articles */
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--bg-cream);
}

.related-list li:last-child { border-bottom: none; }

.related-list a {
    font-size: 14px;
    color: var(--text-dark);
    text-decoration: none;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: color 0.2s;
}

.related-list a i {
    color: var(--accent-color);
    flex-shrink: 0;
    margin-top: 3px;
    font-size: 12px;
}

.related-list a:hover { color: var(--primary-color); }

/* Appointment card */
.sidebar-appt {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.sidebar-appt h4 {
    color: var(--white);
    border-bottom-color: rgba(255,255,255,0.15);
}

.sidebar-appt p {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin-bottom: 18px;
}

.sidebar-appt .btn-appt {
    display: block;
    background: var(--accent-color);
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s;
}

.sidebar-appt .btn-appt:hover { background: var(--accent-light); }

/* Table of contents */
.toc-list {
    list-style: none;
    padding: 0;
    counter-reset: toc;
}

.toc-list li {
    counter-increment: toc;
    padding: 7px 0;
    border-bottom: 1px solid var(--bg-cream);
}

.toc-list li:last-child { border-bottom: none; }

.toc-list a {
    font-size: 13.5px;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    gap: 10px;
    transition: color 0.2s;
    line-height: 1.4;
}

.toc-list a::before {
    content: counter(toc, decimal-leading-zero);
    color: var(--accent-color);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}

.toc-list a:hover { color: var(--primary-color); }

/* ============================================================
   RELATED ARTICLES SECTION (bottom of article page)
   ============================================================ */
.related-articles-section {
    background: var(--bg-cream);
    padding: 70px 0;
    border-top: 1px solid var(--border-color);
}

.related-articles-section .section-header {
    margin-bottom: 36px;
}

.related-articles-section .section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .article-page-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .featured-article {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 300px;
    }

    .featured-content {
        padding: 36px 36px;
    }

    .related-articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .article-content {
        padding: 32px 28px;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .blog-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .blog-cta-inner .btn {
        align-self: center;
    }

    .hero-meta-bar {
        gap: 12px;
    }
}

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

    .related-articles-grid {
        grid-template-columns: 1fr;
    }

    .article-content {
        padding: 24px 20px;
    }

    .article-page-hero {
        padding: 120px 0 50px;
    }

    .filter-wrap {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }

    .featured-content {
        padding: 28px 24px;
    }

    .article-footer-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .blog-filter-bar {
        top: 90px;
    }
}
