body {
    background-color: #fff;
}

.blog-section {
    width: 100%;
    padding: 40px 20px;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.grid-layout {
    display: flex;
    gap: 25px;
    justify-content: space-between;
}

.main-content {
    width: 100%;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 370px);
    gap: 25px;
    margin-bottom: 40px;
    justify-content: space-between;
}

.blog-post-card {
    width: 370px;
    background-color: #f4f4f4;
    border-radius: 0;
    overflow: hidden;
    padding: 10px;
    position: relative;
    transition: background-color 0.4s ease;
}

.blog-post-card::before {
    content: "";
    position: absolute;
    top: -100%;         
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;   
    z-index: 1;         
    transition: top 0.6s ease;
}


.blog-post-card:hover::before {
    top: 0;
}

.post-thumbnail-container,
.category-badge-container,
.date-box-container,
.post-details {
    position: relative;
    z-index: 5; 
}

.post-thumbnail-container {
    position: relative;
    width: 350px;  
    height: 235px;
    overflow: visible;
    margin: 0 auto; 
    z-index: 5; 
}

.post-thumbnail-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-thumbnail-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0); 
    transition: background 0.5s ease;
    z-index: 6;
}

.blog-post-card:hover .post-thumbnail-container::after {
    background: rgba(0,0,0,0.25); 
}

.image-plus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    color: #ffffff;      
    font-size: 55px;       
    font-weight: 300;
    text-decoration: none;
    z-index: 10;
    transition: all 0.3s ease;
    pointer-events: none; 
}


.post-thumbnail-container:hover .image-plus {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto; 
}


.date-box-container {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 3;
}

.date-box {
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 225px;
}

.date-day {
    font-size: 22px;
    font-weight: 700;
    width: 55px;
    height: 32px;
    background-color: #15161b;
    padding: 5px;
    padding-left: 15px;
}


.blog-post-card:hover .date-day{
    background-color: #ffb400;
}


.date-month {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    background-color: #1947cd;
    width: 55px;
    height: 22px;
    padding-top: 5px;
    padding-left: 12px;
}


.category-badge-container {
    padding: 0 25px;
    margin-left: -25px;
    position: relative;
    z-index: 3;
    display: inline-block;
}

.category-badge {
    width: 178px;
    white-space: nowrap;
    display: inline-block;
    background-color: #ffb400;
    color: #fff;
    padding: 8.5px 12.5px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.3s ease;
    position: relative;
}
.category-badge-container::after {
    content: "";
    position: absolute;
    top: 0;
    right: -33px; 
    width: 30px;
    height: auto;

    border-top: 34px solid transparent; 
    border-left: 28px solid #1947cd;
}

 .blog-post-card:hover .category-badge{
    background-color: #1947cd;
 }

 .blog-post-card:hover .category-badge-container::after {
    border-left-color: #ffb400; 
}

.post-details {
    padding: 25px 25px 30px;
}

.post-heading {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    padding-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.post-heading a {
    font-size: 22px;
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-card:hover .post-heading a {
    color: #ffffff;
}

.blog-post-card:hover .post-heading a:hover {
    color: #ffb400;
}

.post-meta-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
    font-size: 15px;
}

.post-meta-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1947cd;
}

.post-meta-list i {
    color: #1947cd;
    width: 16px;
    height: 16px;
}

.blog-post-card:hover .post-meta-list i {
    color: #ffb400;
}

.post-meta-list a {
    color: #5e5b5b;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 400;
}

.blog-post-card:hover .post-meta-list a {
    color: #ffffff;
}

.blog-post-card:hover .post-meta-list a:hover {
    color: #ffb400;
}

.pagination-wrapper {
    text-align: center;
    margin-top: 40px;
}

.more-articles-btn {
    display: inline-block;
    background: #1947cd; 
    color: #fff;
    padding: 14px 35px;
    font-size: 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s ease;
}

.more-articles-btn:hover {
    background: #ffb400; 
    color: #1f2937;
}


@media (max-width: 1024px) {

    .grid-layout {
        gap: 20px;
    }

    .main-content {
        width: 100%;
    }

    .sidebar-area {
        width: 350px;
    }

    .posts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        justify-content: center;
    }

    .blog-post-card {
        width: 100%;
    }

    .post-thumbnail-container {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .grid-layout {
        flex-direction: column;
        align-items: center;
    }

    .main-content {
        width: 100%;
    }

    .posts-grid {
        grid-template-columns: 1fr;   
        width: 100%;
        gap: 25px;
    }

    .blog-post-card {
        width: 100%;
    }

    .post-thumbnail-container {
        width: 100%;
        height: auto;
    }

}

@media (max-width: 480px) {

    .blog-post-card {
        padding: 8px;
    }

    .post-thumbnail-container {
        width: 100%;
        height: 200px;
    }

    .category-badge-container {
        padding-left: 0;
        margin-left: 0;
    }

    .category-badge {
        font-size: 13px;
        padding: 6px 10px;
        width: auto;
    }

    .post-heading a {
        font-size: 18px;
        line-height: 1.3;
    }

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

    .page-link {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

}

@media (max-width: 375px) {

    .blog-post-card {
        padding: 6px;
    }

    .post-thumbnail-container {
        height: 180px;
    }

    .post-heading a {
        font-size: 16px;
    }

    .category-badge {
        font-size: 12px;
        padding: 5px 8px;
    }

    .date-day {
        font-size: 18px;
        width: 45px;
    }

    .date-month {
        font-size: 10px;
        width: 45px;
    }
}
