/* Blog Page Styles */
.blog-listing {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem 15px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .blog-listing {
        gap: 2.5rem;
        padding: 4rem 15px;
    }
}

.blog-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.blog-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .blog-content {
        padding: 2rem;
    }
}

.blog-meta {
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-category {
    background: rgba(10, 25, 47, 0.08);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-date {
    font-size: 0.85rem;
    color: #777;
}

.blog-listing h2 {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--primary-color);
}

.blog-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.2rem;
    border-top: 1px solid #eee;
}

.blog-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
}

.read-more {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.read-more:hover {
    padding-left: 5px;
}

/* Blog Hero and Detail specific styles */
.blog-hero {
    text-align: center;
    padding: clamp(3rem, 10vw, 5rem) 15px;
    background: linear-gradient(135deg, #0a192e 0%, #172a45 100%);
    color: #fff;
}

.blog-hero h1 {
    color: #fff;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: clamp(1rem, 3vw, 1.25rem);
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

.single-blog {
    max-width: 850px;
    margin: 0 auto;
    padding: 2rem 15px;
}

@media (min-width: 768px) {
    .single-blog {
        padding: 4rem 15px;
    }
}

.blog-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.blog-body p {
    margin-bottom: 1.5rem;
}

.related-posts {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid #f0f0f0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.related-post {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.related-post h4 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.read-related {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

/* Final Fix for Blog Detail Layout - Resetting Stacking Contexts */
.single-blog {
    display: block !important;
    position: relative !important;
    overflow: visible !important;
}

.blog-header {
    position: relative !important;
    top: auto !important;
}

.blog-featured-image {
    position: relative !important;
    display: block !important;
    height: auto !important;
    width: 100% !important;
    margin-bottom: 2rem !important;
}

.blog-featured-image img {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
}

.blog-body {
    position: relative !important;
    display: block !important;
    background: #fff;
}