/* ==================== BLOG PAGE TEMPLATE STYLES ==================== */

.blog-page-container {
    background: #f8fafc;
    min-height: 100vh;
}

/* ==================== HERO SECTION ==================== */

.blog-page-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.blog-page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Hero Search */
.hero-search {
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-search-form {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.hero-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
}

.hero-search-button {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.hero-search-button:hover {
    transform: scale(1.1);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ==================== SECTION STYLES ==================== */

.featured-posts-section,
.latest-posts-section,
.popular-posts-section,
.topics-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #64748b;
}

/* ==================== FEATURED POSTS ==================== */

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

.featured-post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

.featured-post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-post-card.featured {
    grid-column: span 2;
}

.featured-post-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.featured-post-card.featured .featured-post-image {
    height: 350px;
}

.featured-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.featured-post-card:hover .featured-thumbnail {
    transform: scale(1.1);
}

.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.featured-post-content {
    padding: 2rem;
}

.post-category {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.featured-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

.featured-post-title a:hover {
    color: #6366f1;
}

.featured-post-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.featured-post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==================== CATEGORY FILTER ==================== */

.category-filter-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.category-filter-wrapper {
    text-align: center;
}

.filter-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.category-filter {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-filter:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.category-filter.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
}

.category-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-filter.active .category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== LATEST POSTS ==================== */

.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e2e8f0;
}

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

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

.blog-post-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-post-card:hover .blog-post-thumbnail {
    transform: scale(1.05);
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-post-content {
    padding: 1.5rem;
}

.blog-post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.meta-date,
.meta-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-post-title a:hover {
    color: #6366f1;
}

.blog-post-excerpt {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.blog-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.read-more-btn {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

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

.read-time {
    color: #94a3b8;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

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

.load-more-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.load-more-btn.loading .btn-text {
    display: none;
}

.load-more-btn.loading .fa-spinner {
    display: inline-block;
}

.load-more-btn .fa-spinner {
    display: none;
}

/* No Posts Message */
.no-posts-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    grid-column: 1 / -1;
}

.no-posts-message i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.no-posts-message h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.no-posts-message p {
    color: #64748b;
}

/* ==================== POPULAR POSTS ==================== */

.popular-posts-section {
    background: white;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.popular-posts-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.popular-post-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    transition: all 0.3s;
    border: 1px solid #e2e8f0;
}

.popular-post-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.popular-post-rank {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.popular-post-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
    min-width: 0;
}

.popular-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.popular-post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.popular-post-title a:hover {
    color: #6366f1;
}

.popular-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #94a3b8;
}

.meta-views,
.meta-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==================== NEWSLETTER SECTION ==================== */

.blog-newsletter-section {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 4rem 0;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter-description {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.6;
}

.newsletter-form-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.blog-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
}

.newsletter-submit-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.newsletter-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.newsletter-note {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 1rem;
}

.newsletter-note a {
    color: #6366f1;
    text-decoration: none;
}

/* ==================== TOPICS SECTION ==================== */

.topics-section {
    background: #f8fafc;
}

.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.topic-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.topic-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.5rem;
}

.topic-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.topic-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.topic-count {
    font-size: 0.875rem;
    color: #64748b;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 1024px) {
    .featured-post-card.featured {
        grid-column: span 1;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .featured-posts-grid,
    .latest-posts-grid,
    .popular-posts-list {
        grid-template-columns: 1fr;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .category-filter {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .popular-post-item {
        flex-direction: column;
        text-align: center;
    }
    
    .popular-post-rank {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-page-hero {
        padding: 3rem 0 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-search-form {
        flex-direction: column;
        padding: 1rem;
        border-radius: 16px;
    }
    
    .hero-search-input {
        width: 100%;
    }
    
    .hero-search-button {
        width: 100%;
        border-radius: 8px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form-wrapper {
        padding: 1.5rem;
    }
}

/* ==================== ANIMATIONS ==================== */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post-card,
.featured-post-card,
.popular-post-item,
.topic-card {
    animation: fadeIn 0.6s ease-out;
}
