/* ==========================================
   BLOG SINGLE PAGE REDESIGN
========================================== */

/* Typography & Layout Foundation */
.single-blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.blog-main-content {
    font-size: 1.0625rem; /* ~17px */
    line-height: 1.7;
    color: #334155;
}

.blog-main-content p {
    margin-bottom: 1.5rem;
}

.blog-main-content h2, 
.blog-main-content h3, 
.blog-main-content h4 {
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.blog-main-content h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.blog-main-content h3 {
    font-size: 1.4rem;
}

.blog-main-content ul, 
.blog-main-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-main-content li {
    margin-bottom: 0.5rem;
}

.blog-main-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 4px;
    transition: all 0.2s ease;
}

.blog-main-content a:hover {
    color: #1d4ed8;
    text-decoration-color: #1d4ed8;
}

.blog-main-content blockquote {
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

/* Hero Section */
.blog-hero {
    margin-bottom: 3rem;
    text-align: center;
}

.blog-breadcrumbs a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
}

.blog-breadcrumbs a:hover {
    color: #0f172a;
}

.blog-category-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 1rem;
    text-decoration: none !important;
}

.blog-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.blog-meta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-featured-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 600px;
}

/* Reading Container */
.blog-reading-area {
    width: 100%;
    max-width: 820px;
}

/* Sidebar & Cards System */
.blog-sidebar {
    padding-left: 1rem;
}

.blog-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Table of Contents */
.blog-toc {
    background: #f8fafc;
    border: none;
    border-left: 4px solid #2563eb;
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
}

.blog-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-toc li {
    margin-bottom: 0.5rem;
}

.blog-toc a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.blog-toc a:hover {
    color: #2563eb;
}

/* Related Posts (Sidebar & Bottom) */
.related-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.related-post-item:last-child {
    margin-bottom: 0;
}

.related-post-thumb {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.related-post-info a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 0.25rem;
    transition: color 0.2s;
}

.related-post-info a:hover {
    color: #2563eb;
}

.related-post-date {
    font-size: 0.8rem;
    color: #64748b;
}

/* Premium CTA System */
.blog-cta-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    text-align: center;
    border: none;
    padding: 2.5rem 2rem;
}

.blog-cta-card h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.blog-cta-card p {
    color: #e0e7ff;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-cta {
    display: inline-block;
    background: #ffffff;
    color: #1e3a8a;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    color: #1e3a8a;
}

/* End of Article */
.blog-end-section {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.post-tags a {
    background: #f1f5f9;
    color: #475569;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.post-tags a:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.blog-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.blog-nav-link {
    flex: 1;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: #0f172a;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
}

.blog-nav-link:hover {
    background: #f1f5f9;
}

.blog-nav-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-nav-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

/* Responsive Stacking */
@media (max-width: 991px) {
    .blog-sidebar {
        padding-left: 0;
        margin-top: 3rem;
    }
    
    .blog-title {
        font-size: clamp(1.8rem, 4vw, 2.5rem);
    }
}

@media (max-width: 576px) {
    .blog-post-nav {
        flex-direction: column;
    }
    .nav-prev, .nav-next {
        text-align: left;
    }
}
