/* Blog Rich Content Styling */

/* Code Syntax Highlighting */
.blog-content pre {
    background: #2f3437;
    color: #f8f8f2;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.blog-content code {
    background: #f4f4f4;
    color: #d63384;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.blog-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* CKEditor Code Snippet Styling */
.blog-content .hljs {
    background: #2f3437 !important;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
}

/* Block quotes */
.blog-content blockquote {
    border-left: 4px solid #007bff;
    background: #f8f9fa;
    padding: 16px 20px;
    margin: 20px 0;
    font-style: italic;
    border-radius: 0 6px 6px 0;
}

.blog-content blockquote p {
    margin: 0;
    color: #6c757d;
}

/* Tables */
.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.blog-content table th,
.blog-content table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.blog-content table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.blog-content table tbody tr:hover {
    background: #f8f9fa;
}

/* Images */
.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 16px 0;
}

.blog-content figure {
    margin: 20px 0;
    text-align: center;
}

.blog-content figcaption {
    margin-top: 8px;
    font-size: 0.9em;
    color: #6c757d;
    font-style: italic;
}

/* Lists */
.blog-content ul,
.blog-content ol {
    padding-left: 24px;
    margin: 16px 0;
}

.blog-content li {
    margin: 8px 0;
    line-height: 1.6;
}

/* Headings in blog content */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin: 24px 0 16px 0;
    font-weight: 600;
    line-height: 1.4;
}

.blog-content h1 {
    font-size: 2rem;
    color: #212529;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.blog-content h2 {
    font-size: 1.6rem;
    color: #343a40;
}

.blog-content h3 {
    font-size: 1.3rem;
    color: #495057;
}

.blog-content h4,
.blog-content h5,
.blog-content h6 {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Paragraphs */
.blog-content p {
    margin: 16px 0;
    line-height: 1.7;
    color: #495057;
}

/* Links */
.blog-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.blog-content a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

/* Horizontal rules */
.blog-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #dee2e6, transparent);
    margin: 32px 0;
}

/* Video and iframe responsiveness */
.blog-content iframe,
.blog-content video {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
}

/* Special alerts/callouts */
.blog-content .alert {
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 6px;
    border-left: 4px solid;
}

.blog-content .alert-info {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #0d47a1;
}

.blog-content .alert-warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

.blog-content .alert-success {
    background: #e8f5e8;
    border-color: #4caf50;
    color: #1b5e20;
}

.blog-content .alert-danger {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

/* Code language indicators */
.blog-content .hljs::before {
    content: attr(data-language);
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 12px;
    color: #a7a7a7;
    text-transform: uppercase;
    font-weight: bold;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .blog-content {
        font-size: 16px;
    }
    
    .blog-content h1 {
        font-size: 1.6rem;
    }
    
    .blog-content h2 {
        font-size: 1.4rem;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
    }
    
    .blog-content pre {
        padding: 12px;
        font-size: 13px;
    }
    
    .blog-content table {
        font-size: 14px;
    }
    
    .blog-content table th,
    .blog-content table td {
        padding: 8px 12px;
    }
}

/* Print styles */
@media print {
    .blog-content pre {
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #dee2e6;
    }
    
    .blog-content a {
        color: #333 !important;
        text-decoration: underline !important;
    }
}