/* Modern Blog Post Styles */

.modern-blog-post {
    max-width: 900px;
    margin: 2rem auto;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
}

.modern-blog-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Hero Section */
.post-hero {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Article Header */
.article-header {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.article-title {
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Meta Information */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.article-meta > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.article-meta svg {
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
}

/* Content Styling */
.article-content {
    line-height: 1.8;
}

/* Enhanced Typography */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    font-weight: 700;
    color: #1e293b !important;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.prose h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #0f172a !important;
}

.prose h2 {
    font-size: 2rem;
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #0f172a !important;
}

.prose h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #0f172a !important;
}

.prose h4 {
    font-size: 1.25rem;
    line-height: 1.5;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #0f172a !important;
}

.prose h5 {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: #0f172a !important;
}

.prose h6 {
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    color: #0f172a !important;
}

.prose p {
    color: #1f2937 !important;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}

.prose a {
    color: #2563eb !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
}

.prose strong {
    color: #0f172a !important;
    font-weight: 600;
}

.prose em {
    color: #4b5563;
    font-style: italic;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: normal;
    color: #1e40af;
    position: relative;
}

.prose blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #3b82f6;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    opacity: 0.3;
}

/* Code Styling */
.prose code {
    background: #f1f5f9;
    color: #475569;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.prose pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Lists */
.prose ul, .prose ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.prose li {
    color: #374151;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose ul li {
    list-style-type: disc;
}

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

/* Images */
.prose img {
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin: 2rem 0;
    max-width: 100%;
    height: auto;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.prose th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}

.prose td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #374151;
}

.prose tr:hover {
    background: #f8fafc;
}

/* Categories */
.categories-wrapper span {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #dbeafe;
    color: #1e40af;
    transition: all 0.2s ease;
}

.categories-wrapper span:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}

/* Tags */
.tags-section a {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tags-section a:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

/* Share Buttons */
.share-section a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-section a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Share section heading - ensure visibility on all devices */
.share-section h3 {
    color: #374151 !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Page Links */
.page-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.page-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #3b82f6;
    background: #dbeafe;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.page-links span:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}

/* Add Chrome Mobile Specific Fixes */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
    .prose p, .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
        -webkit-text-stroke: 0.01em rgba(0, 0, 0, 0.1);
        text-rendering: optimizeLegibility;
    }
    
    /* Fix share section heading on Chrome mobile */
    .share-section h3 {
        color: #000000 !important;
        font-weight: 700 !important;
        -webkit-text-stroke: 0.01em rgba(0, 0, 0, 0.1);
        text-rendering: optimizeLegibility;
    }
}

/* WebKit specific improvements for mobile Chrome */
@supports (-webkit-appearance: none) {
    .prose p {
        color: #000000 !important;
        font-weight: 400 !important;
        -webkit-font-smoothing: subpixel-antialiased;
    }
    
    .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
        color: #000000 !important;
        font-weight: 700 !important;
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .modern-blog-post {
        margin: 1rem;
        border-radius: 0.5rem;
    }
    
    .post-hero {
        height: 250px;
    }
    
    .article-title {
        font-size: 2rem !important;
        color: #0f172a !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }
    
    .article-header {
        padding: 1.5rem !important;
    }
    
    .article-content {
        padding: 1.5rem !important;
    }
    
    .article-footer {
        padding: 1.5rem !important;
    }
    
    .prose h1 {
        font-size: 2rem;
        color: #0f172a !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    }
    
    .prose h2 {
        font-size: 1.5rem;
        color: #0f172a !important;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }
    
    .prose h3 {
        font-size: 1.25rem;
        color: #0f172a !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .prose p {
        color: #111827 !important;
        font-size: 1.125rem !important;
        line-height: 1.75 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .prose a {
        color: #1d4ed8 !important;
        font-weight: 600 !important;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    }
    
    .prose strong {
        color: #000000 !important;
        font-weight: 700 !important;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .article-meta > div {
        color: #374151 !important;
        font-weight: 500 !important;
    }
    
    .share-section .flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    .share-section a {
        justify-content: center;
    }
    
    /* Fix share section heading visibility on Chrome mobile */
    .share-section h3 {
        color: #000000 !important;
        font-weight: 700 !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    .modern-blog-post {
        box-shadow: none;
        margin: 0;
    }
    
    .share-section,
    .edit-link {
        display: none;
    }
    
    .article-content {
        color: #000;
    }
    
    .prose a {
        color: #000;
        text-decoration: underline;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modern-blog-post {
        background: #1e293b;
        color: #e2e8f0;
    }
    
    .article-header {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    }
    
    .article-title {
        background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
        color: #f1f5f9;
    }
    
    .prose p {
        color: #cbd5e1;
    }
    
    .prose blockquote {
        background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
        color: #dbeafe;
    }
    
    .article-footer {
        background: #334155;
        border-color: #475569;
    }
}