/* ============================================
   BLOG STYLES — SilTech Industries
   ============================================ */

/* Blog Hero */
.blog-hero {
    padding: 40px 0 60px;
    background: linear-gradient(180deg, rgba(0, 212, 170, 0.05) 0%, transparent 100%);
}

.blog-hero-content {
    max-width: 640px;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.blog-hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

/* Featured Grid */
.blog-featured {
    padding-top: 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.featured-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all var(--transition-normal);
}

.featured-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 212, 170, 0.1);
}

.featured-card-large {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.featured-card-large .featured-image img {
    height: 100%;
    min-height: 300px;
}

.featured-image {
    position: relative;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.featured-body {
    padding: 24px;
}

.featured-body h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.featured-body p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 48px;
    align-items: start;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.posts-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.post-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

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

.post-card-body h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-card-body p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.post-category {
    color: var(--accent-primary);
    font-weight: 500;
    text-decoration: none;
}

.meta-dot {
    opacity: 0.4;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.read-time {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.read-more {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent-primary);
}

/* Sidebar */
.blog-sidebar,
.article-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-widget h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 1px solid rgba(42, 42, 58, 0.5);
    transition: color var(--transition-fast);
}

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

.category-list li a:hover,
.category-list li a.active {
    color: var(--accent-primary);
}

.category-list .count {
    font-size: 0.8125rem;
    opacity: 0.5;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.15);
    border-radius: 20px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tag:hover,
.tag.active {
    background: rgba(0, 212, 170, 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.rss-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
}

.rss-link:hover {
    color: var(--accent-primary);
}

.sidebar-cta {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.08), rgba(14, 165, 233, 0.08));
    border-color: rgba(0, 212, 170, 0.2);
}

.sidebar-cta p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

/* No Posts */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.no-posts h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-posts p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 48px;
}

.page-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ============================================
   ARTICLE STYLES
   ============================================ */

/* Breadcrumb */
/* Blog breadcrumb now uses shared .breadcrumb-section from product.css */

/* Article Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 48px;
    align-items: start;
}

.article-header {
    margin-bottom: 32px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.article-header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.article-lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

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

.author-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.article-image {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Table of Contents */
.article-toc {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.article-toc summary {
    cursor: pointer;
    color: var(--text-primary);
}

.article-toc ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
}

.article-toc li {
    margin: 6px 0;
}

.article-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
}

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

/* Article Body — Typography */
.article-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body h2 {
    font-size: 1.625rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.article-body h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 10px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    border-left: 3px solid var(--accent-primary);
    margin: 24px 0;
    padding: 16px 24px;
    background: rgba(0, 212, 170, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 24px 0;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9375rem;
}

.article-body th,
.article-body td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.article-body th {
    background: var(--bg-card);
    font-weight: 600;
}

/* Code Blocks */
.article-body code {
    background: rgba(0, 212, 170, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: var(--accent-primary);
}

.article-body pre {
    background: #0d0d14;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: #e0e0e0;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Highlight.js / Pygments */
.highlight {
    background: #0d0d14;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.highlight pre {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Admonitions */
.admonition {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    border-left: 4px solid var(--border-color);
    background: var(--bg-card);
}

.admonition-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.admonition.warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.admonition.tip,
.admonition.note {
    border-left-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.05);
}

.admonition.danger {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* Related Products */
.article-products {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.article-products h3 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.products-row {
    display: flex;
    gap: 16px;
}

.product-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.product-link-card:hover {
    border-color: var(--accent-primary);
}

.product-link-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* Share */
.article-share {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 16px 0;
    font-size: 0.9375rem;
}

.article-share span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.article-share a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8125rem;
    transition: all var(--transition-fast);
}

.article-share a:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Recent List */
.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-list li a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(42, 42, 58, 0.5);
}

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

.recent-title {
    display: block;
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 4px;
}

.recent-list li a:hover .recent-title {
    color: var(--accent-primary);
}

.recent-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* More Posts */
.blog-more {
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text-primary);
}

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

@media (max-width: 1024px) {
    .blog-layout,
    .article-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .blog-sidebar,
    .article-sidebar {
        position: static;
    }

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

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

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

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

    .featured-card-large .featured-image img {
        min-height: 200px;
    }

    .posts-grid,
    .posts-grid-3 {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.625rem;
    }

    .article-body {
        font-size: 1rem;
    }

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

    .products-row {
        flex-wrap: wrap;
    }
}
