/* =============================================
   GrowVibe Blog & Article Styles
   Matches main site: Outfit font, #1e3a8a smart-blue, #0ea5e9 accent
   ============================================= */

/* --- Blog Listing Page --- */
.blog-page { padding: 2rem 1rem; max-width: 1280px; margin: 0 auto; }

.blog-hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}
.blog-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}
.blog-hero p {
    color: #6b7280;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Category Pills */
.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0 1rem 2rem;
}
.blog-cat-pill {
    padding: 0.45rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    transition: all 0.25s;
    border: 1px solid transparent;
}
.blog-cat-pill:hover { background: #e2e8f0; color: #1e3a8a; }
.blog-cat-pill.active {
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
    color: #fff;
    border-color: transparent;
}

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

/* Blog Card */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(14,165,233,0.12);
}
.blog-card-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3/2;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.blog-card:hover .blog-card-image img { transform: scale(1.05); }
.blog-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(14,165,233,0.9);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.blog-card-body { padding: 1.25rem 1.5rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.6rem;
}
.blog-card-meta i { margin-right: 0.3rem; }
.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}
.blog-card-title a { color: #1e293b; text-decoration: none; transition: color 0.2s; }
.blog-card-title a:hover { color: #0ea5e9; }
.blog-card-excerpt {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0ea5e9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s;
}
.blog-card-link:hover { gap: 0.7rem; }

/* Empty State */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}
.blog-empty i { font-size: 3rem; margin-bottom: 1rem; color: #d1d5db; }
.blog-empty h2 { color: #374151; font-size: 1.5rem; margin-bottom: 0.5rem; }
.blog-empty .btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}
.blog-empty .btn:hover { transform: scale(1.04); }


/* =============================================
   Article Page
   ============================================= */
.article-page { padding: 1rem; max-width: 1280px; margin: 0 auto; }

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #9ca3af;
    padding: 1rem 0;
    flex-wrap: wrap;
}
.article-breadcrumb a { color: #6b7280; text-decoration: none; transition: color 0.2s; }
.article-breadcrumb a:hover { color: #0ea5e9; }
.article-breadcrumb i { font-size: 0.6rem; color: #d1d5db; }
.article-breadcrumb span { color: #374151; }

/* Layout: main + sidebar */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2.5rem;
    align-items: start;
}

/* Article Main */
.article-main { min-width: 0; }

.article-header { margin-bottom: 1.5rem; }
.article-cat-badge {
    display: inline-block;
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    margin-bottom: 0.75rem;
}
.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    font-size: 0.85rem;
    color: #9ca3af;
}
.article-meta-bar i { margin-right: 0.35rem; color: #cbd5e1; }

/* Featured Image */
.article-featured-img {
    margin: 0 0 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.article-featured-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Table of Contents (inline) */
.article-toc {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.toc-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.toc-header h2 i { color: #0ea5e9; font-size: 0.9rem; }
.toc-toggle { transition: transform 0.3s; color: #9ca3af; font-size: 0.8rem; }
.article-toc.collapsed .toc-toggle { transform: rotate(-90deg); }
.article-toc.collapsed .toc-list { display: none; }
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    counter-reset: toc;
}
.toc-item { margin-bottom: 0.35rem; }
.toc-item a {
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    line-height: 1.5;
    transition: color 0.2s;
    display: block;
    padding: 0.2rem 0;
}
.toc-item a:hover { color: #0ea5e9; }
.toc-level-3 { padding-left: 1.2rem; }

/* Article Body */
.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}
.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e2e8f0;
}
.article-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1.5rem 0 0.5rem;
}
.article-body p { margin-bottom: 1.2rem; }
.article-body a { color: #0ea5e9; text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: #1e3a8a; }
.article-body ul, .article-body ol { margin: 0.75rem 0 1.2rem 1.5rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.article-body blockquote {
    border-left: 4px solid #0ea5e9;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f0f9ff;
    border-radius: 0 8px 8px 0;
    color: #1e3a8a;
    font-style: italic;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.92rem;
}
.article-body th, .article-body td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}
.article-body th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e293b;
}
.article-body .product-cta {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    margin: 1rem 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.article-body .product-cta:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 20px rgba(245,158,11,0.35);
    color: #fff;
    text-decoration: none;
}

/* Inline Article Images */
.article-inline-img {
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    background: #f8fafc;
}
.article-inline-img img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 480px;
}
.article-inline-img figcaption {
    padding: 0.75rem 1.25rem;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-style: italic;
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.article-tags > i { color: #9ca3af; margin-right: 0.3rem; }
.article-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Social Share */
.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.article-share > span { font-size: 0.9rem; color: #6b7280; font-weight: 500; }
.share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.share-btn:hover { transform: scale(1.12); }
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-pin { background: #e60023; }
.share-wa { background: #25d366; }

/* Author Box */
.author-box {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
}
.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #0ea5e9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.author-info h3 { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 0.25rem; }
.author-info p { font-size: 0.85rem; color: #6b7280; line-height: 1.5; margin: 0; }

/* Related Articles */
.related-articles { margin-top: 3rem; }
.related-articles h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.25rem;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}
.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s;
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(14,165,233,0.1);
}
.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.related-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0.75rem 1rem 0.25rem;
    line-height: 1.4;
}
.related-meta {
    display: block;
    padding: 0 1rem 0.75rem;
    font-size: 0.78rem;
    color: #9ca3af;
}


/* =============================================
   Sidebar
   ============================================= */
.article-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Sidebar TOC */
.sidebar-toc {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}
.sidebar-toc h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-toc h3 i { color: #0ea5e9; }
.sidebar-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-toc li { margin-bottom: 0.25rem; }
.sidebar-toc a {
    font-size: 0.82rem;
    color: #6b7280;
    text-decoration: none;
    padding: 0.2rem 0;
    display: block;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    transition: all 0.2s;
}
.sidebar-toc a:hover, .sidebar-toc a.active {
    color: #0ea5e9;
    border-left-color: #0ea5e9;
}
.stoc-level-3 { padding-left: 1.5rem !important; }

/* Sidebar Products */
.sidebar-products {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}
.sidebar-products h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sidebar-products h3 i { color: #ef4444; }
.sidebar-product-card {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 0.5rem;
}
.sidebar-product-card:hover { background: #f8fafc; }
.sidebar-product-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
    flex-shrink: 0;
}
.sidebar-product-card h4 {
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ef4444;
    margin-top: 0.2rem;
    display: block;
}

/* Sidebar CTA */
.sidebar-cta {
    background: linear-gradient(135deg, #1e3a8a, #0c4a6e);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}
.sidebar-cta h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.sidebar-cta h3 i { color: #fbbf24; margin-right: 0.3rem; }
.sidebar-cta p { color: #cbd5e1; font-size: 0.85rem; line-height: 1.5; margin-bottom: 1rem; }
.btn-sidebar {
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.2s;
}
.btn-sidebar:hover { transform: scale(1.05); }


/* =============================================
   Responsive
   ============================================= */
@media (max-width: 960px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
        order: -1;
    }
    .sidebar-toc { display: none; }
    .article-title { font-size: 1.7rem; }
}

@media (max-width: 640px) {
    .blog-hero h1 { font-size: 1.7rem; }
    .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .article-title { font-size: 1.4rem; }
    .article-body { font-size: 0.95rem; }
    .article-meta-bar { gap: 0.6rem; font-size: 0.78rem; }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .author-box { flex-direction: column; text-align: center; }
}
