/* 
 * Blog Listing Page Styles
 * File: assets/css/blog/blog-listing.css
 */

/* Blog Hero Section */
.blog-hero-section {
    padding: 80px 0 60px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.blog-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h20v20H0z" fill="none"/><path d="M3 3h2v2H3zM8 8h2v2H8zM13 13h2v2h-2z" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.blog-hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.blog-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.blog-search-box input {
    width: 100%;
    padding: 18px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.blog-search-box input:focus {
    outline: none;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.blog-search-box input::placeholder {
    color: #94a3b8;
}

.blog-search-box .search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search-box .search-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

/* Blog Categories Filter */
.blog-categories-section {
    padding: 30px 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(248, 250, 252, 0.9);
}

.categories-filter {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-filter-btn {
    padding: 12px 24px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.category-filter-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.2);
}

.category-filter-btn i {
    font-size: 0.9rem;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

.section-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin-top: 10px;
    width: 100%;
}

.sort-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sort-select {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.sort-select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Featured Posts */
.featured-posts-section {
    padding: 60px 0;
    background: white;
}

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

.featured-post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    position: relative;
}

.featured-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: #e2e8f0;
}

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

.post-image-container {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge[class*="Trending"] {
    background: #ff4757;
    color: white;
}

.featured-badge[class*="Popular"] {
    background: #ffa502;
    color: white;
}

.featured-badge[class*="Essential"] {
    background: #2ed573;
    color: white;
}

.post-content {
    padding: 25px;
}

.post-category {
    display: inline-block;
    background: #f1f5f9;
    color: #4f46e5;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.featured-post-card:hover .post-title {
    color: #4f46e5;
}

.post-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f1f5f9;
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #475569;
    font-size: 0.9rem;
}

.post-date {
    font-size: 0.85rem;
    color: #94a3b8;
}

.post-stats {
    display: flex;
    gap: 20px;
}

.post-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.post-stats .stat i {
    font-size: 0.9rem;
}

/* All Posts Section */
.all-posts-section {
    padding: 60px 0;
    background: #f8fafc;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

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

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.post-card .post-image-container {
    height: 180px;
}

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

.post-card .post-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.post-card .post-excerpt {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    margin-bottom: 15px;
}

.post-card .post-meta {
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-card .post-date,
.post-card .read-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.post-card .post-date i,
.post-card .read-time i {
    font-size: 0.9rem;
}

/* No Results Message */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results-content i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.no-results-content h3 {
    font-size: 1.5rem;
    color: #475569;
    margin-bottom: 10px;
}

.no-results-content p {
    color: #94a3b8;
    margin-bottom: 20px;
}

.clear-search-btn {
    padding: 12px 30px;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 70, 229, 0.3);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 60px;
}

.load-more-btn {
    padding: 16px 40px;
    background: white;
    border: 2px solid #4f46e5;
    color: #4f46e5;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.load-more-btn:active {
    transform: translateY(-1px);
}

/* Newsletter Section */
.blog-newsletter-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

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

.newsletter-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.newsletter-content p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form .form-group {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto 15px;
}

.newsletter-input {
    flex: 1;
    padding: 16px 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.newsletter-input:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-subscribe {
    padding: 16px 30px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.form-note {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* Popular Categories */
.popular-categories-section {
    padding: 60px 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.category-card {
    background: #f8fafc;
    border-radius: 15px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    background: white;
    border-color: #4f46e5;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.1);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.category-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 5px;
}

.category-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.category-count {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-hero-title {
        font-size: 3rem;
    }
    
    .featured-posts-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 992px) {
    .blog-hero-title {
        font-size: 2.5rem;
    }
    
    .blog-stats {
        gap: 40px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-options {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .blog-hero-section {
        padding: 60px 0 40px;
    }
    
    .blog-hero-title {
        font-size: 2rem;
    }
    
    .blog-hero-subtitle {
        font-size: 1rem;
    }
    
    .blog-stats {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .categories-filter {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-filter-btn {
        white-space: nowrap;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .featured-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .btn-subscribe {
        width: 100%;
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 1.8rem;
    }
    
    .blog-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .post-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .load-more-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .blog-categories-section {
    background: rgba(30, 41, 59, 0.9);
    border-bottom-color: #334155;
}

[data-theme="dark"] .category-filter-btn {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .category-filter-btn:hover {
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .category-filter-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

[data-theme="dark"] .all-posts-section {
    background: #0f172a;
}

[data-theme="dark"] .post-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .post-card:hover {
    border-color: #475569;
}

[data-theme="dark"] .post-title {
    color: #e2e8f0;
}

[data-theme="dark"] .post-excerpt {
    color: #94a3b8;
}

[data-theme="dark"] .post-date,
[data-theme="dark"] .read-time {
    color: #64748b;
}

[data-theme="dark"] .featured-post-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .post-category {
    background: #334155;
    color: #c7d2fe;
}

[data-theme="dark"] .author-name {
    color: #cbd5e1;
}

[data-theme="dark"] .categories-grid .category-card {
    background: #1e293b;
}

[data-theme="dark"] .categories-grid .category-card:hover {
    background: #1e293b;
    border-color: #4f46e5;
}

[data-theme="dark"] .category-content p {
    color: #94a3b8;
}

[data-theme="dark"] .category-count {
    background: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .sort-select {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

[data-theme="dark"] .sort-select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] .load-more-btn {
    background: #1e293b;
    color: #cbd5e1;
}

[data-theme="dark"] .load-more-btn:hover {
    background: #4f46e5;
    color: white;
}