/* Unified Blog Design - Matches Dashboard Styling */

/* Base Styles & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333333;
    background: #ffffff;
    min-height: 100vh;
}

/* Blog Container */
.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    min-height: 100vh;
}

/* Blog Header */
.blog-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333333;
}

.blog-nav {
    margin-bottom: 30px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #333333;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid #333333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.back-button:hover {
    background: #ffffff;
    color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 51, 51, 0.15);
}

.back-button i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateX(-2px);
}

/* Blog Title Section */
.blog-title-section {
    text-align: center;
    margin-bottom: 30px;
}

.blog-title {
    font-size: 36px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 12px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.blog-date {
    font-size: 14px;
    color: #666666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.blog-tag {
    background: #ffffff;
    color: #333333;
    font-size: 12px;
    padding: 6px 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.blog-tag:hover {
    background: #333333;
    color: #ffffff;
    transform: translateY(-1px);
    border-color: #333333;
}

.blog-tag::before {
    content: '#';
    opacity: 0.7;
}

/* Download/Action Buttons */
.blog-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #ffffff;
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid #333333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-button:hover {
    background: #333333;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 51, 51, 0.15);
}

.action-button i {
    font-size: 16px;
}

/* Blog Featured Media */
.blog-featured-media {
    margin: 30px 0;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.blog-featured-media img,
.blog-featured-media video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: contain;
    background: #f8f9fa;
}

.blog-featured-media video {
    background: #000000;
}

/* Blog Content */
.blog-content {
    font-size: 16px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 40px;
}

.blog-content p {
    margin-bottom: 20px;
}

.blog-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    margin: 40px 0 20px 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.blog-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333333;
    margin: 30px 0 15px 0;
    line-height: 1.3;
}

.blog-content h4 {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin: 25px 0 12px 0;
    line-height: 1.3;
}

.blog-content strong,
.blog-content b {
    font-weight: 700;
    color: #333333;
}

.blog-content a {
    color: #333333;
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.2s ease;
}

.blog-content a:hover {
    color: #666666;
    text-decoration: none;
}

.blog-content img {
    width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    display: block;
}

.blog-content ol,
.blog-content ul {
    margin: 20px 0;
    padding-left: 30px;
}

.blog-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.blog-content blockquote {
    margin: 30px 0;
    padding: 20px 24px;
    background: #f8f9fa;
    border-left: 4px solid #333333;
    font-style: italic;
    color: #555555;
    border-radius: 0 8px 8px 0;
}

.blog-content code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    color: #333333;
    border: 1px solid #e5e5e5;
}

.blog-content pre {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid #e5e5e5;
}

.blog-content pre code {
    background: none;
    padding: 0;
    border: none;
    font-size: 14px;
}

/* Blog Sections */
.blog-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid #e5e5e5;
}

.blog-section:first-child {
    border-top: none;
    padding-top: 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* References Section */
.references-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    margin-top: 40px;
}

.references-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.references-list li {
    margin-bottom: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.references-list li:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #333333;
}

.references-list li a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
}

.references-list li a:hover {
    color: #666666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-container {
        padding: 16px;
    }
    
    .blog-title {
        font-size: 28px;
        margin-bottom: 10px;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .blog-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-button,
    .back-button {
        padding: 14px 20px;
        font-size: 14px;
    }
    
    .blog-content {
        font-size: 15px;
    }
    
    .blog-content h2 {
        font-size: 24px;
        margin: 30px 0 15px 0;
    }
    
    .blog-content h3 {
        font-size: 20px;
        margin: 25px 0 12px 0;
    }
    
    .blog-content h4 {
        font-size: 18px;
        margin: 20px 0 10px 0;
    }
    
    .blog-featured-media {
        margin: 20px 0;
    }
    
    .references-section {
        padding: 20px;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 12px;
    }
    
    .blog-title {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .back-button,
    .action-button {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .blog-content {
        font-size: 14px;
    }
    
    .blog-content ol,
    .blog-content ul {
        padding-left: 20px;
    }
    
    .references-section {
        padding: 16px;
    }
    
    .references-list li {
        padding: 10px 12px;
    }
}

/* Focus states for accessibility */
.back-button:focus,
.action-button:focus,
.blog-tag:focus {
    outline: 2px solid #333333;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .blog-nav,
    .blog-actions {
        display: none;
    }
    
    .blog-container {
        max-width: none;
        padding: 0;
    }
    
    .blog-content a {
        color: #333333;
        text-decoration: underline;
    }
    
    .blog-featured-media,
    .blog-content img {
        max-height: 400px;
        page-break-inside: avoid;
    }
}
