/* Blog Styles */

/* Fix logo spacing in blog pages */
.nav-brand a {
    gap: 12px !important;
    align-items: center;
}

.nav-brand .logo {
    flex-shrink: 0;
    margin-right: 0;
}

/* Active nav link */
.nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Blog Hero Section */
.blog-hero {
    margin-top: 80px;
    padding: 80px 0 60px;
    background: var(--background);
    text-align: center;
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.blog-hero-description {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Category Tags */
.blog-categories {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.category-tag {
    padding: 10px 20px;
    border: 1px solid rgba(232, 236, 241, 0.8);
    border-radius: 24px;
    background: var(--background-secondary);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-tag.active {
    background: linear-gradient(135deg, #667eea 0%, #f472b6 100%);
    color: white;
    border-color: transparent;
}

/* Featured Post */
.featured-post {
    padding: 60px 0;
    background: var(--background);
}

.featured-card {
    background: var(--background-secondary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
}

.featured-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #f472b6 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.post-category {
    color: #667eea;
    font-weight: 600;
}

.featured-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.featured-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-title a:hover {
    background: linear-gradient(135deg, #667eea 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.featured-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.author-info {
    flex: 1;
}

.author-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.author-role {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    gap: 12px;
    color: #f472b6;
}

/* Blog Grid */
.blog-grid-section {
    padding: 60px 0 100px;
    background: var(--background);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.blog-card {
    background: var(--background-secondary);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(232, 236, 241, 0.5);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 24px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 16px 0 12px;
    letter-spacing: -0.3px;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    background: linear-gradient(135deg, #667eea 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 15px;
    margin-bottom: 20px;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-mini img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.read-time {
    color: #667eea;
    font-weight: 500;
}

/* Load More */
.load-more-container {
    text-align: center;
}

/* Newsletter Section */
.newsletter-section {
    padding: 80px 0;
    background: var(--background);
}

.newsletter-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 60px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(244, 114, 182, 0.05) 100%);
    border-radius: 24px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.newsletter-title {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #f472b6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-description {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 18px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto 16px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid rgba(232, 236, 241, 0.8);
    border-radius: 12px;
    font-size: 15px;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.newsletter-note {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Article Page Styles */
.article-container {
    margin-top: 80px;
    background: var(--background);
}

.article-header {
    padding: 60px 0;
    background: var(--background);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 32px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #667eea;
}

.article-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.article-subtitle {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(232, 236, 241, 0.8);
    margin-bottom: 32px;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.article-stats {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.article-hero-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.article-hero-image img {
    width: 100%;
    height: auto;
}

/* Article Content */
.article-content {
    padding: 60px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Table of Contents */
.table-of-contents {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.table-of-contents h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 12px;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.table-of-contents a:hover {
    color: #667eea;
}

/* Article Body */
.article-body {
    max-width: 700px;
}

.article-body p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.article-body p.lead {
    font-size: 22px;
    line-height: 1.6;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.article-body h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 48px 0 24px;
    letter-spacing: -0.5px;
}

.article-body h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 32px 0 16px;
}

.article-body ul, .article-body ol {
    margin: 24px 0;
    padding-left: 32px;
}

.article-body li {
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.6;
}

.article-quote {
    margin: 40px 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(244, 114, 182, 0.05) 100%);
    border-left: 4px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #f472b6 100%) 1;
    font-size: 20px;
    font-style: italic;
    color: var(--text-primary);
}

.article-image {
    margin: 40px 0;
}

.article-image img {
    width: 100%;
    border-radius: 12px;
}

.article-image figcaption {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Code Block */
pre {
    background: #1a1a2e;
    color: #f0f0f0;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 32px 0;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

/* Article CTA */
.article-cta {
    margin: 60px 0;
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #f472b6 100%);
    border-radius: 20px;
    text-align: center;
    color: white;
}

.article-cta h3 {
    font-size: 28px;
    margin-bottom: 12px;
}

.article-cta p {
    font-size: 16px;
    margin-bottom: 24px;
    opacity: 0.95;
}

.article-cta .btn {
    background: white;
    color: #667eea;
}

/* Article Footer */
.article-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(232, 236, 241, 0.8);
}

.author-bio {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--background-secondary);
    border-radius: 16px;
    margin-bottom: 48px;
}

.author-bio img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.bio-content h3 {
    margin-bottom: 4px;
}

.bio-role {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 12px;
}

.bio-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.bio-links {
    display: flex;
    gap: 16px;
}

.bio-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

/* Share Section */
.share-section {
    margin-bottom: 60px;
}

.share-section h3 {
    margin-bottom: 16px;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    padding: 10px 20px;
    border: 1px solid rgba(232, 236, 241, 0.8);
    border-radius: 8px;
    background: var(--background-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn.linkedin:hover {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-btn.twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

/* Related Articles */
.related-articles h3 {
    margin-bottom: 24px;
    font-size: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.related-card {
    background: var(--background-secondary);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(232, 236, 241, 0.5);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-card h4 {
    padding: 16px 16px 8px;
    color: var(--text-primary);
    font-size: 18px;
}

.related-card p {
    padding: 0 16px 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .table-of-contents {
        display: none;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}