/* ==========================================================================
   Blog Styles (Premium & Dark Aesthetic)
   ========================================================================== */

/* 1. Blog Listing (Index) */
.blog-header {
    padding: 150px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 300px;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15), transparent 70%);
    z-index: -1;
}

.blog-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.blog-header p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding-bottom: 100px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
}

.blog-card-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--border-light);
}

.blog-card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-meta span {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.blog-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.3;
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.blog-card-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.blog-card-link:hover {
    color: var(--primary-light);
}

/* 2. Single Post Layout */
.post-header {
    padding: 150px 0 60px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-meta .tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
}

.post-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.post-hero-img {
    width: 100%;
    max-width: 1000px;
    height: 500px;
    object-fit: cover;
    border-radius: 24px;
    margin: 0 auto 60px;
    display: block;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-light);
}

.post-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.3rem;
    line-height: 1.9;
    color: var(--text-light);
    padding-bottom: 80px;
}

.post-content h2 {
    font-size: 2.2rem;
    margin: 3rem 0 1.5rem;
    color: #fff;
}

.post-content h3 {
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    color: #fff;
}

.post-content p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.post-content strong {
    color: #fff;
    font-weight: 600;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #fff;
    font-size: 1.25rem;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
}

.post-content th, .post-content td {
    padding: 1rem;
    border: 1px solid var(--border-light);
    text-align: left;
}

.post-content th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: #fff;
}

/* 3. Conversion CTA in Post */
.post-cta {
    margin: 4rem 0;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(10, 10, 20, 1) 100%);
    border: 1px solid var(--primary);
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.post-cta::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
}

.post-cta h3 {
    font-size: 2rem !important;
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
}

.post-cta p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* 4. Responsive adjustments */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2.5rem;
    }
    .post-title {
        font-size: 2.5rem;
    }
    .post-hero-img {
        height: 300px;
        border-radius: 16px;
        margin-bottom: 40px;
    }
    .post-content {
        font-size: 1.15rem;
        padding: 0 20px 60px;
    }
}

.post-image-inline {
    width: 100%;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
}
