/* =========================================
   Blog & Article Design System Extensions
   ========================================= */

/* Typography for Long-form Content */
.article-content {
    font-size: 1.125rem;
    /* 18px */
    line-height: 1.75;
    color: #374151;
    /* Gray 700 */
    max-width: 800px;
    /* Optimal reading width */
    margin: 0 auto;
}

.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #111827;
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--primary);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1F2937;
}

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

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

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

/* =========================================
   NEW: Vertical Blog List Layout (No Images)
   ========================================= */

.blog-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.blog-list-item {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.blog-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.blog-list-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: bottom;
}

.blog-list-item:hover::before {
    transform: scaleY(1);
}

.blog-list-meta-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #6B7280;
}

.blog-category-badge {
    background: #EFF6FF;
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.blog-list-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.75rem 0;
    color: #111827;
    line-height: 1.3;
}

.blog-list-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.blog-list-title a:hover {
    color: var(--primary);
}

.blog-list-excerpt {
    color: #4B5563;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
}

.blog-list-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #F3F4F6;
    margin-top: auto;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.read-more-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s;
}

.read-more-link:hover {
    gap: 0.75rem;
}

/* =========================================
   Legacy Grid / Related Posts (Text Only Update)
   ========================================= */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    /* Added border for definition without image */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    /* Increased padding */
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

/* Hide images in legacy/related cards if present */
.blog-card-image {
    display: none;
}

.blog-card-content {
    padding: 0;
    /* Remove padding as it's now on parent */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-category {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.15rem;
    /* Slightly smaller for related posts */
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #6B7280;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #F3F4F6;
    font-size: 0.8rem;
    color: #9CA3AF;
}

/* Single Article Layout */
.article-header {
    /* Kept gradient, consistent with recent changes */
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    color: white;
    padding: 6rem 0 4rem;
    text-align: center;
    margin-bottom: 4rem;
    border-radius: 0 0 0 0;
    /* Removed curve for more modern flat look */
}

.article-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.article-meta-header {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 1rem;
    opacity: 0.9;
}

/* Sidebar & TOC */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.article-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.toc-widget {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #111827;
}

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

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

.toc-list a {
    color: #4B5563;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
    display: block;
    padding: 0.25rem 0;
}

.toc-list a:hover,
.toc-list a.active {
    color: var(--primary);
    font-weight: 600;
}

/* Components */
.info-box {
    background-color: #EFF6FF;
    border-left: 4px solid #3B82F6;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.info-box-title {
    font-weight: 700;
    color: #1E40AF;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-box p {
    margin-bottom: 0;
    color: #1E3A8A;
}

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1000;
}

.reading-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s;
}

/* Author Box */
.author-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #F9FAFB;
    padding: 2rem;
    border-radius: 12px;
    margin-top: 4rem;
    border: 1px solid #E5E7EB;
}

.author-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 0.25rem 0;
    color: #111827;
    font-size: 1.25rem;
}

.author-role {
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
}

.author-bio {
    color: #6B7280;
    font-size: 0.95rem;
    margin: 0;
}