﻿.blog-banner {
    position: relative;
    width: 99%;
    height: 420px;
    border-radius: 12px;
    overflow: hidden;
    background: url('../../images/blogs/group 740.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    margin-top: 6rem;
    margin-left: 0.5rem;
}

.blog-banner .overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.35);
 }
.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.banner-content h1 {
        font-size: 48px;
        font-weight: 700;
        margin-bottom: 0;
 }

.banner-content p {
        font-size: 20px;
        color: #f1f1f1;
        margin: 0;
}


.blog-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px;
    background: #f5f7fb;
}

.blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
        transform: translateY(-8px);
}

.blog-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.blog-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-content h2 {
        font-size: 25px;
        font-weight: 700;
        margin-bottom: 15px;
        color: #222;
        line-height: 1.4;
        white-space: nowrap;
    }

.blog-content p {
        font-size: 15px;
        color: #666;
        line-height: 1.8;
        margin-bottom: 20px;
}

.blog-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
}

.writer-name {
    font-size: 14px;
    font-weight: 600;
    color: #007bff;
}

.blog-date {
    font-size: 13px;
    color: #888;
}

.no-blog {
    text-align: center;
    padding: 80px 20px;
    font-size: 28px;
    font-weight: 700;
    color: #777;
}

.blog-description-short {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.8;
    max-height: 80px;
}


.pagination-container {
    width: fit-content;
    margin: 50px auto;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    padding: 14px 22px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 14px;
}

.page-number,
.page-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .page-number:hover,
    .page-btn:hover {
        background: #f1f1f1;
    }

    .page-number.active {
        background: #222;
        color: #fff;
    }

/* TABLET VIEW */

@media (max-width: 1024px) {

    .blog-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 25px;
    }

    .blog-img {
        height: 200px;
    }

    .blog-content {
        padding: 18px;
    }

        .blog-content h2 {
            font-size: 30px;
            width: 100%;
        }

.blog-content p {
       font-size: 24px;
       font-family: lato;
       color: #3b3b3b;
       line-height: 1.5;
}

.banner-content h1 {
     font-size: 36px;
 }

 .banner-content p {
     font-size: 16px;
 }
 .writer-name {
     font-size: 24px;
     font-weight: 600;
     color: #007bff;
    }
}

/*  MOBILE VIEW  */

@media (max-width: 768px) {

.blog-banner {
      height: 230px;
      margin-top: 4rem;
 }

 .banner-content {
      padding: 15px;
 }

 .banner-content h1 {
      font-size: 28px;
      line-height: 1.3;
 }

 .banner-content p {
     font-size: 14px;
 }

 .blog-container {
     grid-template-columns: repeat(2, 1fr); 
     gap: 14px;
     padding: 15px;
 }

 .blog-card {
     border-radius: 12px;
 }

 .blog-img {
     height: 140px;
 }

.blog-content {
    padding: 12px;
}

.blog-content h2 {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 10px;
 }

.blog-content p {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
 }

.writer-name,
.blog-date {
   font-size: 11px;
}

.blog-bottom {
   flex-direction: column;
   align-items: flex-start;
   gap: 5px;
}

.pagination-container {
    padding: 10px 16px;
    gap: 10px;
 }

.pagination {
        gap: 8px;
 }

.page-number,
.page-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
    }
}

/*  EXTRA SMALL MOBILE  */

@media (max-width: 480px) {

.blog-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
 }

.blog-img {
     height: 110px;
 }

.blog-content {
     padding: 10px;
 }

 .blog-content h2 {
     font-size: 13px;
}

.blog-content p {
     font-size: 11px;
}

.banner-content h1 {
    font-size: 24px;
}

.banner-content p {
        font-size: 13px;
    }
}