/* ===== BLOG STYLES ===== */
/* Updated to match MicroForge branding guidelines */

/* Blog Header Section */
.blog-header {
    background: var(--primary-dark);
    color: var(--primary-white);
    text-align: center;
    padding: 140px 20px 80px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 28, 63, 0.85) 0%, rgba(10, 28, 63, 0.85) 100%);
    pointer-events: none;
    z-index: 0;
}

.blog-header .container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.blog-header h1 {
    font-family: var(--font-header);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-white);
    margin: 0 0 25px 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.blog-header p {
    font-family: var(--font-body);
    font-size: 1.3rem;
    color: var(--primary-white);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Blog Content */
.blog-content {
    padding: 60px 0;
    background: #ecf0f1;
    min-height: 80vh;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

.blog-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Blog Posts Grid */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #ecf0f1;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: 460px;
    display: flex;
    flex-direction: column;
    background: white;
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(255, 99, 71, 0.1);
    border-color: #ff6347;
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f9fa;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff6347; /* Primary color instead of blue */
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.blog-card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    min-height: 0;
}

.blog-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.3;
    color: #0A1C3F;
    flex-shrink: 0;
}

.blog-card-title a {
    color: #0A1C3F;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a:hover {
    color: #ff6347;
}

.blog-card-excerpt {
    color: #7f8c8d;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 0;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: #7f8c8d;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blog-card-date,
.blog-card-reading-time {
    white-space: nowrap;
    flex-shrink: 0;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    flex-shrink: 0;
}

.tag {
    background: rgba(255, 99, 71, 0.1);
    color: #ff6347;
    padding: 4px 10px;
    border-radius: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin-top: 60px;
    padding: 30px 0;
}

.pagination-btn {
    background: #ff6347;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #e55a3f;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #0A1C3F;
    font-size: 1.1rem;
}

/* Loading and no posts states */
.loading, .no-posts {
    text-align: center;
    padding: 80px 20px;
    color: #7f8c8d;
    font-family: 'Poppins', sans-serif;
}

.loading {
    font-size: 1.1rem;
}

.no-posts {
    font-size: 1rem;
}

.no-posts-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    opacity: 0.5;
}

.no-posts h3 {
    color: #0A1C3F;
    margin: 0 0 20px 0;
    font-family: 'Montserrat', sans-serif;
}

/* Error States */
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
    font-family: 'Poppins', sans-serif;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.error-message h3 {
    color: #ff6347;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
}

.retry-btn {
    background: #ff6347;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.3);
    background: #e55a3f;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Blog page container styling */
.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    background: white;
}

.blog-content {
    background: white;
}

.blog-header {
    text-align: center;
    margin-bottom: 60px;
}

.blog-header h1 {
    font-family: var(--font-header);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-white);
    margin: 0 0 25px 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.blog-header p {
    font-family: var(--font-body);
    font-size: 1.3rem;
    color: var(--primary-white);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Responsive adjustments for 3x3 grid */
@media (max-width: 1024px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 35px;
        max-width: 900px;
    }
    
    .blog-container {
        padding: 50px 20px;
    }
    
    .blog-header {
        margin-bottom: 50px;
    }
    
    .blog-card {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }
    
    .blog-card {
        height: auto;
        min-height: 400px;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .blog-container {
        padding: 40px 15px;
    }
    
    .blog-header {
        margin-bottom: 40px;
    }
    
    .blog-header h1 {
        font-size: 2.5rem;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .blog-card-excerpt {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }
    
    .blog-card-meta {
        gap: 12px;
        margin-bottom: 12px;
        font-size: 0.75rem;
    }
    
    .blog-card-tags {
        gap: 6px;
    }
    
    .tag {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .pagination {
        margin-top: 50px;
        padding: 25px 0;
    }
}
