/* Blog Detail Page Styles */

/* Blog Detail Page - Dark Mode Support */
body.dark-mode .blog-detail-container {
    background: #121826;
}

body.dark-mode .blog-main-content {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

body.dark-mode .blog-sidebar-card {
    background: #232946;
    color: #e2e8f0;
    border-color: #334155;
}

body.dark-mode .blog-sidebar-title,
body.dark-mode .blog-tool-info-content h4 {
    color: #f8fafc;
}

body.dark-mode .blog-tool-info {
    background: linear-gradient(135deg, rgba(129,140,248,0.08), rgba(167,139,250,0.08));
    border-color: #334155;
}

body.dark-mode .blog-tool-info-content p {
    color: #cbd5e1;
}

body.dark-mode .blog-related-item {
    background: #232946;
}

body.dark-mode .blog-related-item:hover {
    background: #334155;
}

body.dark-mode .blog-newsletter {
    background: #232946;
    color: #e2e8f0;
}

body.dark-mode .blog-newsletter p {
    color: #cbd5e1;
}

body.dark-mode .blog-article-header {
    background: transparent;
}

body.dark-mode .blog-article-header h1,
body.dark-mode .blog-author-details h4,
body.dark-mode .blog-share-label {
    color: #f8fafc;
}

body.dark-mode .blog-author-meta {
    border-bottom: 2px solid #334155;
}

body.dark-mode .blog-author-date {
    color: #94a3b8;
}

body.dark-mode .blog-stat-item {
    background: rgba(129,140,248,0.08);
    color: #cbd5e1;
}

body.dark-mode .blog-stat-item i {
    color: #818cf8;
}

body.dark-mode .blog-article-body {
    color: #e2e8f0;
}

body.dark-mode .blog-article-body h2,
body.dark-mode .blog-article-body h3,
body.dark-mode .blog-article-body h4 {
    color: #f8fafc;
}

body.dark-mode .blog-article-body blockquote {
    background: #1e2333;
    color: #94a3b8;
    border-left-color: #818cf8;
}

body.dark-mode .blog-article-body code {
    background: #232946;
    color: #fbbf24;
}

body.dark-mode .blog-article-body pre {
    background: #232946;
    color: #f8fafc;
}

body.dark-mode .blog-article-body a {
    color: #818cf8;
}

body.dark-mode .blog-article-body a:hover {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

/* Blog Detail Page - Modern Design with Dark Mode Support */
.blog-detail-container {
    background: #ffffff;
    min-height: 100vh;
    /* Minimal top padding to clear fixed navbar */
    padding: 90px 0 40px;
}

/* Breadcrumb - Matching Category Detail Style */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    font-size: 14px;
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 24px;
}

.breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb a:hover {
    color: #667eea;
}

.breadcrumb i.fa-chevron-right {
    font-size: 12px;
    color: #94a3b8;
}

.breadcrumb span {
    color: #1e293b;
    font-weight: 500;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: start;
}

/* Main Content Area */
.blog-main-content {
    background: #ffffff;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    opacity: 1;
    transform: translateY(0);
}

/* Tool Badge */
.blog-tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 24px;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.blog-tool-badge:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Article Header */
.blog-article-header {
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.blog-article-header h1 {
    font-size: 42px;
    font-weight: 900;
    color: #1e293b;
    line-height: 1.2;
    margin: 0;
    letter-spacing: -0.02em;
    display: block;
}

/* Author Meta */
.blog-author-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 40px;
}

.blog-author-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.blog-author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.blog-author-details h4 {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 16px;
}

.blog-author-date {
    font-size: 14px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-article-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

.blog-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 20px;
}

.blog-stat-item i {
    color: #667eea;
}

.blog-featured-image {
    margin-bottom: 48px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Article Content */
.blog-article-body {
    font-size: 19px;
    line-height: 1.8;
    color: #1e293b;
}

.blog-article-body h2 {
    font-size: 36px;
    font-weight: 800;
    color: #1e293b;
    margin: 48px 0 24px;
    line-height: 1.3;
}

.blog-article-body h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 40px 0 20px;
}

.blog-article-body h4 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 32px 0 16px;
}

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

.blog-article-body ul,
.blog-article-body ol {
    margin: 24px 0;
    padding-left: 32px;
}

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

