/* Article Styles - MakersDeck */
/* Uses variables from styles.css */

.article-container {
    width: 100%;
    color: var(--text-secondary);
    line-height: 1.8;
}

.article-header {
    margin-bottom: 50px;
    text-align: center;
    padding-top: 20px;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-header h1 {
    font-size: 42px;
    margin-bottom: 20px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.2;
}

.article-meta {
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 25px;
}

.article-hero-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 24px;
    margin-bottom: 50px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-card);
    background: #f8fafc;
}

.article-content {
    background: var(--bg-card);
    padding: 50px;
    border-radius: 24px;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.article-content h2 {
    color: var(--accent-primary);
    margin-top: 60px;
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
    border-bottom: 2px solid var(--bg-dark-soft);
    padding-bottom: 10px;
}

.article-content h3 {
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 18px;
    font-size: 24px;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 25px;
    font-size: 18px;
    color: var(--text-secondary);
}

.article-content ul,
.article-content ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 12px;
    font-size: 18px;
    color: var(--text-secondary);
}

.article-content code {
    background: var(--bg-dark-soft);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--accent-primary);
    font-family: 'Consolas', monospace;
    font-size: 0.9em;
    font-weight: 600;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    margin: 30px auto;
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
}

.article-content pre {
    background: var(--bg-dark-soft);
    color: #e0e6ff;
    padding: 30px;
    border-radius: 16px;
    overflow-x: auto;
    border: 1px solid rgba(30, 58, 138, 0.2);
    margin: 35px 0;
    font-family: 'Consolas', monospace;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-card {
    background: var(--bg-container);
    border: 1px solid var(--border-card);
    padding: 35px;
    border-radius: 24px;
    margin: 45px 0;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease;
}

.content-card:hover {
    transform: scale(1.01);
}

.content-card h3 {
    color: var(--accent-primary);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
}

.comparison-table-wrapper {
    width: 100%;
    margin: 35px 0;
    border-radius: 16px;
    border: 1px solid var(--border-card);
    overflow: hidden;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-page);
}

@media (max-width: 600px) {
    .comparison-table-wrapper {
        border: 1px solid var(--border-card);
        border-radius: 10px;
        max-width: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .comparison-table {
        display: table;
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }

    .comparison-table thead {
        display: table-header-group;
    }

    .comparison-table tbody {
        display: table-row-group;
    }

    .comparison-table thead tr {
        position: static;
        display: table-row;
        background: var(--accent-primary);
    }

    .comparison-table th {
        display: table-cell;
        width: 50%;
        padding: 12px 10px;
        font-size: 11px;
        color: #fff;
        text-align: center;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-sizing: border-box;
    }

    .comparison-table tr {
        display: table-row;
        margin: 0;
        border: none;
        border-radius: 0;
        background: #fff;
        box-shadow: none;
        transition: none;
        overflow: visible;
        max-width: none;
    }

    .comparison-table tr:hover {
        transform: none;
        box-shadow: none;
        background: #fff;
    }

    .comparison-table td {
        display: table-cell;
        width: 50%;
        padding: 12px 10px;
        font-size: 13px;
        text-align: left;
        vertical-align: top;
        border: 1px solid #e2e8f0;
        color: var(--text-primary);
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.5;
        box-sizing: border-box;
    }

    .comparison-table td:first-child {
        background: #f8fafc;
    }

    .comparison-table td:last-child {
        border-bottom: 1px solid #e2e8f0;
    }

    .comparison-table td::before {
        display: none;
        content: none;
    }
}

.comparison-table th,
.comparison-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--bg-dark-soft);
}

.comparison-table th {
    background: var(--bg-dark-medium);
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.comparison-table td {
    color: var(--text-secondary);
}

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

.highlight-box {
    background: rgba(72, 187, 120, 0.08);
    border: 1px solid rgba(72, 187, 120, 0.2);
    padding: 30px;
    border-radius: 16px;
    margin: 40px 0;
}

.highlight-box.warning {
    background: rgba(237, 137, 54, 0.08);
    border-color: rgba(237, 137, 54, 0.2);
}

.diagram-container {
    text-align: center;
    margin: 50px 0;
    padding: 20px;
    background: var(--bg-page);
    border-radius: 20px;
    border: 1px solid var(--border-card);
}

.diagram-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.diagram-caption {
    color: var(--text-muted);
    font-size: 15px;
    margin-top: 20px;
    font-style: italic;
}

@media (max-width: 768px) {
    .article-content {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .article-header h1 {
        font-size: 30px;
    }

    .article-hero-image {
        height: 280px;
        border-radius: 16px;
    }

    .article-content h2 {
        font-size: 26px;
    }

    .article-content p,
    .article-content li {
        font-size: 16px;
    }
}