/* ==========================================================================
   ChatSalesBot Blog & Knowledge Hub Styles (blog.css)
   Inherits design tokens & variables from main styles.css
   ========================================================================== */

/* Blog Hub Layout */
.blog-hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 50% 0%, rgba(32, 141, 249, 0.08) 0%, transparent 60%);
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(32, 141, 249, 0.1);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-hero h1 {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: var(--text-main);
}

.blog-hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* Category Filter Tabs */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 3.5rem;
}

.cat-pill {
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: #ffffff;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.cat-pill:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.cat-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(32, 141, 249, 0.35);
}

/* Blog Cards Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.blog-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 35px -10px rgba(32, 141, 249, 0.15);
}

.blog-card-visual {
    height: 190px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.blog-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-dark);
}

.blog-card-cat {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

.blog-card-body h3 {
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    transition: color 0.2s ease;
}

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

.blog-card-body p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-dim);
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.blog-card-read-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-card-link-arrow {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.2s ease;
}

.blog-card:hover .blog-card-link-arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   Article Single Page Layout
   ========================================================================== */
.article-header {
    padding: 140px 0 40px;
    background: radial-gradient(circle at 50% 0%, rgba(32, 141, 249, 0.06) 0%, transparent 60%);
    border-bottom: 1px solid var(--border);
}

.article-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.article-breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-breadcrumbs a:hover {
    color: var(--primary);
}

.article-title {
    font-size: 2.65rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--text-main);
}

.article-author-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e0f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

/* Article 2-Column Body */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 3.5rem;
    align-items: start;
}

.article-main {
    font-size: 1.08rem;
    line-height: 1.8;
    color: #1e293b;
}

.article-main h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin: 2.5rem 0 1rem;
    color: var(--text-main);
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f5f9;
}

.article-main h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 2rem 0 0.8rem;
    color: var(--text-main);
}

.article-main p {
    margin-bottom: 1.4rem;
}

.article-main ul, .article-main ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-main li {
    margin-bottom: 0.5rem;
}

/* Callout Highlights */
.callout-box {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    border-radius: 0 16px 16px 0;
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
}

.callout-box.success {
    background: #f0fdf4;
    border-color: #10b981;
}

.callout-box.warning {
    background: #fffbeb;
    border-color: #f59e0b;
}

.callout-box h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Template Copy Box */
.template-box {
    background: #0f172a;
    color: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
}

.template-badge {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(255, 255, 255, 0.15);
    color: #38bdf8;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Sticky Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.toc-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.toc-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.toc-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: all 0.2s ease;
    display: block;
}

.toc-list a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.sidebar-cta-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 24px;
    padding: 2rem 1.75rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.15);
}

.sidebar-cta-card h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.sidebar-cta-card p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

/* FAQ in Articles */
.article-faq {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 2px solid #f1f5f9;
}

.faq-card-item {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.faq-card-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.faq-card-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-container {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-hero h1 {
        font-size: 2.15rem;
    }
    .article-title {
        font-size: 1.95rem;
    }
}
