/* Blog Page Specific Styles */

/* ===== Loading State ===== */
.blog-loading,
.single-post-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    grid-column: 1 / -1;
}

.blog-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: blogSpin 0.7s linear infinite;
    margin-bottom: 1rem;
}

@keyframes blogSpin { to { transform: rotate(360deg); } }

.blog-loading p,
.single-post-loading p {
    color: var(--text);
    font-weight: 500;
}

/* ===== Empty / Error State ===== */
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}
.blog-empty i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}
.blog-empty h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
.blog-empty p {
    color: var(--text);
}

/* ===== Single Post Page ===== */
.single-post {
    max-width: 1400px;
    margin: 0 auto;
}

.post-hero {
    width: 100%;
    min-height: 450px;
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.post-hero-overlay {
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);
    padding: 4rem 5%;
}

.post-hero-content {
    max-width: 800px;
}

.post-category-tag {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.post-hero-content h1 {
    font-size: 2.75rem;
    color: white;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-meta-bar {
    display: flex;
    gap: 1.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.post-meta-bar i {
    margin-right: 6px;
}

/* Post Body */
.post-body {
    padding: 3rem 5%;
}

.post-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.post-content-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 3rem;
}

.post-content-text h2,
.post-content-text h3 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content-text p {
    margin-bottom: 1.25rem;
}

.post-content-text img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.post-content-text ul,
.post-content-text ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.post-content-text li {
    margin-bottom: 0.5rem;
}

.post-content-text blockquote {
    border-left: 4px solid var(--secondary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--primary);
}

/* Share */
.post-share {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    margin-bottom: 2rem;
}

.post-share p {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.post-share-links {
    display: flex;
    gap: 0.75rem;
}

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    color: white;
}

.share-btn.twitter { background: #0f172a; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.linkedin { background: #0077b5; }

.share-btn:hover {
    transform: translateY(-3px);
    opacity: 0.85;
}

/* Back Link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.back-to-blog:hover {
    color: var(--accent);
    transform: translateX(-4px);
}

/* Post Not Found */
.post-not-found {
    text-align: center;
    padding: 5rem 2rem;
}

.post-not-found h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.post-not-found p {
    color: var(--text);
    margin-bottom: 2rem;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .post-hero {
        min-height: 350px;
    }
    .post-hero-content h1 {
        font-size: 2rem;
    }
    .post-hero-overlay {
        padding: 3rem 5%;
    }
}

@media (max-width: 600px) {
    .post-hero {
        min-height: 280px;
    }
    .post-hero-content h1 {
        font-size: 1.6rem;
    }
    .post-body {
        padding: 2rem 5%;
    }
    .post-meta-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
}
