/* ===== Blog Specific Styles ===== */

/* Blog Header */
.blog-header {
    padding: 8rem 0 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--background) 0%, var(--background-light) 100%);
}

.blog-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Categories */
.blog-categories {
    padding: 2rem 0;
    background: var(--background-light);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 100;
}

.categories-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.categories-list::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 0.625rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

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

.category-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

/* Featured Post */
.featured-post {
    padding: 3rem 0;
    background: var(--background-light);
}

.featured-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.featured-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.1);
}

.featured-image {
    position: relative;
    min-height: 350px;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--background) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-placeholder {
    font-size: 6rem;
    opacity: 0.5;
}

.featured-content {
    padding: 2.5rem 2.5rem 2.5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-content h2 a {
    color: var(--text);
    transition: color 0.2s ease;
}

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

.featured-content > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-light);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

/* Post Meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.post-category {
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.75rem;
}

.post-date, .post-read-time {
    color: var(--text-muted);
}

/* Blog Posts Grid */
.blog-posts {
    padding: 4rem 0;
}

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

.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.post-image {
    height: 180px;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--background) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-placeholder {
    font-size: 4rem;
    opacity: 0.5;
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-content h3 a {
    color: var(--text);
    transition: color 0.2s ease;
}

.post-content h3 a:hover {
    color: var(--primary-light);
}

.post-content > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content .post-read-time {
    font-size: 0.8rem;
}

/* Load More */
.load-more {
    text-align: center;
    margin-top: 3rem;
}

/* Newsletter */
.newsletter {
    padding: 4rem 0;
    background: var(--background-light);
}

.newsletter-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 3rem;
}

.newsletter-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    color: var(--text-secondary);
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.newsletter-form input {
    padding: 0.875rem 1.25rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 1rem;
    width: 280px;
    transition: border-color 0.2s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

/* Blog CTA */
.blog-cta {
    padding: 4rem 0;
    text-align: center;
}

.blog-cta .cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.blog-cta h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.blog-cta p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Blog Post Page Styles */
.blog-post {
    padding: 8rem 0 4rem;
}

.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 3rem;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.back-to-blog:hover {
    color: var(--text);
}

.post-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
}

.post-date-author {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Post Content */
.post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.post-body h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}

.post-body h3 {
    font-size: 1.35rem;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.post-body p {
    margin-bottom: 1.5rem;
}

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

.post-body li {
    margin-bottom: 0.75rem;
    list-style-type: disc;
}

.post-body ol li {
    list-style-type: decimal;
}

.post-body strong {
    color: var(--text);
    font-weight: 600;
}

.post-body a {
    color: var(--primary-light);
}

.post-body a:hover {
    text-decoration: underline;
}

.post-body blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text);
}

.post-body code {
    background: var(--surface-light);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
}

.highlight-box h4 {
    color: var(--primary-light);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.highlight-box p {
    margin-bottom: 0;
    font-size: 1rem;
}

/* Table of Contents */
.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.toc ul {
    margin-bottom: 0;
    padding-left: 0;
}

.toc li {
    list-style: none;
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-tag {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.post-tag:hover {
    border-color: var(--primary);
    color: var(--text);
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.related-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.share-buttons span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: pointer;
}

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

.share-btn svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .featured-content {
        padding: 2rem;
    }
    
    .featured-image {
        min-height: 250px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-card {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }
    
    .newsletter-form input {
        width: 100%;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}
