/* ========================================
   ARTICLE PAGE STYLES
   ======================================== */

.article-breadcrumb {
    padding: calc(100px + 1.5rem) 0 0;
    background: var(--bg-page, #f8fafc);
    font-size: 0.85rem;
}
.article-breadcrumb a { color: var(--primary-color); text-decoration: none; }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-breadcrumb .sep { margin: 0 0.5rem; color: var(--text-muted); }
.article-breadcrumb span:last-child { color: var(--text-muted); }

.article-hero {
    padding: 2rem 0 2.5rem;
    background: var(--bg-page, #f8fafc);
}
.article-hero-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}
.article-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.article-reading-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.article-hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.75rem;
    max-width: 800px;
}
.article-hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.6;
}

/* Layout */
.article-content {
    padding: 0 0 4rem;
    background: var(--bg-page, #f8fafc);
}
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

/* Main article */
.article-main {
    min-width: 0;
}
.article-hero-image {
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 2rem;
}
.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 1rem;
}

/* Article body */
.article-body {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 720px;
}
.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}
.article-body h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}
.article-body p {
    margin-bottom: 0.85rem;
}
.article-body ul, .article-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.article-body li {
    margin-bottom: 0.35rem;
}
.article-body a {
    color: var(--primary-color);
    text-decoration: none;
}
.article-body a:hover {
    text-decoration: underline;
}
.article-body pre {
    background: var(--bg-tertiary, #f1f5f9);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}
.article-body code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--neutral-800, #1e293b);
}
.article-body p > code {
    background: var(--bg-secondary, #ffffff);
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.85em;
}
.article-body strong {
    color: var(--text-primary);
}

/* Steps */
.article-steps {
    margin: 2.5rem 0;
}
.article-steps h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.article-steps h2 i {
    color: var(--primary-color);
}
.article-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--neutral-200, #e2e8f0);
}
.article-step:last-child { border-bottom: none; }
.step-number {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.step-text {
    color: var(--text-secondary);
    line-height: 1.6;
    padding-top: 0.35rem;
}

/* Prompt */
.article-prompt {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-radius: 1rem;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}
.prompt-header {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.prompt-header i {
    color: var(--primary-color);
}
.prompt-code {
    background: var(--bg-tertiary, #f1f5f9);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 0;
    border: 1px solid var(--neutral-200, #e2e8f0);
}
.prompt-code code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--neutral-800, #1e293b);
    white-space: pre-wrap;
    word-break: break-word;
}
.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.copy-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Tools */
.article-tools {
    margin: 2.5rem 0;
}
.article-tools h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.article-tools h2 i { color: var(--primary-color); }
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.tool-card {
    display: block;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-radius: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}
.tool-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}
.tool-name {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.tool-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.tool-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-weight: 600;
    text-transform: uppercase;
}
.tool-badge.free { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.tool-badge.paid { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Pro tip & Challenge */
.article-protip, .article-challenge {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}
.article-protip {
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.2);
}
.article-challenge {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.protip-header, .challenge-header {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.protip-header { color: var(--primary-color); }
.protip-header i { color: var(--primary-color); }
.challenge-header { color: #f59e0b; }
.challenge-header i { color: #f59e0b; }
.article-protip p, .article-challenge p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}
.article-protip p a { color: var(--primary-color); }

/* Related articles */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--neutral-200, #e2e8f0);
}
.related-articles h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.related-card {
    display: block;
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-radius: 0.75rem;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.2s;
}
.related-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}
.related-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}
.related-info {
    padding: 0.75rem 1rem 1rem;
}
.related-category {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 1rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.related-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
}
.sidebar-lead-magnet {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}
.lead-magnet-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.sidebar-lead-magnet h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.sidebar-lead-magnet p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}
.sidebar-toc {
    background: var(--bg-secondary, #ffffff);
    border: 1px solid var(--neutral-200, #e2e8f0);
    border-radius: 1rem;
    padding: 1.5rem;
}
.sidebar-toc h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}
.sidebar-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-toc li {
    margin-bottom: 0.5rem;
}
.sidebar-toc a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.sidebar-toc a:hover { color: var(--primary-color); }

/* Responsive */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}
@media (max-width: 600px) {
    .article-sidebar {
        grid-template-columns: 1fr;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
}
