.article-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    margin: 2.5rem auto 3rem;
    font-family: 'Inter', sans-serif;
}

.article-main {
    background: #fff;
    padding: 2rem;
    border-radius: 1.2rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.article-author {
    display: inline-block;
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.article-hero .article-badge {
    display: inline-block;
    background: #e0e7ff;
    color: #312e81;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    margin-top: 0.5rem;
}

.article-hero h1 {
    margin-top: 1rem;
    font-size: 2.4rem;
    line-height: 1.3;
    color: #0f172a;
}

.article-subtitle {
    color: #6b7280;
    margin: 0.8rem 0 1.2rem;
    font-size: 1rem;
}

.article-actions .btn-primary,
.article-actions .btn-secondary {
    display: inline-block;
    margin-right: 0.8rem;
    text-decoration: none;
    border-radius: 999px;
    padding: 0.75rem 1.3rem;
    font-weight: 600;
}

.article-actions .btn-primary {
    background: #2563eb;
    color: #fff;
}

.article-actions .btn-secondary {
    border: 1px solid #2563eb;
    color: #2563eb;
}

.article-figure {
    margin: 1.8rem 0;
}

.article-figure img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.article-body h2,
.article-body h3 {
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-body p {
    color: #1f2937;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.article-sidebar .sidebar-widget {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    margin-bottom: 1.8rem;
}

/* Related Articles with Thumbnails */
.related-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-article-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.related-article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-article-link {
    display: block;
    flex-shrink: 0;
}

.related-article-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.related-article-thumb-placeholder {
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.related-article-thumb-placeholder svg {
    width: 24px;
    height: 24px;
}

.related-article-link:hover .related-article-thumb {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.related-article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.related-article-title {
    display: block;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.related-article-title:hover {
    color: #2563eb;
}

.related-article-date {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Related Articles in Content (not sidebar) */
.related-article-inline {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.related-article-inline-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-article-inline-link:hover {
    transform: translateX(4px);
}

.related-article-inline-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.related-article-inline-title {
    font-weight: 600;
    color: #0f172a;
    font-size: 1rem;
    line-height: 1.4;
}

.related-article-inline-link:hover .related-article-inline-title {
    color: #2563eb;
}

@media (max-width: 768px) {
    .related-article-inline-link {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .related-article-inline-thumb {
        width: 100%;
        height: 200px;
    }
}

.article-sidebar .ad-box {
    background: #f8fafc;
    padding: 0;
    border-radius: 0.8rem;
    min-height: auto;
}

.article-sidebar .ad-box.has-code {
    background: transparent;
    box-shadow: none;
}

.article-sidebar .tag-cloud {
    gap: 0.5rem;
}

.article-sidebar .tag-item {
    font-size: 0.82rem;
}

.article-sidebar h4 {
    margin-bottom: 1rem;
    color: #0f172a;
}

.article-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-sidebar li {
    margin-bottom: 0.6rem;
}

.article-sidebar a {
    text-decoration: none;
    color: #2563eb;
}

.article-footer {
    margin-top: 3rem;
}

@media (max-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
}


