/* Article-specific styles */

/* Global mobile viewport containment */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.article-header-content,
.article-image,
.article-layout,
.article-content {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Article Header */
.article-header {
    background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
    padding: 40px 0 60px;
}

.article-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    margin-bottom: 24px;
    font-size: 0.9rem;
    color: #666666;
}

.breadcrumb a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #000000;
}

.breadcrumb-separator {
    margin: 0 12px;
    color: #CCCCCC;
}

.breadcrumb-current {
    color: #000000;
    font-weight: 500;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.article-category {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
}

.article-category.critical {
    color: #E02424;
    border-color: #E02424;
    background-color: #FEF2F2;
}

.article-date {
    color: #888888;
    font-size: 0.9rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

.read-time {
    color: #888888;
    font-size: 0.85rem;
}

.article-title {
    font-family: "Inter var", Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    font-weight: 700;
    color: #000000;
}

.article-lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #444444;
    margin-bottom: 2rem;
    font-weight: 400;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tags .tag {
    background: #F5F5F5;
    color: #666666;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.article-tags .tag:hover {
    background: #E5E5E5;
    color: #000000;
}

/* Article Image */
.article-image-section {
    background: #FFFFFF;
    padding: 40px 0;
    border-bottom: 1px solid #E5E5E5;
}

.article-image {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.article-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid #E5E5E5;
}

.image-caption {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #666666;
    font-style: italic;
    line-height: 1.5;
}

/* Article Main */
.article-main {
    background: #FAFAFA;
    padding: 80px 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 60px;
    align-items: start;
}

.article-content {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 60px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E5E5;
    max-width: none;
}

.article-intro {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 2rem;
    padding: 24px;
    background: #F8F9FA;
    border-radius: 12px;
    border-left: 4px solid #000000;
}

.article-content h2 {
    font-family: "Inter var", Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 2rem;
    line-height: 1.3;
    margin: 3rem 0 1.5rem 0;
    color: #000000;
    font-weight: 700;
    scroll-margin-top: 100px;
}

.article-content h2:first-of-type {
    margin-top: 2rem;
}

.article-content h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 2.5rem 0 1rem 0;
    color: #000000;
    font-weight: 600;
    scroll-margin-top: 100px;
}

.article-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #444444;
    margin-bottom: 1.5rem;
}

.article-content code {
    background: #F5F5F5;
    color: #E02424;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    font-weight: 600;
}

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

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #444444;
}

/* Comparison Table Styles */
.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E5E5;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    min-width: 600px;
}

.comparison-table th {
    background: #F8F9FA;
    color: #000000;
    font-weight: 700;
    padding: 16px;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #E5E5E5;
}

.comparison-table td {
    padding: 16px;
    border-bottom: 1px solid #F0F0F0;
    vertical-align: middle;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: #FAFAFA;
}

.comparison-table tbody tr:hover {
    background-color: #F5F5F5;
}

/* Feature comparison checkmarks and crosses */
.comparison-table td:contains("✅") {
    color: #16A34A;
    font-weight: 600;
}

.comparison-table td:contains("❌") {
    color: #E02424;
    font-weight: 600;
}

/* Alert Boxes */
.alert {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid;
}

.alert-critical {
    background: #FEF2F2;
    border-left-color: #E02424;
}

.alert-info {
    background: #F0F9FF;
    border-left-color: #0EA5E9;
}

.alert-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 8px;
}

.alert-content p {
    margin-bottom: 0;
    font-size: 1rem;
}

.alert-content ul {
    margin-bottom: 0;
    margin-top: 12px;
}

/* Code blocks with copy functionality */
.code-block {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #E5E5E5;
}

.code-header {
    background: #F8F9FA;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #E5E5E5;
}

.code-title {
    font-weight: 600;
    color: #000000;
    font-size: 0.9rem;
}

.copy-code-btn {
    background: #000000;
    color: #FFFFFF;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    background: #333333;
    transform: translateY(-1px);
}

.code-block pre {
    background: #1E1E1E;
    color: #E5E5E5;
    padding: 20px;
    margin: 0;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.code-block code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
}

/* Stats grid for key metrics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 2rem;
    background: #F8F9FA;
    border-radius: 16px;
    border: 1px solid #E5E5E5;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E5E5;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #16A34A;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
}

.stat-label {
    font-size: 0.9rem;
    color: #666666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Enhanced link styling for VanishingVault references */
