/* ========================================
   BLOG STYLES - CLEAN & PROFESSIONAL
   ======================================== */

/* Hero Section */
.blog-hero {
    text-align: center;
    padding: 160px 20px 30px 20px;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.blog-hero h1 {
    font-size: 42px;
    margin: 0 0 15px;
    color: #1e293b;
}

.blog-hero p {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Controls Section */
.blog-controls {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.categories-wrapper {
    flex: 1;
}

.categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 10px 20px;
    border: 1px solid #4183AE;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4183AE;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cat-btn:hover {
    background: #4183AE;
    border-color: #4183AE;
    color:white;
}

.cat-btn.active {
    background: #4183AE;
    border-color: #4183AE;
    color: white;
}

.sort-wrapper {
    min-width: 200px;
}

.sort-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: white;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Featured Post */
.featured-section {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.featured-image {
    height: 100%;
    min-height: 350px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.featured-content {
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.featured-categories {
    margin-bottom: 15px;
}

.featured-title {
    font-size: 28px;
    margin: 0 0 15px;
    line-height: 1.3;
}

.featured-title a {
    color: #1e293b;
    text-decoration: none;
}

.featured-title a:hover {
    color: #2563eb;
}

.featured-excerpt {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.featured-meta {
    display: flex;
    gap: 20px;
    color: #64748b;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

/* Blog Grid */
.blog-section {
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

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

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

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

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
}

.blog-categories {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.category-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: capitalize;
    background: #f2f6f4;
    color: #7c7f7d;
}

/* Category Colors */
.category-accounting {
    background: #e0f2fe;
    color: #0369a1;
}
.category-business-management-software{
    background: #dcfce7;
    color: #166534;
}
.category-billing {
    background: #dcfce7;
    color: #166534;
}

.category-tax {
    background: #ffedd5;
    color: #9a3412;
}

.category-uncategorized {
    background: #f1f5f9;
    color: #475569;
}

.post-date {
    color: #64748b;
}

.blog-card-title {
    font-size: 16px;
    margin: 0 0 10px;
    line-height: 1.4;
    color: #1e293b;
}

.blog-card-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 15px;
}

.blog-card-footer {
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
}

.post-author {
    font-size: 12px;
    color: #94a3b8;
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
}

.load-more-btn {
    padding: 12px 35px;
    background: white;
    border: 2px solid #4183AE;
    color: #4183AE;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
}

.load-more-btn:hover {
    background: #4183AE;
    color: white;
}

.load-more-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #94a3b8;
    color: #94a3b8;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 60px;
    color: #64748b;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Responsive Design */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .blog-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .categories {
        justify-content: center;
    }
    
    .sort-wrapper {
        width: 100%;
    }
    
    .blog-hero h1 {
        font-size: 32px;
    }
    
    .featured-content {
        padding: 25px;
    }
    
    .featured-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card-image {
        height: 200px;
    }
}