/* ============================================
   Article/Blog Post Styles
   Specific styling for individual blog posts
   ============================================ */

/* Article Container */
.article-container {
    padding: 2rem 0 4rem;
    background: var(--bg-primary);
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    margin-top: 2rem;
}

.article-main {
    min-width: 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Article Header */
.article-header {
    margin-bottom: 3rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.article-category {
    background: rgba(191, 255, 0, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-weight: 600;
}

.article-header h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.article-lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(191, 255, 0, 0.03);
    border-left: 3px solid var(--primary);
}

.article-image {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    margin-bottom: 2rem;
}

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

/* Table of Contents */
.table-of-contents {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.table-of-contents h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.75rem;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 4px;
}

.table-of-contents a:hover {
    color: var(--primary);
    background: rgba(191, 255, 0, 0.05);
    padding-left: 1rem;
}

.table-of-contents a::before {
    content: "→";
    color: var(--primary);
}

/* Article Content */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content section {
    margin-bottom: 3rem;
}

.article-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-subtle);
}

.article-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.article-content h4 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(191, 255, 0, 0.3);
    transition: all 0.3s ease;
}

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

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

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

.article-content li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* Callout Boxes */
.callout {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border: 1px solid;
}

.callout-icon {
    flex-shrink: 0;
    font-size: 1.5rem;
}

.callout-definition {
    background: rgba(191, 255, 0, 0.05);
    border-color: rgba(191, 255, 0, 0.2);
}

.callout-important {
    background: rgba(255, 159, 10, 0.05);
    border-color: rgba(255, 159, 10, 0.2);
}

.callout-insight {
    background: rgba(0, 170, 255, 0.05);
    border-color: rgba(0, 170, 255, 0.2);
}

/* Formula Box */
.formula-box {
    background: var(--bg-secondary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.formula {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 600;
}

/* Calculation List */
.calculation-list {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    list-style: none;
}

.calculation-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.calculation-list li:last-child {
    border-bottom: none;
    font-weight: 600;
    color: var(--text-primary);
}

.highlight {
    color: var(--primary);
    font-weight: 700;
}

/* Data Box */
.data-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.data-box h4 {
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.threshold-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.threshold {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(191, 255, 0, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
}

.threshold-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.threshold-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.threshold-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 3rem;
    margin: 2rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -2.375rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 1rem 1.5rem;
}

.timeline-content strong {
    color: var(--primary);
}

/* Comparison Table */
.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.comparison-table th {
    background: rgba(191, 255, 0, 0.05);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-subtle);
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* App Showcase */
.app-showcase {
    background: linear-gradient(135deg, rgba(191, 255, 0, 0.1) 0%, rgba(191, 255, 0, 0.03) 100%);
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.app-showcase-content h4 {
    margin-top: 0;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.check-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.check-list li {
    padding-left: 0;
    margin-bottom: 0.5rem;
}

.app-showcase .btn-primary {
    display: inline-block;
    font-size: 1rem;
    font-weight: 700;
    color: #0A1129;
    background: #BFFF00;
    position: relative;
    z-index: 1;
}

/* FAQ Section */
.faq-section {
    margin-top: 4rem;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.faq-item h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary);
}

.faq-item p {
    margin-bottom: 0;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-subtle);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.related-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.related-card:hover {
    border-color: var(--border-strong);
    transform: translateY(-4px);
}

.related-category {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
}

.related-card h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin: 0;
}

.related-link {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    margin: 3rem 0;
}

.author-avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 80px;
    height: 80px;
    background: rgba(191, 255, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.author-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.author-content p {
    margin-bottom: 1.5rem;
}

.author-cta {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Share Section */
.share-section {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.share-section h4 {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-subtle);
}

.share-twitter {
    background: rgba(29, 161, 242, 0.1);
    color: #1da1f2;
}

.share-reddit {
    background: rgba(255, 69, 0, 0.1);
    color: #ff4500;
}

.share-linkedin {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
}

.share-copy {
    background: rgba(191, 255, 0, 0.1);
    color: var(--primary);
}

.share-btn:hover {
    transform: translateY(-2px);
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.sidebar-cta-sticky {
    background: linear-gradient(135deg, rgba(191, 255, 0, 0.1) 0%, rgba(191, 255, 0, 0.03) 100%);
    border: 2px solid var(--primary);
}

.cta-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(191, 255, 0, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 968px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .article-sidebar {
        position: static;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-image {
        height: 250px;
    }

    .threshold-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .author-bio {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .article-content {
        font-size: 1rem;
    }

    .article-header h1 {
        font-size: 1.75rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.25rem;
    }

    .threshold-grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 2rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }
}