a[href*="vanishingvault.com"] {
    color: #16A34A;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

a[href*="vanishingvault.com"]:hover {
    border-bottom-color: #16A34A;
    background: rgba(22, 163, 74, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* Article Footer */
.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #F0F0F0;
}

.article-share {
    margin-bottom: 2rem;
}

.article-share h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #000000;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid;
}

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

.share-btn.twitter:hover {
    background: #1DA1F2;
    color: #FFFFFF;
}

.share-btn.linkedin {
    color: #0A66C2;
    border-color: #0A66C2;
    background: rgba(10, 102, 194, 0.1);
}

.share-btn.linkedin:hover {
    background: #0A66C2;
    color: #FFFFFF;
}

.share-btn.hackernews {
    color: #FF6600;
    border-color: #FF6600;
    background: rgba(255, 102, 0, 0.1);
}

.share-btn.hackernews:hover {
    background: #FF6600;
    color: #FFFFFF;
}

.article-updated {
    color: #666666;
    font-size: 0.9rem;
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
}

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

.toc-widget .table-of-contents li {
    margin-bottom: 8px;
}

.toc-widget .table-of-contents a {
    color: #666666;
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: color 0.2s ease;
    display: block;
    padding: 4px 0;
}

.toc-widget .table-of-contents a:hover {
    color: #000000;
}

.toc-widget .table-of-contents a.active {
    color: #000000;
    font-weight: 600;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.related-article {
    padding: 16px;
    background: #FAFAFA;
    border-radius: 12px;
    position: relative;
}

.related-article.coming-soon {
    opacity: 0.7;
}

.related-article h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 6px;
}

.related-article p {
    font-size: 0.85rem;
    color: #666666;
    line-height: 1.4;
    margin-bottom: 0;
}

.coming-soon-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #F59E0B;
    color: #000000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .sidebar-widget {
        margin-bottom: 0;
    }
    
    .article-content {
        padding: 50px 40px;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 30px 0 40px;
    }
    
    .article-header-content {
        padding: 0 20px;
        max-width: 100%;
    }
    
    .article-title {
        font-size: 2rem;
        line-height: 1.2;
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
        margin-bottom: 1rem;
    }
    
    .article-lead {
        font-size: 1rem;
        line-height: 1.5;
        overflow-wrap: break-word;
        word-wrap: break-word;
        margin-bottom: 1.5rem;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .article-category {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    
    .article-date, .read-time {
        font-size: 0.8rem;
    }
    
    .article-main {
        padding: 40px 0;
    }
    
    .article-layout {
        max-width: 100%;
        margin: 0;
        padding: 0 20px;
    }
    
    .article-content {
        padding: 30px 20px;
        margin: 0;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        border-radius: 12px;
    }
    
    .article-intro {
        font-size: 1rem;
        line-height: 1.6;
        padding: 20px;
        margin-bottom: 1.5rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin: 2rem 0 1rem 0;
        scroll-margin-top: 80px;
    }
    
    .article-content h2:first-of-type {
        margin-top: 1.5rem;
    }
    
    .article-content p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }
    
    .article-content code {
        font-size: 0.85em;
        padding: 2px 4px;
        word-break: break-all;
    }
    
    .article-content ul, .article-content ol {
        margin-bottom: 1.25rem;
        padding-left: 1.5rem;
    }
    
    .article-content li {
        margin-bottom: 0.4rem;
        line-height: 1.5;
        font-size: 0.95rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 20px;
        margin: 2rem 0;
    }
    
    .stat-number {
        font-size: 1.75rem;
        margin-bottom: 6px;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .alert {
        padding: 16px;
        gap: 12px;
        margin: 1.5rem 0;
    }
    
    .alert-icon {
        font-size: 1.25rem;
    }
    
    .alert-content h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    .alert-content p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .alert-content ul {
        margin-top: 8px;
        margin-bottom: 0;
    }
    
    .alert-content li {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .code-block {
        margin: 1.5rem 0;
        border-radius: 8px;
    }
    
    .code-header {
        padding: 12px 16px;
    }
    
    .code-title {
        font-size: 0.8rem;
    }
    
    .copy-code-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .code-block pre {
        padding: 16px;
        font-size: 0.8rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .code-block code {
        font-size: 0.8rem;
        line-height: 1.4;
        word-break: break-all;
        white-space: pre-wrap;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
    
    .article-footer {
        margin-top: 3rem;
        padding-top: 1.5rem;
    }
    
    .article-share h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .article-updated {
        font-size: 0.85rem;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .widget-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }
    
    .table-of-contents a {
        font-size: 0.85rem;
        padding: 6px 0;
    }
    
    .related-article {
        padding: 16px;
    }
    
    .related-article h4 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }
    
    .related-article p {
        font-size: 0.8rem;
    }
    
    .tool-link {
        padding: 14px;
    }
    
    .tool-content h4 {
        font-size: 0.9rem;
    }
    
    .tool-content p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 20px 0 30px;
    }
    
    .article-header-content {
        padding: 0 16px;
    }
    
    .article-title {
        font-size: 1.75rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }
    
    .article-lead {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.25rem;
    }
    
    .article-meta {
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .article-category {
        font-size: 0.7rem;
        padding: 3px 10px;
    }
    
    .article-date, .read-time {
        font-size: 0.75rem;
    }
    
    .article-main {
        padding: 30px 0;
    }
    
    .article-layout {
        padding: 0 16px;
    }
    
    .article-content {
        padding: 24px 16px;
        border-radius: 8px;
    }
    
    .article-intro {
        font-size: 0.95rem;
        line-height: 1.5;
        padding: 16px;
        margin-bottom: 1.25rem;
    }
    
    .article-content h2 {
        font-size: 1.35rem;
        line-height: 1.25;
        margin: 1.75rem 0 0.75rem 0;
    }
    
    .article-content h2:first-of-type {
        margin-top: 1.25rem;
    }
    
    .article-content p {
        font-size: 0.9rem;
        line-height: 1.55;
        margin-bottom: 1rem;
    }
    
    .article-content code {
        font-size: 0.8em;
        padding: 1px 3px;
    }
    
    .article-content ul, .article-content ol {
        margin-bottom: 1rem;
        padding-left: 1.25rem;
    }
    
    .article-content li {
        margin-bottom: 0.3rem;
        line-height: 1.5;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        margin: 1.5rem 0;
    }
    
    .stat-number {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .alert {
        padding: 14px;
        gap: 10px;
        margin: 1.25rem 0;
    }
    
    .alert-icon {
        font-size: 1.1rem;
    }
    
    .alert-content h3 {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .alert-content p {
        font-size: 0.85rem;
    }
    
    .alert-content li {
        font-size: 0.85rem;
        margin-bottom: 0.25rem;
    }
    
    .code-block {
        margin: 1.25rem 0;
        border-radius: 6px;
    }
    
    .code-header {
        padding: 10px 12px;
    }
    
    .code-title {
        font-size: 0.75rem;
    }
    
    .copy-code-btn {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    .code-block pre {
        padding: 12px;
        font-size: 0.75rem;
    }
    
    .code-block code {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .share-buttons {
        gap: 6px;
    }
    
    .share-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .article-footer {
        margin-top: 2.5rem;
        padding-top: 1.25rem;
    }
    
    .article-share h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .article-updated {
        font-size: 0.8rem;
    }
    
    .sidebar-widget {
        padding: 16px;
    }
    
    .widget-title {
        font-size: 1rem;
        margin-bottom: 14px;
    }
    
    .table-of-contents a {
        font-size: 0.8rem;
        padding: 4px 0;
    }
    
    .related-article {
        padding: 14px;
    }
    
    .related-article h4 {
        font-size: 0.9rem;
        margin-bottom: 3px;
    }
    
    .related-article p {
        font-size: 0.75rem;
    }
    
    .tool-link {
        padding: 12px;
    }
    
    .tool-icon {
        font-size: 1.25rem;
    }
    
    .tool-content h4 {
        font-size: 0.85rem;
    }
    
    .tool-content p {
        font-size: 0.75rem;
    }
}

/* Additional mobile-specific improvements */
@media (max-width: 320px) {
    .article-header-content {
        padding: 0 12px;
    }
    
    .article-layout {
        padding: 0 12px;
    }
    
    .article-content {
        padding: 20px 12px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-content h2 {
        font-size: 1.2rem;
    }
    
    .article-content p {
        font-size: 0.85rem;
    }
    
    .stats-grid {
        padding: 12px;
    }
    
    .alert {
        padding: 12px;
    }
    
    .code-block pre {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.875rem;
    }
    
    .article-content {
        padding: 32px 16px;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px;
        font-size: 0.8rem;
    }
    
    .alert {
        padding: 20px;
        gap: 12px;
    }
    
    .code-block pre {
        padding: 16px;
    }
}
