/* Blog View Styles - Reusable Template */

/* Global Layout Override for Blog Post Page */
.blog-view-page {
    background-color: #F9FAFB; /* Light gray background for the whole page */
    padding-bottom: 0;
}

/* Container Layout */
.blog-view-container {
    max-width: 1200px; /* Wider to accommodate sidebar */
    margin: 120px auto 80px;
    padding: 0 20px;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.back-link:hover {
    transform: translateX(-5px);
}

/* Grid Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px; /* Main content + Sidebar */
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
}

/* Article Container */
.article-content {
    background: #FFFFFF;
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .article-content {
        padding: 30px 20px;
    }
}

/* Header Section */
.article-header {
    margin-bottom: 40px;
    text-align: left;
}

.article-header h1 {
    font-family: var(--font-heading-primary);
    font-size: 2.5rem; /* Large and readable */
    font-weight: 800;
    line-height: 1.3;
    color: var(--text-color);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #6B7280;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 15px;
    padding-bottom: 30px;
    border-bottom: 1px solid #E5E7EB;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: var(--primary-color);
}

/* Article Body Typography */
.article-body {
    font-family: var(--font-body);
    font-size: 1.125rem; /* 18px for better readability */
    line-height: 1.8;
    color: #374151; /* Slightly softer than pure black */
}

.article-body h2 {
    font-family: var(--font-heading-primary);
    font-size: 1.8rem;
    color: var(--text-color);
    margin-top: 50px;
    margin-bottom: 25px;
    font-weight: 700;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.article-body h3 {
    font-family: var(--font-heading-primary);
    font-size: 1.4rem;
    color: var(--text-color);
    margin-top: 35px;
    margin-bottom: 15px;
    font-weight: 600;
}

.article-body p {
    margin-bottom: 24px;
}

/* Lists */
.article-body ul, 
.article-body ol {
    margin-bottom: 24px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 10px;
}

.article-body ul li {
    list-style: none;
}

.article-body ul li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 40px 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    font-size: 1rem;
    min-width: 600px; /* Ensure table doesn't squish too much */
}

.article-table th, 
.article-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.article-table th {
    background-color: #F3F4F6;
    color: var(--text-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.article-table tr:hover {
    background-color: #F9FAFB;
}

.article-table td {
    color: #4B5563;
}

/* Blockquotes */
.article-body blockquote {
    background: #F9FAFB;
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    font-style: italic;
    color: #4B5563;
    border-radius: 0 8px 8px 0;
}

/* Images */
.article-body img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

/* Call to Action Box */
.article-cta {
    background: linear-gradient(135deg, #6D28D9 0%, #A855F7 100%);
    color: #FFFFFF;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-top: 60px;
}

.article-cta h3 {
    color: #FFFFFF !important;
    margin-top: 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    padding-left: 0 !important;
}

.article-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
}

.btn-light {
    background: #FFFFFF;
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    display: inline-block;
    transition: transform 0.2s;
    text-decoration: none;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sidebar Styles */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.sidebar-widget h3 {
    font-family: var(--font-heading-primary);
    font-size: 1.25rem;
    color: var(--text-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E5E7EB;
    position: relative;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.sidebar-links {
    list-style: none;
    padding: 0;
}

.sidebar-links li {
    margin-bottom: 12px;
}

.sidebar-links a {
    color: #4B5563;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.sidebar-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar-links i {
    font-size: 0.8rem;
    color: #9CA3AF;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    background: #F3F4F6;
    color: #4B5563;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

.tag-cloud a:hover {
    background: var(--primary-color);
    color: #FFFFFF;
}

/* Author Box in Sidebar */
.author-box {
    text-align: center;
}

.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.author-name {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.author-bio {
    font-size: 0.9rem;
    color: #6B7280;
    margin-bottom: 15px;
}
