/* ===========================
   BLOG PAGE STYLES
=========================== */

/* Page Header */
.page-header {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    margin-top: 70px;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.page-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(27, 67, 50, 0.85), rgba(0, 119, 182, 0.75));
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.page-header-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-header-content p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Blog Page Section */
.blog-page-section {
    padding: 60px 0;
    background: var(--light-gray);
}

.blog-page-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

/* Featured Post */
.featured-post {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    transition: var(--transition);
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.featured-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.featured-post:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--light-green);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.featured-content {
    padding: 2rem;
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.blog-post-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    height: 220px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--medium-gray);
}

.post-meta i {
    margin-right: 0.3rem;
}

.post-content h3 {
    font-size: 1.2rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 50px;
}

.post-content p {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.read-more-btn {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more-btn:hover {
    color: var(--light-green);
}

.read-more-btn i {
    transition: var(--transition);
}

.read-more-btn:hover i {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    width: 45px;
    height: 45px;
    border: 2px solid var(--primary-green);
    background: var(--white);
    color: var(--primary-green);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-green);
    color: var(--white);
}

/* Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-widget h3 i {
    color: var(--light-green);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-form input:focus {
    outline: none;
    border-color: var(--light-green);
}

.search-form button {
    padding: 0.8rem 1.2rem;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--dark-green);
}

/* Category List */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark-gray);
    text-decoration: none;
    padding: 0.6rem 0.8rem;
    border-radius: 5px;
    transition: var(--transition);
}

.category-list li a:hover {
    background: var(--light-gray);
    color: var(--primary-green);
}

.category-list li a span {
    background: var(--light-gray);
    padding: 0.2rem 0.6rem;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-post-item {
    display: flex;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--light-gray);
    border-radius: 8px;
    transition: var(--transition);
}

.popular-post-item:hover {
    background: #e9ecef;
}

.popular-post-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.popular-post-content h4 {
    font-size: 0.95rem;
    color: var(--dark-green);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.popular-post-content span {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

.popular-post-content span i {
    margin-right: 0.3rem;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: var(--white);
    text-align: center;
}

.cta-widget h3 {
    color: var(--white);
    justify-content: center;
}

.cta-widget h3 i {
    color: var(--white);
}

.cta-widget p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    background: #25d366;
    color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cta:hover {
    background: #128c7e;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ===========================
   RESPONSIVE DESIGN
=========================== */
@media (max-width: 992px) {
    .blog-page-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        order: -1;
    }

    .featured-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .page-header {
        height: 280px;
    }

    .page-header-content h1 {
        font-size: 2rem;
    }

    .page-header-content p {
        font-size: 1rem;
    }

    .blog-page-section {
        padding: 40px 0;
    }

    .blog-posts-grid {
        grid-template-columns: 1fr;
    }

    .featured-content {
        padding: 1.5rem;
    }

    .post-content {
        padding: 1.2rem;
    }

    .sidebar-widget {
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        height: 240px;
    }

    .page-header-content h1 {
        font-size: 1.6rem;
    }

    .page-header-content p {
        font-size: 0.9rem;
    }

    .featured-image {
        height: 250px;
    }

    .post-image {
        height: 200px;
    }

    .post-content h3 {
        font-size: 1.1rem;
        min-height: auto;
    }

    .pagination {
        gap: 0.3rem;
    }

    .page-btn {
        width: 40px;
        height: 40px;
    }
}
