/* Blog Page Styles */

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Blog Categories */
.blog-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}

.category-link {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-link:hover,
.category-link.active {
    background: #fff;
    color: #2c3e50;
}

/* Featured Posts Section */
.featured-posts {
    padding: 3rem 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.main-feature {
    grid-row: span 2;
}

.featured-post {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
}

.post-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
}

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

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

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #666;
}

.post-category {
    color: #3498db;
    font-weight: 600;
}

.post-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: #2c3e50;
}

.main-feature .post-content h3 {
    font-size: 1.8rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #2980b9;
}

/* Latest Posts Section */
.latest-posts {
    padding: 3rem 0;
    background: #f8f9fa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-options {
    display: flex;
    gap: 0.5rem;
}

.view-toggle {
    background: none;
    border: 1px solid #ddd;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle.active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

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

/* List Layout */
.posts-grid.list-layout {
    grid-template-columns: 1fr;
}

.posts-grid.list-layout .post-item {
    display: grid;
    grid-template-columns: 300px 1fr;
}

.posts-grid.list-layout .post-image {
    height: 100%;
    padding-bottom: 0;
}

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

.load-more-btn {
    padding: 1rem 2rem;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.load-more-btn:hover {
    background: #2980b9;
}

/* Newsletter Section */
.newsletter-section {
    background: #2c3e50;
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.newsletter-form input {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    width: 60%;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 0.8rem 2rem;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #2980b9;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-out;
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .main-feature {
        grid-row: auto;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }
    
    .posts-grid.list-layout .post-item {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .category-link {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .post-content h3 {
        font-size: 1.2rem;
    }
}