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

/* Blog Hero */
.blog-hero {
    position: relative;
    padding: 150px 0 80px;
    overflow: hidden;
    background: var(--bg-primary);
}

.blog-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #a855f7, #d946ef, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Blog Categories Filter */
.blog-categories-section {
    background: var(--bg-secondary);
    padding: 2rem 0;
    border-top: 1px solid rgba(168, 85, 247, 0.1);
    border-bottom: 1px solid rgba(168, 85, 247, 0.1);
    position: sticky;
    top: 80px;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.categories-filter {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

/* Featured Post */
.featured-post-section {
    background: var(--bg-primary);
    padding-top: 4rem;
}

.featured-post {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(40, 40, 40, 0.6));
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    transition: all 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 60px rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.5);
}

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

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-post:hover .featured-post-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: linear-gradient(135deg, #a855f7, #d946ef);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

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

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-category {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-date,
.post-read-time {
    color: var(--text-light);
    font-size: 0.875rem;
}

.featured-post-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.featured-post-title a {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.featured-post-title a:hover {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
    font-size: 1.0625rem;
}

/* Blog Grid */
.blog-posts-section {
    background: var(--bg-secondary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: rgba(26, 26, 26, 0.8);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(168, 85, 247, 0.4);
    border-color: rgba(168, 85, 247, 0.5);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    height: 240px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.blog-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 1.375rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.blog-card-title a {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--primary-color);
}

.blog-card-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.read-more-link:hover {
    gap: 1rem;
    color: var(--primary-light);
}

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

.load-more-btn {
    min-width: 250px;
}

/* Newsletter Section */
.newsletter-section {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1));
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.newsletter-box {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(40, 40, 40, 0.6));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #a855f7, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2);
}

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

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #a855f7, #d946ef);
    border-radius: 2px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    justify-content: center;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.breadcrumb-item::after {
    content: '→';
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb-item:last-child::after {
    content: '';
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* Blog Post Page Styles */
.blog-post-header,
.post-header {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    background: var(--bg-primary);
    overflow: visible;
}

.post-header .container,
.blog-post-header .container {
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Article Wrapper - ensure no clipping */
article.blog-post,
.blog-post {
    overflow: visible;
    background: var(--bg-primary);
}

.blog-post-title,
.post-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-primary);
    padding-top: 0.1em;
    overflow: visible;
}

.blog-post-meta {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

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

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.author-info {
    text-align: left;
}

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

.author-role {
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* Article Wrapper - handled above */

/* Lead Paragraph */
.lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 2rem auto 0;
    text-align: left;
}

.lead a {
    color: var(--primary-color);
    text-decoration: underline;
}

.lead strong {
    color: var(--primary-color);
}

/* Post Content Wrapper */
.blog-post-content,
.post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.post-content .container {
    max-width: 800px;
}

/* Featured Image in Article */
.featured-image {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.info-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.info-box ul,
.info-box ol {
    margin: 0;
    padding-left: 1.5rem;
}

.info-box p {
    margin-bottom: 0.5rem;
}

.info-box code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary-light);
}

/* Warning Box */
.warning-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(249, 115, 22, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.warning-box h4 {
    color: #ef4444;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.warning-box p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.warning-box ul,
.warning-box ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(236, 72, 153, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.cta-box h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

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

.cta-box a.btn {
    display: inline-block;
}

.cta-box strong {
    color: var(--primary-color);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.comparison-table th {
    background: rgba(168, 85, 247, 0.2);
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-table td {
    color: var(--text-secondary);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: rgba(168, 85, 247, 0.05);
}

/* FAQ Section in Articles */
.faq-section {
    margin: 2rem 0;
}

.faq-item {
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.faq-item h3 {
    color: var(--text-primary);
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Related Posts */
.related-posts {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 3rem 0 2rem;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.related-posts h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.related-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-posts li {
    margin-bottom: 0.75rem;
}

.related-posts a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-posts a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(168, 85, 247, 0.1);
}

.author-bio .author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
}

.author-bio .author-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.author-bio .author-info p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* Social Share */
.social-share {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.social-share span {
    color: var(--text-secondary);
    font-weight: 600;
}

.social-share a {
    padding: 0.5rem 1rem;
    background: rgba(168, 85, 247, 0.2);
    color: var(--primary-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-share a:hover {
    background: var(--primary-color);
    color: white;
}

.blog-post-featured-image {
    width: 100%;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.blog-post-content h2,
.post-content h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.blog-post-content h3,
.post-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.blog-post-content h4,
.post-content h4 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.blog-post-content p,
.post-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.blog-post-content ul,
.blog-post-content ol,
.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.blog-post-content li,
.post-content li {
    margin-bottom: 0.75rem;
}

.blog-post-content a,
.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

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

.blog-post-content blockquote,
.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    background: rgba(168, 85, 247, 0.1);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.blog-post-content code,
.post-content code {
    background: rgba(168, 85, 247, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary-light);
    font-size: 0.9em;
}

.blog-post-content pre,
.post-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.blog-post-content pre code,
.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-secondary);
}

.blog-post-content strong,
.post-content strong {
    color: var(--text-primary);
}

/* Social Share Buttons */
.blog-post-share {
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    text-align: center;
}

.blog-post-share h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.linkedin {
    background: #0077B5;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

/* Related Posts */
.related-posts-section {
    background: var(--bg-secondary);
    padding: 4rem 0;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .featured-post {
        grid-template-columns: 1fr;
    }
    
    .featured-post-image {
        height: 400px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1rem;
    }
    
    .categories-filter {
        gap: 0.5rem;
    }
    
    .category-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .featured-post-content {
        padding: 2rem;
    }
    
    .featured-post-title {
        font-size: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-box {
        padding: 2rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.875rem;
    }
    
    .blog-post-title,
    .post-title {
        font-size: 2rem;
    }
    
    .blog-post-content,
    .post-content {
        padding: 2rem 1rem;
    }
    
    .blog-post-content p,
    .post-content p {
        font-size: 1rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .blog-hero,
    .post-header {
        padding: 120px 0 60px;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .featured-post-image {
        height: 250px;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .info-box,
    .warning-box,
    .cta-box {
        padding: 1rem;
    }
    
    .social-share {
        flex-direction: column;
        text-align: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card,
.featured-post {
    animation: fadeInUp 0.6s ease-out;
}

/* Hidden state for filtering */
.blog-card.hidden {
    display: none;
}

