/* Blog Styles - Unified with Main Site Theme */

/* Import color variables from main theme */
:root {
    /* Core Colors - Emerald & Amber */
    --emerald-50: #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-200: #a7f3d0;
    --emerald-300: #6ee7b7;
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-700: #047857;
    
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    
    /* Neutral Colors */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: var(--slate-900);
    --text-secondary: var(--slate-700);
    --text-muted: var(--slate-500);
    --border-default: rgba(226, 232, 240, 0.8);
    --border-hover: rgba(203, 213, 225, 1);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation (Same as main site) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-default);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--emerald-400) 0%, var(--emerald-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu a {
    padding: 0.5rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--emerald-600);
    background: rgba(16, 185, 129, 0.08);
}

.nav-menu a.active {
    color: var(--emerald-600);
    background: rgba(16, 185, 129, 0.1);
    font-weight: 600;
}

/* Blog Header - Light Theme */
.blog-header {
    background: linear-gradient(135deg, var(--emerald-50) 0%, var(--amber-50) 100%);
    padding: 60px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-default);
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, var(--emerald-400) 0%, transparent 40%),
        radial-gradient(circle at 75% 75%, var(--amber-400) 0%, transparent 40%);
    opacity: 0.05;
    pointer-events: none;
}

.blog-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--amber-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 0.6s ease;
}

.blog-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease;
}

/* Blog Container */
.blog-container {
    padding: 60px 0 100px;
    background: var(--bg-primary);
    min-height: 60vh;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0 20px;
}

/* Blog Card - Matching main site style */
.blog-card {
    background: white;
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--emerald-400);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.12);
}

.blog-card-content {
    padding: 30px;
}

.blog-card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card-title a:hover {
    color: var(--emerald-600);
}

.blog-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-date::before {
    content: '📅';
    font-size: 0.9rem;
}

.blog-category {
    background: linear-gradient(135deg, var(--emerald-100) 0%, var(--amber-100) 100%);
    color: var(--emerald-700);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.blog-excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald-600);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 12px;
    color: var(--emerald-700);
}


/* Featured Posts */
.featured-posts {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(245, 158, 11, 0.02) 100%);
    padding: 60px 0;
    margin-bottom: 60px;
    border-bottom: 1px solid var(--border-default);
}

.featured-posts h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-primary);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.featured-card {
    background: white;
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    padding: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--amber-500) 100%);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.featured-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--amber-400) 0%, var(--amber-600) 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Blog Detail Page */
.blog-detail-header {
    background: linear-gradient(135deg, var(--emerald-50) 0%, var(--amber-50) 100%);
    padding: 120px 0 60px;
    margin-top: 80px;
    border-bottom: 1px solid var(--border-default);
}

.blog-detail-title {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.blog-detail-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
    line-height: 1.2;
}

.blog-detail-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.blog-content,
.post-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    background: white;
    border-radius: 1rem;
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-default);
}

.blog-content h2,
.post-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--text-primary);
    position: relative;
    padding-left: 20px;
}

.blog-content h2::before,
.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--emerald-500) 0%, var(--amber-500) 100%);
}

.blog-content h3,
.post-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--text-primary);
}

.blog-content p,
.post-content p {
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.blog-content ul,
.blog-content ol,
.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 30px;
    color: var(--text-secondary);
}

.blog-content li,
.post-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.blog-content blockquote,
.post-content blockquote {
    border-left: 4px solid var(--emerald-500);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 0.5rem;
}

.blog-content code,
.post-content code {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--emerald-700);
}

.blog-content pre,
.post-content pre {
    background: var(--slate-900);
    color: var(--slate-100);
    padding: 20px;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 30px 0;
}

.blog-content pre code,
.post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.blog-content img,
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
}

/* Post Header */
.post-header {
    max-width: 800px;
    margin: 80px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.post-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--amber-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Related Posts Section */
.related-posts {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.related-posts h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-primary);
}

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

.related-card {
    background: white;
    padding: 30px;
    border-radius: 1rem;
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--emerald-500);
}

.related-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.related-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-card h3 a:hover {
    color: var(--emerald-500);
}

.related-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.related-link {
    color: var(--emerald-500);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.related-link:hover {
    gap: 10px;
}

/* Blog CTA Section */
.blog-cta {
    background: linear-gradient(135deg, var(--emerald-50) 0%, var(--amber-50) 100%);
    padding: 60px 40px;
    border-radius: 1.5rem;
    text-align: center;
    max-width: 800px;
    margin: 60px auto;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.1);
}

.blog-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--amber-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-cta p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.blog-cta .btn-primary {
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Author Section */
.author-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(245, 158, 11, 0.02) 100%);
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    padding: 30px;
    margin-top: 60px;
    display: flex;
    gap: 30px;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald-400) 0%, var(--amber-400) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.author-info h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.author-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Back to Blog Button */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: white;
    border: 1px solid var(--border-default);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-to-blog:hover {
    background: var(--bg-secondary);
    color: var(--emerald-600);
    transform: translateX(-5px);
}

.back-to-blog::before {
    content: '←';
    font-size: 1.2rem;
}

/* Footer (Same as main site) */
.footer {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, white 100%);
    border-top: 1px solid var(--border-default);
    padding: 60px 0 30px;
    margin-top: 100px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--emerald-500) 0%, var(--amber-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-info p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 30px;
    border-top: 1px solid var(--border-default);
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-detail-title h1 {
        font-size: 1.8rem;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .author-section {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .nav-menu {
        display: none;
    }
}