/* ========================================
   HCODX Blog Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #4361ee;
    --dark: #2c3e50;
    --light: #f8f9fa;
    --gray: #6c757d;
    --success: #28a745;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.blog-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow);
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.blog-header p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* Navigation */
.blog-nav {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.blog-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.blog-nav nav a {
    margin-left: 30px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* Main Content */
.blog-main {
    padding: 60px 0;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.25);
}

.article-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 0 20px;
    border-radius: 20px;
}

.article-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-content h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.article-content p {
    color: var(--gray);
    font-size: 1.05rem;
    margin-bottom: 20px;
    flex: 1;
}

.read-more {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    align-self: flex-start;
}

.read-more:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* Article Page */
.article-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 20px 40px;
    text-align: center;
}

.article-header .category-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.article-header h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.article-meta {
    opacity: 0.9;
    font-size: 1.05rem;
}

.article-body {
    background: white;
    padding: 60px;
    margin: 40px auto;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 3px 20px var(--shadow);
}

.article-body h2 {
    color: var(--dark);
    font-size: 2.2rem;
    margin: 50px 0 20px;
    font-weight: 700;
}

.article-body h3 {
    color: #34495e;
    font-size: 1.7rem;
    margin: 35px 0 15px;
    font-weight: 600;
}

.article-body p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-body ul, .article-body ol {
    margin: 25px 0 25px 35px;
}

.article-body li {
    margin-bottom: 12px;
    font-size: 1.08rem;
    line-height: 1.7;
}

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

.article-body code {
    background: #f4f4f4;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #e83e8c;
}

.article-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 25px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
}

.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-body blockquote {
    border-left: 5px solid var(--primary);
    padding-left: 25px;
    margin: 30px 0;
    font-style: italic;
    color: var(--gray);
    background: var(--light);
    padding: 20px 25px;
    border-radius: 0 8px 8px 0;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 10px;
    border-left: 5px solid var(--primary);
    margin: 30px 0;
}

.info-box h4 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 40px;
    margin: 50px 0;
    border-radius: 12px;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 18px 50px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Related Articles */
.related-articles {
    background: var(--light);
    padding: 40px;
    border-radius: 10px;
    margin: 50px 0;
}

.related-articles h3 {
    color: var(--dark);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.related-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.related-link {
    background: white;
    padding: 18px 25px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--primary);
    border: 2px solid var(--border);
    display: block;
    transition: all 0.3s ease;
    font-weight: 600;
}

.related-link:hover {
    border-color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

/* Footer */
.blog-footer {
    background: var(--dark);
    color: white;
    padding: 50px 20px;
    text-align: center;
    margin-top: 80px;
}

.blog-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.blog-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2.2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-body {
        padding: 30px 20px;
    }
    
    .article-header h1 {
        font-size: 2rem;
    }
    
    .blog-nav .container {
        flex-direction: column;
    }
    
    .blog-nav nav a {
        margin: 10px;
    }
}
