/* Blog Post Specific Styles */

/* Blog Post Hero */
.blog-post-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 100px 0 50px;
    margin-top: 70px;
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

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

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb i {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.9);
}

/* Post Category */
.post-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

/* Post Title */
.blog-post-hero h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Post Meta */
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.author-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.post-date {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.share-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Blog Post Content */
.blog-post-content {
    padding: 80px 0;
    background: var(--background-white);
}

.blog-post-content .container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    max-width: 1200px;
}

/* Post Body */
.post-body {
    max-width: 100%;
}

.featured-image {
    margin: -40px 0 3rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

/* Typography */
.post-body p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.post-body p.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 2rem;
}

.post-body h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin: 3rem 0 1.5rem;
    font-weight: 700;
}

.post-body h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

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

.post-body li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
    color: var(--text-light);
}

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

/* Blockquote */
.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: var(--background-light);
    border-radius: 0 8px 8px 0;
}

.post-body blockquote p {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--primary-color);
    margin: 0;
}

/* Callout Box */
.callout {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.callout h4 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.callout p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--background-light);
    border-radius: 12px;
    margin-top: 3rem;
}

.author-bio img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-bio h4 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.author-bio p {
    font-size: 1rem;
    margin: 0;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.sidebar-widget h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

/* Related Posts */
.related-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-post {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-post:hover {
    transform: translateX(5px);
}

.related-post img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.related-post h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.related-post p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--background-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.category-list a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.category-list span {
    font-size: 0.875rem;
    color: var(--text-light);
}

.category-list a:hover span {
    color: rgba(255, 255, 255, 0.8);
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
}

.cta-widget h3 {
    color: white;
}

.cta-widget p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.cta-widget .btn {
    background: white;
    color: var(--primary-color);
}

.cta-widget .btn:hover {
    background: var(--accent-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-post-content .container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

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

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .share-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .featured-image {
        margin: -20px -20px 2rem;
        border-radius: 0;
    }

    .post-body p {
        font-size: 1rem;
    }

    .post-body p.lead {
        font-size: 1.125rem;
    }

    .post-body h2 {
        font-size: 1.5rem;
    }

    .post-body h3 {
        font-size: 1.25rem;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-bio img {
        margin: 0 auto;
    }

    .blog-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-post-hero {
        padding: 100px 0 40px;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    .callout {
        padding: 1.5rem;
    }

    .sidebar-widget {
        padding: 1.5rem;
    }
}

/* Enhanced Blog Post Styling */

/* Blog Typography Classes for Markdown Parser */
.blog-h1, .blog-h2, .blog-h3, .blog-h4 {
    color: var(--text-dark);
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.blog-h1 {
    font-size: 2.5rem;
    font-weight: 700;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.blog-h2 {
    font-size: 2rem;
    font-weight: 600;
    position: relative;
    padding-left: 1rem;
}

.blog-h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.blog-h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 600;
}

.blog-h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 600;
}

.blog-paragraph {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Enhanced Lists */
.enhanced-list {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.enhanced-list li {
    position: relative;
    padding: 0.75rem 0 0.75rem 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    line-height: 1.7;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
}

.enhanced-list li::before {
    content: '▸';
    position: absolute;
    left: 0.5rem;
    top: 0.75rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.enhanced-list li:hover {
    border-left-color: var(--primary-light);
    background: rgba(30, 58, 138, 0.02);
    padding-left: 2.25rem;
}

/* Enhanced Callout Styling */
.callout.important {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.callout.important h4 {
    color: white;
}

.callout.important p {
    color: rgba(255, 255, 255, 0.95);
}

/* Enhanced Quote Styling */
.post-body blockquote {
    position: relative;
    font-style: italic;
}

.post-body blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: -20px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    font-family: serif;
}

.post-body blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: normal;
}

.post-body blockquote cite::before {
    content: '— ';
}

/* Enhanced Content Styling */
.post-body p.lead {
    position: relative;
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(59, 130, 246, 0.05));
    border-radius: 0 8px 8px 0;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Table of Contents */
.table-of-contents {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.table-of-contents h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: block;
    transition: all 0.3s ease;
}

.table-of-contents a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* Enhanced Typography */
.post-body h2 {
    position: relative;
    padding-bottom: 0.5rem;
}

.post-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.post-body h3 {
    position: relative;
    padding-left: 1rem;
}

.post-body h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Enhanced Code Styling */
.post-body code {
    background: var(--background-light);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: var(--primary-dark);
    border: 1px solid var(--border-color);
}

.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 2rem 0;
    position: relative;
}

.post-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}

/* Stats/Numbers Highlighting */
.post-body strong {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1), rgba(59, 130, 246, 0.1));
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* Enhanced List Styling */
.post-body .enhanced-list li {
    position: relative;
    padding-left: 0.5rem;
}

.post-body .enhanced-list li::before {
    content: '▸';
    position: absolute;
    left: -1rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* Social Share Enhancements */
.share-btn {
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.share-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* Related Posts Enhancement */
.related-post {
    border: 1px solid transparent;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-post:hover {
    border-color: var(--border-color);
    background: var(--background-light);
}

/* Author Bio Enhancement */
.author-bio {
    position: relative;
    overflow: hidden;
}

.author-bio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .share-btn::before,
    .related-post,
    .table-of-contents a {
        transition: none;
    }
    
    .blog-card:hover::before {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .share-buttons,
    .post-navigation,
    .blog-sidebar,
    .reading-progress,
    .back-to-top {
        display: none !important;
    }
    
    .blog-post-content .container {
        grid-template-columns: 1fr;
    }
    
    .post-body {
        max-width: 100%;
    }
    
    .callout {
        border: 2px solid var(--primary-color);
        background: white !important;
    }
}

/* Dark Mode Support (for future implementation) */
@media (prefers-color-scheme: dark) {
    .blog-post-hero {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    }
    
    .post-body pre {
        background: #0f172a;
    }
    
    .callout {
        background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    }
}