/* ==================================================
   BLOG PAGE CSS
   ================================================== */

.blog-hero-banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('../assets/blog1.webp');
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 140px 0 100px 0;
    text-align: center;
    position: relative;
    border-bottom: 20px solid var(--bg-light);
}

.blog-hero-banner h1 {
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    font-size: clamp(2.5rem, 8vw, 6rem);
    letter-spacing: -2px;
    position: relative;
    z-index: 2;
}

.blog-page-content {
    background-color: #f4f5f7;
    padding: 80px 0;
}

/* Blog Post List Cards */
.blog-list-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    flex-direction: row;
    min-height: 400px;
    /* Image left, content right */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.blog-list-img-wrapper {
    width: 45%;
    position: relative;
    overflow: hidden;
}

.blog-list-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-list-category-pill {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-yellow);
    color: var(--primary-black);
    padding: 6px 16px;
    border-radius: 50px;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.blog-list-content {
    width: 55%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-list-date {
    font-family: "DM Sans", sans-serif;
    font-size: 0.9rem;
    color: #888888;
    margin-bottom: 10px;
}

.blog-list-title {
    font-family: "Poppins", sans-serif;
    font-weight: 800;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--primary-black);
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-list-excerpt {
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.6;
}

.blog-read-more-btn {
    align-self: flex-start;
    background-color: var(--primary-black);
    color: #ffffff;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.blog-read-more-btn:hover {
    background-color: var(--accent-yellow);
    color: #ffffff;
    transform: translateY(-2px);
}

.blog-pagination {
    margin-top: 40px;
}

.blog-pagination-btn {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    color: var(--primary-black);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.blog-pagination-btn:hover {
    color: var(--accent-yellow);
}

/* Sidebar */
.blog-sidebar {
    padding-left: 30px;
    position: sticky;
    top: 120px;
    /* Offset to clear the fixed header */
    align-self: flex-start;
    /* Required for sticky positioning in a flex container if row has alignItems stretch */
}

.sidebar-search {
    margin-bottom: 40px;
}

.sidebar-search .form-control {
    border-radius: 50px;
    padding: 12px 25px;
    border: 1px solid #e0e0e0;
    font-family: "DM Sans", sans-serif;
    background-color: #f4f5f7;
    margin-bottom: 15px;
}

.sidebar-search .form-control:focus {
    box-shadow: none;
    border-color: var(--accent-yellow);
    background-color: #ffffff;
}

.sidebar-search-btn {
    width: 100%;
    background-color: var(--accent-yellow);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
}

.sidebar-search-btn:hover {
    background-color: var(--primary-black);
    color: #ffffff;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.sidebar-widget h3 {
    font-family: "Poppins", sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--primary-black);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.recent-post-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.recent-post-item:last-child {
    margin-bottom: 0;
}

.recent-post-img {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.recent-post-info {
    flex: 1;
}

.recent-post-date {
    font-family: "DM Sans", sans-serif;
    font-size: 0.8rem;
    color: #888888;
    margin-bottom: 5px;
    display: block;
}

.recent-post-title {
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-black);
    text-decoration: none;
    line-height: 1.3;
    display: block;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.recent-post-title:hover {
    color: var(--accent-yellow);
}

.recent-post-author {
    font-family: "DM Sans", sans-serif;
    font-size: 0.8rem;
    color: #555555;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background-color: #f4f5f7;
    color: var(--primary-black);
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background-color: var(--accent-yellow);
    color: #ffffff;
}

@media (max-width: 991px) {
    .blog-sidebar {
        padding-left: 0;
        margin-top: 50px;
        position: static;
    }
}

@media (max-width: 767px) {
    .blog-hero-banner {
        padding: 140px 0 60px;
        /* Adjusted padding-top to account for the fixed header and center text visually */
    }

    .blog-list-card {
        flex-direction: column;
        min-height: auto;
    }

    .blog-list-img-wrapper {
        width: 100%;
        height: 180px;
    }

    .blog-list-content {
        width: 100%;
        padding: 16px;
    }
}