.blog-article-body img {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 40px auto;
    display: block;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.blog-article-body blockquote {
    border-left: 4px solid #667eea;
    padding: 24px 32px;
    margin: 32px 0;
    background: #f8fafc;
    font-style: italic;
    color: #64748b;
    border-radius: 8px;
}

.blog-article-body code {
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e91e63;
}

.blog-article-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 32px 0;
}

.blog-article-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.blog-article-body a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.blog-article-body a:hover {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

/* Article Footer */
.blog-article-footer {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.blog-share-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.blog-share-label {
    font-weight: 700;
    color: #1e293b;
    font-size: 16px;
}

.blog-share-buttons {
    display: flex;
    gap: 12px;
}

.blog-share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.blog-share-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.blog-tool-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.blog-tool-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 120px; /* Match header height + spacing */
}

.blog-sidebar-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    opacity: 1;
    transform: translateY(0);
}

.blog-sidebar-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-sidebar-title i {
    color: #667eea;
}

/* Related Posts */
.blog-related-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 16px;
    background: #f8fafc;
}

.blog-related-item:hover {
    background: #e2e8f0;
    transform: translateX(4px);
}

.blog-related-image {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-related-image-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

.blog-related-content h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-related-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

/* Tool Info Card */
.blog-tool-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}

.blog-tool-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.blog-tool-info-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}

.blog-tool-info-content p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Newsletter Card */
.blog-newsletter {
    text-align: center;
}

.blog-newsletter-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: white;
}

.blog-newsletter p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-newsletter-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.blog-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* CK Content Styles - Light Mode */
.ck-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    margin: 48px 0 24px;
    line-height: 1.3;
}

.ck-content h3 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin: 40px 0 20px;
}

.ck-content h4 {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin: 32px 0 16px;
}

.ck-content p {
    margin-bottom: 24px;
    color: #334155;
}

.ck-content ul,
.ck-content ol {
    margin: 24px 0;
    padding-left: 32px;
}

.ck-content li {
    margin-bottom: 12px;
    color: #334155;
}

.ck-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 32px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ck-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: #64748b;
    background: #f8fafc;
    padding: 24px;
    border-radius: 8px;
}

.ck-content code {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e91e63;
}

.ck-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
}

.ck-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.ck-content a:hover {
    border-bottom-color: #667eea;
}

/* CK Content Styles - Dark Mode */
body.dark-mode .ck-content h2,
body.dark-mode .ck-content h3,
body.dark-mode .ck-content h4 {
    color: #f8fafc;
}

body.dark-mode .ck-content p,
body.dark-mode .ck-content li {
    color: #cbd5e1;
}

body.dark-mode .ck-content blockquote {
    background: #1e2333;
    color: #94a3b8;
    border-left-color: #818cf8;
}

body.dark-mode .ck-content code {
    background: #232946;
    color: #fbbf24;
}

body.dark-mode .ck-content pre {
    background: #0f172a;
    color: #f8fafc;
}

body.dark-mode .ck-content a {
    color: #818cf8;
}

body.dark-mode .ck-content a:hover {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
}

body.dark-mode .ck-content img {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-main-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .blog-detail-container {
        /* Mobile header is ~72px, body already has padding-top */
        padding: 0 0 32px;
    }
    
    .breadcrumb {
        padding: 16px 16px 0;
        font-size: 13px;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 1.5rem;
    }
    
    .blog-main-content {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .blog-article-header h1 {
        font-size: 32px;
    }
    
    .breadcrumb span {
        max-width: 200px;
    }
    
    .blog-author-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .blog-article-stats {
        flex-wrap: wrap;
    }
    
    .blog-article-body {
        font-size: 17px;
    }
    
    .blog-article-body h2 {
        font-size: 28px;
    }
    
    .blog-article-body h3 {
        font-size: 22px;
    }
    
    .blog-article-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .ck-content h2 {
        font-size: 24px !important;
    }
    
    .ck-content h3 {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .blog-detail-container {
        /* Smaller devices, body already has padding-top */
        padding: 0 0 24px;
    }
    
    .breadcrumb {
        font-size: 12px;
        gap: 6px;
        margin-bottom: 1.25rem;
        padding: 12px 16px 0;
    }
    
    .blog-main-wrapper {
        padding: 0 16px;
    }
    
    .blog-main-content {
        padding: 24px 16px;
    }
    
    .blog-article-header h1 {
        font-size: 26px;
    }
    
    .breadcrumb span {
        max-width: 150px;
    }
    
    .blog-stat-item {
        font-size: 12px;
        padding: 6px 12px;
    }
}
