/*
 * Blog Page Styles
 * PowerTools - Online Tools Collection
 */

/* Blog Header */
.blog-header {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    margin-bottom: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: fadeInDown 0.8s ease-out;
}

.blog-header p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Blog Posts Grid */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.blog-post {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.6s ease-out;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.post-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.post-date {
    color: var(--text-secondary);
}

.post-category {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.post-content h2 {
    margin-bottom: 15px;
    font-size: 1.4rem;
    line-height: 1.3;
    flex-grow: 1;
}

.post-content h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content h2 a:hover {
    color: var(--primary-color);
}

.post-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
}

.read-more:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.pagination li {
    margin: 0;
}

.pagination a {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-color);
    color: white;
}

.pagination li:last-child a {
    border-right: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-header {
        padding: 40px 20px;
    }
    
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .post-content h2 {
        font-size: 1.3rem;
    }
    
    .pagination ul {
        flex-direction: column;
    }
    
    .pagination a {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .pagination li:last-child a {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.8rem;
    }
    
    .blog-header p {
        font-size: 1rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .blog-posts {
        gap: 15px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-content h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-header p {
        font-size: 1rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Blog-specific animations */
.blog-post:nth-child(1) { animation-delay: 0.1s; }
.blog-post:nth-child(2) { animation-delay: 0.2s; }
.blog-post:nth-child(3) { animation-delay: 0.3s; }
.blog-post:nth-child(4) { animation-delay: 0.4s; }
.blog-post:nth-child(5) { animation-delay: 0.5s; }
.blog-post:nth-child(6) { animation-delay: 0.6s; }
