/* Article Styles */

/* Container */
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Article Header */
.article-header {
    padding: 8rem 0 3rem;
    text-align: center;
}

.article-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.article h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.meta-item ion-icon {
    font-size: 18px;
}

.article-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

.article-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.5rem 1rem;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    justify-content: center;
}

.breadcrumb a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent-purple);
}

.breadcrumb span {
    color: var(--text-secondary);
}

/* Footer Center */
.article + footer.main-footer {
    text-align: center;
}

.article + footer.main-footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: fixed;
    right: 2rem;
    top: 150px;
    width: 250px;
    display: none;
}

.toc-sticky {
    position: sticky;
    top: 100px;
}

.toc-sidebar h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.toc {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-left: 2px solid transparent;
    padding-left: 1rem;
    transition: all 0.2s;
}

.toc-link:hover,
.toc-link.active {
    color: var(--accent-blue);
    border-left-color: var(--accent-blue);
}

.toc-sub {
    padding-left: 2rem;
    font-size: 0.8rem;
}

/* Article Content */
.article-content {
    padding: 4rem 0;
}

.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
    color: var(--text-primary);
}

.content-section h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: var(--text-primary);
}

.content-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    color: var(--text-primary);
}

.content-section p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

.content-section li {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.content-section li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(124, 58, 237, 0.1));
    border-left: 4px solid var(--accent-blue);
    padding: 1.5rem;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Callouts */
.callout {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin: 2rem 0;
}

.callout-icon {
    flex-shrink: 0;
}

.callout-icon ion-icon {
    font-size: 28px;
}

.callout-content h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.callout-content p {
    margin-bottom: 0.5rem;
}

.callout-content ul {
    margin-bottom: 0;
}

.callout-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.callout-warning .callout-icon {
    color: #f59e0b;
}

.callout-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.callout-info .callout-icon {
    color: var(--accent-blue);
}

.callout-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.callout-success .callout-icon {
    color: #22c55e;
}

/* Use Case Cards */
.use-case-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.use-case-card h4 {
    color: var(--accent-blue);
    margin-top: 0;
}

/* Tables */
.cost-table {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-card);
    border-radius: 0.5rem;
    overflow: hidden;
}

thead {
    background: var(--surface-border);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
}

td {
    padding: 1rem;
    border-top: 1px solid var(--surface-border);
    color: var(--text-secondary);
}

.highlight-row {
    background: rgba(59, 130, 246, 0.1);
    font-weight: 600;
}

.highlight-row td {
    color: var(--text-primary);
}

/* TCO Breakdown */
.tco-breakdown {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--surface-border);
}

.cost-item:last-child {
    border-bottom: none;
}

.cost-label {
    color: var(--text-secondary);
}

.cost-value {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'IBM Plex Mono', monospace;
}

.cost-item.highlight {
    background: rgba(59, 130, 246, 0.05);
    padding: 1rem;
    margin: 0.5rem -1rem;
    border-radius: 0.5rem;
}

.cost-item.total {
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--accent-blue);
    font-size: 1.25rem;
}

.cost-item.total .cost-value {
    color: var(--accent-blue);
    font-size: 1.5rem;
}

.tco-summary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(124, 58, 237, 0.1));
    border-radius: 1rem;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.tco-savings {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

/* Decision Matrix */
.decision-matrix {
    margin: 2rem 0;
}

.decision-list {
    list-style: none;
    padding: 0;
}

.decision-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
}

.decision-list.yes li {
    background: rgba(34, 197, 94, 0.1);
}

.decision-list.yes ion-icon {
    color: #22c55e;
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.decision-list.no li {
    background: rgba(239, 68, 68, 0.1);
}

.decision-list.no ion-icon {
    color: #ef4444;
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* Next Steps */
.next-steps {
    background: var(--surface-card);
    border: 2px solid var(--accent-blue);
    border-radius: 1rem;
    padding: 2rem;
    margin: 3rem 0;
}

.next-steps h3 {
    margin-top: 0;
    color: var(--accent-blue);
}

.next-steps ol {
    margin-bottom: 1.5rem;
}

.cta-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 700;
    transition: all 0.2s;
}

.cta-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Further Reading */
.further-reading {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--surface-border);
}

.related-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.related-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-blue);
}

.related-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-purple);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.related-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.related-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Responsive */
@media (min-width: 1400px) {
    .toc-sidebar {
        display: block;
    }
}

@media (max-width: 768px) {
    .article h1 {
        font-size: 2rem;
    }

    .content-section h2 {
        font-size: 1.75rem;
    }

    .content-section h3 {
        font-size: 1.5rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cost-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .decision-list li {
        flex-direction: column;
        gap: 0.5rem;
    }

    .related-articles {
        grid-template-columns: 1fr;
    }
}
