/* Article-specific styles */
.article-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.article {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.article-header {
    padding: 3rem 3rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.article-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.article-date,
.article-read-time {
    opacity: 0.8;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-excerpt {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
}

.article-content {
    padding: 3rem;
    line-height: 1.7;
    font-size: 1.125rem;
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #374151;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #4b5563;
}

.article-content code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #e11d48;
}

.article-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.tag {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background: #d1d5db;
}

/* Article Ad Styles */
.ad-article-top .ad-banner {
    max-width: 728px;
    min-height: 90px;
    margin: 2rem auto;
}

.ad-article-middle .ad-banner {
    max-width: 300px;
    min-height: 250px;
    margin: 2rem auto;
}

/* Sidebar Styles */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ad-sidebar .ad-banner {
    max-width: 300px;
    min-height: 250px;
}

.sidebar-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.sidebar-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article {
    display: block;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-article:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.related-article h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
    line-height: 1.4;
}

.related-article p {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

.sidebar-newsletter {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-newsletter input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
}

.sidebar-newsletter input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.sidebar-newsletter .btn {
    padding: 0.75rem;
    font-size: 0.875rem;
    text-align: center;
}

/* Responsive Design for Articles */
@media (max-width: 1024px) {
    .article-main {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-sidebar {
        order: -1;
    }
    
    .sidebar-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .article-main {
        padding: 100px 15px 60px;
    }
    
    .article-header {
        padding: 2rem 1.5rem 1.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-content {
        padding: 2rem 1.5rem;
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
    
    .article-content pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-content {
        padding: 1.5rem 1rem;
    }
    
    .article-content pre {
        padding: 0.75rem;
        font-size: 0.75rem;
    }
    
    .sidebar-section {
        padding: 1rem;
    }
}

/* Code Syntax Highlighting */
.article-content pre code .keyword {
    color: #f472b6;
}

.article-content pre code .string {
    color: #34d399;
}

.article-content pre code .number {
    color: #fbbf24;
}

.article-content pre code .comment {
    color: #6b7280;
    font-style: italic;
}

.article-content pre code .function {
    color: #a78bfa;
}

.article-content pre code .variable {
    color: #60a5fa;
}

/* Print Styles for Articles */
@media print {
    .article-main {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .article-sidebar,
    .ad-container {
        display: none;
    }
    
    .article {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
    
    .article-header {
        background: none;
        color: black;
        border-bottom: 2px solid #e5e7eb;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .article-content pre {
        background: #f9fafb;
        color: black;
        border: 1px solid #e5e7eb;
    }
}
