/* Article-specific styles for better typography and readability */

/* Article container */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    line-height: 1.7;
    color: #374151;
}

/* Article sections */
.article-content section {
    margin-bottom: 3rem;
}

.article-content section:last-child {
    margin-bottom: 0;
}

/* Article headings */
.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    margin-top: 0;
    line-height: 1.3;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.75rem;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    margin-top: 2rem;
    line-height: 1.4;
}

.article-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    line-height: 1.4;
}

/* Article paragraphs */
.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
}

.article-content p:last-child {
    margin-bottom: 0;
}

/* Article lists */
.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.article-content li:last-child {
    margin-bottom: 0;
}

/* Strong text */
.article-content strong {
    font-weight: 600;
    color: #1f2937;
}

/* Code elements */
.article-content code {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #dc2626;
    font-weight: 500;
}

/* Prism.js syntax highlighting integration */
.article-content pre[class*="language-"] {
    background: #2d3748 !important;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-content pre[class*="language-"] code {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    color: #e2e8f0 !important;
    font-weight: 400 !important;
    font-size: 0.875rem !important;
}

/* Override Prism theme colors for better integration */
.article-content .token.comment,
.article-content .token.prolog,
.article-content .token.doctype,
.article-content .token.cdata {
    color: #718096;
}

.article-content .token.punctuation {
    color: #e2e8f0;
}

.article-content .token.property,
.article-content .token.tag,
.article-content .token.boolean,
.article-content .token.number,
.article-content .token.constant,
.article-content .token.symbol,
.article-content .token.deleted {
    color: #f687b3;
}

.article-content .token.selector,
.article-content .token.attr-name,
.article-content .token.string,
.article-content .token.char,
.article-content .token.builtin,
.article-content .token.inserted {
    color: #68d391;
}

.article-content .token.operator,
.article-content .token.entity,
.article-content .token.url,
.article-content .language-css .token.string,
.article-content .style .token.string {
    color: #fbb6ce;
}

.article-content .token.atrule,
.article-content .token.attr-value,
.article-content .token.keyword {
    color: #63b3ed;
}

.article-content .token.function,
.article-content .token.class-name {
    color: #f6e05e;
}

.article-content .token.regex,
.article-content .token.important,
.article-content .token.variable {
    color: #f6ad55;
}

/* Article links */
.article-content a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: #5a67d8;
    border-bottom-color: #5a67d8;
}

.article-content a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid #667eea;
    background: #f8fafc;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4b5563;
}

/* Tables */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.article-content th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-content td {
    color: #374151;
}

.article-content tr:last-child td {
    border-bottom: none;
}

/* Definition lists */
.article-content dl {
    margin: 1.5rem 0;
}

.article-content dt {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.article-content dd {
    margin-bottom: 1rem;
    margin-left: 1rem;
    color: #374151;
}

/* Horizontal rules */
.article-content hr {
    border: none;
    height: 1px;
    background: #e5e7eb;
    margin: 2rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .article-content {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content h4 {
        font-size: 1.125rem;
    }
    
    .article-content p,
    .article-content li {
        font-size: 0.95rem;
    }
    
    .article-content ul,
    .article-content ol {
        padding-left: 1.25rem;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 1.25rem;
        margin: 0 0.5rem;
    }
    
    .article-content h2 {
        font-size: 1.375rem;
    }
    
    .article-content h3 {
        font-size: 1.125rem;
    }
    
    .article-content h4 {
        font-size: 1rem;
    }
    
    .article-content p,
    .article-content li {
        font-size: 0.9rem;
    }
    
    .article-content code {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .article-content pre[class*="language-"] {
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    .article-content pre[class*="language-"] code {
        font-size: 0.8rem !important;
    }
}

/* CTA Button Styles */
.article-content .cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.125rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: none;
    cursor: pointer;
    margin: 1.5rem 0;
    min-width: 200px;
}

.article-content .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white !important;
    text-decoration: none;
}

.article-content .cta-button:active {
    transform: translateY(0);
}

.article-content .cta-button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.cta-container {
    text-align: center;
    margin: 2rem 0;
}

.cta-container.centered {
    margin: 3rem 0;
}

/* Responsive CTA adjustments */
@media (max-width: 768px) {
    .article-content .cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .article-content .cta-button {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        min-width: 160px;
    }
}

/* Print styles */
@media print {
    .article-content {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .article-content a {
        color: #000;
        text-decoration: underline;
    }
    
    .article-content code {
        background: #f5f5f5;
        border: 1px solid #ddd;
    }
    
    .article-content .cta-button {
        background: #f0f0f0;
        color: #000 !important;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
