/* Medium-Style Blog Design - Consolidated */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    font-size: 1rem;
    font-weight: 400;
}

/* Medium-Style Container */
.medium-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Article Header */
.medium-header {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid #e6e6e6;
    margin-bottom: 40px;
}

.medium-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #333;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.medium-subtitle {
    font-size: 1.25rem;
    line-height: 1.4;
    color: #666;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.medium-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1.25rem;
}

.medium-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.medium-author-avatar {
    width: 32px;
    height: 32px;
    background: #242424;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.medium-category {
    background: #f0f0f0;
    color: #242424;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Article Content */
.medium-content {
    padding: 0 0 60px;
}

.medium-body {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

/* Typography */
.medium-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #333;
    margin: 2rem 0 1rem 0;
    letter-spacing: -0.01em;
}

.medium-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    margin: 1.5rem 0 0.75rem 0;
}

.medium-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    margin: 1.25rem 0 0.5rem 0;
}

.medium-body p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.medium-body p:last-child {
    margin-bottom: 0;
}

/* Lead paragraph */
.medium-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

/* Lists */
.medium-body ul,
.medium-body ol {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.medium-body ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.medium-body ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #333;
    font-weight: bold;
    font-size: 1rem;
}

.medium-body ol {
    counter-reset: item;
}

.medium-body ol li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    counter-increment: item;
}

.medium-body ol li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    color: #333;
    font-weight: 600;
}

/* Blockquotes */
.medium-body blockquote {
    border-left: 4px solid #333;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

/* Code blocks */
.medium-body code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 16px;
    color: #242424;
}

.medium-body pre {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 16px;
    line-height: 1.4;
}

.medium-body pre code {
    background: none;
    padding: 0;
    color: #242424;
}

/* Highlight boxes */
.medium-highlight {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    margin: 30px 0;
}

.medium-highlight h4 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #242424;
}

.medium-highlight p {
    margin-bottom: 16px;
    font-size: 19px;
    line-height: 1.5;
}

.medium-highlight p:last-child {
    margin-bottom: 0;
}

/* Statistics boxes */
.medium-stat {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 40px 0;
}

.medium-stat-number {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1;
}

.medium-stat-label {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 500;
}

/* Tables */
.medium-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 18px;
}

.medium-table th {
    background: #f8f9fa;
    color: #242424;
    font-weight: 600;
    padding: 16px 20px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.medium-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.medium-table tr:hover {
    background: #f8f9fa;
}

/* Call-to-action */
.medium-cta {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    text-align: center;
}

.medium-cta h3 {
    color: #0c4a6e;
    margin-bottom: 16px;
    font-size: 24px;
}

.medium-cta p {
    color: #0c4a6e;
    margin-bottom: 20px;
    font-size: 19px;
}

.medium-btn {
    display: inline-block;
    background: #242424;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
}

.medium-btn:hover {
    background: #000000;
    transform: translateY(-1px);
}

/* Blog Index Styles */
.blog-header {
    padding: 120px 0 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="300" fill="url(%23a)"/><circle cx="800" cy="300" r="200" fill="url(%23a)"/><circle cx="400" cy="700" r="250" fill="url(%23a)"/></svg>');
    opacity: 0.3;
}

.blog-header-content {
    position: relative;
    z-index: 1;
}

.blog-header-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.blog-header-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.blog-content {
    padding: 2rem;
}

.blog-category {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 1rem;
}

.blog-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #9ca3af;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.article-meta i {
    font-size: 0.8rem;
    width: 14px;
    text-align: center;
}

.blog-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.blog-link:hover {
    color: #1d4ed8;
}

.blog-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.blog-link:hover i {
    transform: translateX(2px);
}

/* Related articles */
.medium-related {
    background: #f8f9fa;
    padding: 60px 0;
    margin-top: 60px;
    border-top: 1px solid #e6e6e6;
}

.medium-related h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    color: #242424;
}

.medium-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 680px;
    margin: 0 auto;
}

.medium-related-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.medium-related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.medium-related-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.medium-related-card h3 a {
    color: #242424;
    text-decoration: none;
}

.medium-related-card h3 a:hover {
    color: #0ea5e9;
}

.medium-related-card p {
    color: #757575;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
    color: white;
}

.newsletter h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form button {
    background: #1a202c;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #2d3748;
}

/* Responsive Design */
@media (max-width: 768px) {
    .medium-container {
        padding: 0 1rem;
    }
    
    .medium-title {
        font-size: 2rem;
    }
    
    .medium-subtitle {
        font-size: 1.125rem;
    }
    
    .medium-body {
        font-size: 0.9rem;
    }
    
    .medium-body p {
        font-size: 0.9rem;
    }
    
    .medium-lead {
        font-size: 1rem;
    }
    
    .medium-body h2 {
        font-size: 1.5rem;
    }
    
    .medium-body h3 {
        font-size: 1.25rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .medium-related {
        display: none;
    }
    
    .medium-container {
        max-width: none;
    }
}