/* Article detail page styles */

.article-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 24px 80px;
    align-items: start;
}

/* BACK LINK */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent);
}

/* ARTICLE TOP */
.article-top-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.article-h1 {
    font-family: var(--font2);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.article-byline {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.article-byline strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.article-byline span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-hero-img {
    height: 280px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    margin-bottom: 32px;
}

/* ARTICLE CONTENT */
.article-content {
    line-height: 1.85;
}

.article-content .lead {
    font-size: 1.1rem;
    color: var(--text);
    border-left: 3px solid var(--accent);
    padding-left: 20px;
    margin-bottom: 32px;
    line-height: 1.8;
}

.article-content h2 {
    font-family: var(--font2);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 40px 0 16px;
    color: var(--text);
}

.article-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.97rem;
}

/* TOOL HIGHLIGHT */
.tool-highlight {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin: 8px 0 28px;
}

.th-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.tool-highlight strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.tool-highlight p {
    font-size: 0.85rem;
    margin: 0;
    color: var(--text-muted);
}

/* ARTICLE CTA BOX */
.article-cta-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: var(--radius);
    padding: 32px;
    margin: 40px 0;
    text-align: center;
}

.article-cta-box h3 {
    font-family: var(--font2);
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.article-cta-box p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* RELATED ARTICLES */
.related-articles {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.related-articles h3 {
    font-family: var(--font2);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.related-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
}

.related-img {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.related-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-body h4 {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
}

/* SIDEBAR */
.article-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-ad {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
}

.sidebar-widget h3 {
    font-family: var(--font2);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.popular-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popular-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.popular-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-list a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.4;
    flex: 1;
}

.popular-list a:hover {
    color: var(--accent);
}

.popular-list span {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    padding: 5px 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag-pill:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.newsletter-sidebar {
    text-align: center;
}

.newsletter-sidebar p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 8px;
}

.sticky-sidebar-ad {
    position: sticky;
    top: calc(80px + 600px);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
        padding: 80px 20px 60px;
    }

    .article-sidebar {
        position: static;
    }

    .sticky-sidebar-ad {
        position: static;
    }
}