
.article-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0 4rem;
}

.article-breadcrumbs {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.article-breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.article-breadcrumbs a:hover {
    color: var(--primary-color);
}

.article-breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #adb5bd;
}

.article-breadcrumbs .current {
    color: #495057;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.article-sidebar {
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

@media (min-width: 992px) {
    .article-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .article-sidebar {
        position: sticky;
        top: calc(var(--navbar-height, 76px) + 1.5rem);
        max-height: calc(100vh - var(--navbar-height, 76px) - 3rem);
        overflow-y: auto;
    }
}

.sidebar-cta {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
    border: 1px solid #d0d7de;
    border-radius: 1rem;
    padding: 1.25rem;
}

.sidebar-cta h2 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.375rem;
}

.sidebar-cta p {
    font-size: 0.8125rem;
    color: #555;
    margin: 0 0 1rem;
}

.sidebar-cta-buttons {
    display: grid;
    gap: 0.5rem;
}

.sidebar-cta .btn-article-cta {
    justify-content: center;
}

.article-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.article-hero {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.article-hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.article-body {
    padding: 2.5rem;
    max-width: 860px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .article-body {
        padding: 1.5rem;
    }
}

.article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.875rem;
}

.article-tags .tag {
    color: #6c757d;
    font-size: 0.8125rem;
    font-weight: 500;
}

.article-tags .tag::before {
    content: '#';
    opacity: 0.55;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #212529;
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.5rem;
    }
}

.article-excerpt {
    margin-top: 1.25rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #495057;
}

.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #343a40;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: #212529;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: #212529;
}

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

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

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

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(0, 102, 204, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color 0.2s;
}

.article-content a:hover {
    text-decoration-color: var(--primary-color);
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: #495057;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.article-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.article-content pre,
.article-content code {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 0.875em;
}

.article-content code {
    background: #f1f3f4;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
}

.article-content pre {
    background: #f8f9fa;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-related {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
}

.article-related h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 0.875rem;
}

.related-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.related-link:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.related-link.primary {
    background: #e7f1ff;
}

.related-link.primary:hover {
    background: #d0e3ff;
}

.related-title {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #212529;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.related-badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 1rem;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-content .btn {
    text-decoration: none;
}

/* white text only on filled buttons — outline buttons keep their own color */
.article-content .btn-primary {
    color: #fff !important;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.article-content .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.back-link,
.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.back-link {
    color: #6c757d;
}

.back-link:hover {
    color: var(--primary-color);
}

.cta-link {
    color: var(--primary-color);
}

.cta-link:hover {
    color: var(--primary-hover);
}

.article-cta {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f5e9 100%);
    border-radius: 12px;
    border: 1px solid #d0d7de;
}

.article-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.article-cta-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: #1a1a2e;
}

.article-cta-text p {
    font-size: 0.875rem;
    color: #555;
    margin: 0;
}

.article-cta-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-article-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    background: white;
    color: #333;
    border: 1px solid #d0d7de;
    transition: all 0.2s;
}

.btn-article-cta:hover {
    border-color: #667eea;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    text-decoration: none;
}

.btn-article-cta.primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-article-cta.primary:hover {
    background: #5a6fd6;
    border-color: #5a6fd6;
    color: white;
}

@media (max-width: 575.98px) {
    .article-cta-content {
        flex-direction: column;
        align-items: stretch;
    }

    .article-cta-buttons {
        flex-direction: column;
    }

    .btn-article-cta {
        justify-content: center;
    }
}

/* Contextual mobile sticky bar (bound pages): single full-width CTA, no phone button.
   Overrides the generic 3-button rule (.global-sticky-cta .btn { flex:1; max-width:180px }). */
.global-sticky-cta--single .btn {
    max-width: none;
    flex: 1 1 auto;
}