/* ===================================
   Blog Page Styles - African Learning Hub
   =================================== */

/* Blog Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #E67E22 0%, #D35400 100%);
    padding: 6rem 0 3rem;
    padding-top: calc(70px + 3rem);
    color: white;
    text-align: center;
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.blog-search {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.blog-search i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
}

.blog-search input {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-search input:focus {
    outline: none;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Blog Filters */
.blog-filters-section {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 70px;
    z-index: 99;
}

.blog-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: #E67E22;
    color: #E67E22;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #E67E22, #D35400);
    color: white;
    border-color: transparent;
}

/* Featured Posts */
.featured-posts {
    background: #f8f9fa;
    padding: 4rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.featured-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #E67E22, #D35400);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #F39C12;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: #666;
    font-size: 0.875rem;
}

.blog-category {
    display: inline-block;
    background: #E8F5E9;
    color: #27AE60;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
}

.blog-date,
.blog-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid #e0e0e0;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E67E22, #D35400);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.author-info h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: 0.8rem;
    color: #666;
}

/* Blog Grid */
.blog-posts {
    padding: 4rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #3498DB, #2980B9);
}

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

.blog-card .blog-title {
    font-size: 1.25rem;
    min-height: 3rem;
}

.blog-card .blog-excerpt {
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #E67E22;
    font-weight: 600;
    margin-top: 1rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

/* Blog Newsletter */
.blog-newsletter {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 4rem 0;
}

.newsletter-card {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-icon {
    font-size: 4rem;
    color: #E67E22;
    margin-bottom: 1.5rem;
}

.newsletter-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 1rem 2rem;
    border-radius: 50px;
    white-space: nowrap;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.no-results p {
    font-size: 1.1rem;
}

/* Tags */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.blog-tag {
    background: #f5f5f5;
    color: #666;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 0 3rem;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1rem;
    }
    
    .blog-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
    }
    
    .featured-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-title {
        font-size: 1.25rem;
    }
    
    .featured-content {
        padding: 1.25rem;
    }
    
    .blog-meta {
        font-size: 0.8rem;
        gap: 0.75rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .featured-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
