/* ═══════════════════════════════════════════════════
   BLOG STYLES
   ═══════════════════════════════════════════════════ */

/* ─── Blog Header ───────────────────────────────── */
.blog-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 80px 20px 50px;
    text-align: center;
}

.blog-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.blog-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ─── Blog Listing ──────────────────────────────── */
.blog-listing {
    padding: 50px 20px 60px;
    background: #f8fafc;
}

.blog-listing-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 1rem;
}

/* Grid container */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tablet: 2 columns */
@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Card */
.blog-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Image container — locked aspect ratio */
.blog-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder when no image */
.blog-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
}

/* Card content */
.blog-card-content {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-content h2 {
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 0 0 12px;
    font-weight: 600;
}

.blog-card-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 16px;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #777;
    margin-top: auto;
}

/* ─── Blog CTA Section ──────────────────────────── */
.blog-cta {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 60px 20px;
    text-align: center;
}

.blog-cta h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 10px;
}

.blog-cta p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

/* ─── Article Page ──────────────────────────────── */
.article-page {
    padding: 80px 20px 50px;
    background: #fff;
}

.article-inner {
    max-width: 740px;
    margin: 0 auto;
}

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.article-breadcrumb a:hover {
    text-decoration: underline;
}

.article-breadcrumb span:last-child {
    color: #64748b;
}

/* Article Header */
.article-header {
    margin-bottom: 30px;
}

.article-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.article-meta {
    display: flex;
    gap: 18px;
    font-size: 0.85rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

/* Featured Image */
.article-featured-image {
    margin-bottom: 36px;
    border-radius: 14px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.article-content {
    font-size: 1.05rem;
    color: #334155;
    line-height: 1.8;
}

.article-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #0f172a;
    margin-top: 40px;
    margin-bottom: 16px;
    text-align: left;
}

.article-content h3 {
    font-size: 1.2rem;
    color: #1e293b;
    margin-top: 30px;
    margin-bottom: 12px;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 18px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 6px;
}

.article-content blockquote {
    border-left: 4px solid #3498db;
    padding: 16px 20px;
    margin: 24px 0;
    background: #f1f5f9;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #475569;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.article-content a {
    color: #3498db;
    text-decoration: underline;
}

.article-content a:hover {
    color: #2980b9;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.article-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #e74c3c;
}

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

/* Article Footer Actions */
.article-footer-actions {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.article-back-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.article-back-link:hover {
    text-decoration: underline;
}

/* Related Posts */
.related-posts {
    padding: 50px 20px;
    background: #f8fafc;
}

.related-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.related-posts h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #0f172a;
    margin-bottom: 24px;
    text-align: center;
}

/* ─── Admin Blog Styles ─────────────────────────── */
.status-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-published {
    background: #d5f5e3;
    color: #27ae60;
}

.status-draft {
    background: #fef9e7;
    color: #f39c12;
}

/* ─── Landing Blog Section ──────────────────────── */
.blog-preview {
    padding: 80px 20px;
    background: #f8fafc;
}

.blog-preview .section-inner {
    max-width: 1100px;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
}

.blog-preview .blog-card-image {
    height: 180px;
}

.blog-preview-more {
    text-align: center;
    margin-top: 32px;
}

.blog-preview-more a {
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

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

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .blog-header {
        padding: 70px 16px 40px;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid-sm {
        grid-template-columns: 1fr;
    }

    .blog-card-featured {
        grid-template-columns: 1fr;
    }

    .blog-card-featured .blog-card-image {
        min-height: 200px;
    }

    .blog-card-featured .blog-card-content {
        padding: 20px;
    }

    .blog-card-featured .blog-card-content h2 {
        font-size: 1.2rem;
    }

    .blog-preview-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.7rem;
    }

    .article-content {
        font-size: 0.95rem;
    }

    .article-page {
        padding: 70px 16px 40px;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.6rem;
    }

    .article-header h1 {
        font-size: 1.4rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 6px;
    }
}
