/* Blog Hero Section */
.blog-hero {
    position: relative;
    padding: 160px 0 80px;
    margin-top: 80px;
    text-align: center;
    color: white;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(44, 85, 48, 0.7)), url('../images/listing3a.jpeg') no-repeat center center/cover, #2c5530;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 1;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
}

.blog-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.blog-hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.blog-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.search-input:focus {
    box-shadow: inset 0 0 0 2px #2c5530;
}

.search-btn {
    padding: 15px 20px;
    background: #2c5530;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #1a3b1e;
}

/* Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Featured Post */
.featured-post {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #d4a017;
    color: #343a40;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    z-index: 2;
}

.featured-image {
    height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-post:hover .featured-image img {
    transform: scale(1.05);
}

.featured-content {
    padding: 2.5rem;
}

.featured-content .post-meta {
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.featured-content .post-title a {
    font-size: 2rem;
    color: #2c5530;
    text-decoration: none;
    line-height: 1.3;
}

.featured-content .post-title a:hover {
    color: #1a3b1e;
}

.featured-content .post-excerpt {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.featured-content .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-category {
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.8rem;
    color: white;
}

.post-category.building-updates { background: #2c5530; }
.post-category.investment-tips { background: #e74c3c; }
.post-category.real-estate-tips { background: #3498db; }
.post-category.construction { background: #f39c12; }
.post-category.market-trends { background: #9b59b6; }
.post-category.home-ownership { background: #1abc9c; }

.post-date {
    color: #6c757d;
}

.post-title a {
    font-size: 1.3rem;
    color: #2c5530;
    text-decoration: none;
    line-height: 1.4;
    flex-grow: 1;
}

.post-title a:hover {
    color: #1a3b1e;
}

.post-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.post-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.read-more {
    color: #d4a017;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    color: #2c5530;
    transform: translateX(5px);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2c5530;
    color: #2c5530;
    padding: 12px 30px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #2c5530;
    color: white;
}

/* Blog Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sidebar-widget h3 {
    color: #2c5530;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 0.5rem;
}

/* Categories */
.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    text-decoration: none;
    color: #343a40;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.category-link:hover,
.category-link.active {
    background: #2c5530;
    color: white;
}

.category-count {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    color: #6c757d;
}

.category-link.active .category-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.popular-post:hover {
    background: #f8f9fa;
}

.popular-post-image {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    overflow: hidden;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content h4 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: #2c5530;
}

.popular-post-content h4:hover {
    color: #1a3b1e;
}

.popular-post-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Newsletter */
.newsletter-widget {
    background: linear-gradient(135deg, #2c5530 0%, #1a3b1e 100%);
    color: white;
}

.newsletter-widget h3 {
    color: white;
    border-bottom-color: rgba(255,255,255,0.2);
}

.newsletter-widget p {
    margin-bottom: 1rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-input {
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    background: rgba(255,255,255,0.9);
}

.newsletter-input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px #2c5530;
}

.btn-primary {
    background: #2c5530;
    border: 2px solid #2c5530;
    color: white;
    padding: 12px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #1a3b1e;
    border-color: #1a3b1e;
}

/* Tags Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #2c5530;
    color: white;
}

/* Responsive Design */
@media (max-width: 968px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .blog-sidebar {
        order: -1;
    }
    .featured-image {
        height: 300px;
    }
    .featured-content {
        padding: 1.5rem;
    }
    .featured-content .post-title a {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 120px 0 60px;
    }
    .blog-hero-content h1 {
        font-size: 2.5rem;
    }
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    .featured-content .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .blog-search {
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-content h1 {
        font-size: 2rem;
    }
    .blog-hero-content p {
        font-size: 1rem;
    }
    .featured-image {
        height: 250px;
    }
    .blog-search {
        flex-direction: column;
        gap: 0.5rem;
    }
    .search-input, .search-btn {
        width: 100%;
        border-radius: 5px;
    }
}

/* Animations */
.blog-post-card.hidden {
    display: none;
}

.blog-post-card.visible {
    display: flex;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}