/* t888-list-post widget custom styles */

/* Style 5: Custom Foglia Grid Card */
.blog-grid-style5 {
    display: block;
    width: 100%;
}

.blog-grid-style5 .posts-wrap {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(3, 1fr);
}

.blog-grid-style5 .grid-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.blog-grid-style5 .grid-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.blog-grid-style5 .grid-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Staggered effect for 3-columns to simulate masonry height variance */
@media (min-width: 992px) {
    .blog-grid-style5 .grid-columns-3 .grid-style5:nth-child(3n+1) {
        /* transform: translateY(-30px); */
    }
}

.grid-style5 {
    break-inside: avoid;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.grid-style5:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Thumbnail Wrap & Badges */
.grid-style5 .post-thumb-wrap {
    position: relative;
}

.grid-style5 .post-thumb {
    position: relative;
    overflow: hidden;
}

.grid-style5 .post-thumb img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/3;
    /* object-fit: cover; */
    display: block;
    transition: transform 0.5s ease;
}

.grid-style5:hover .post-thumb img {
    transform: scale(1.05);
}

/* Date Badge */
.grid-style5 .date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 50px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #333;
    z-index: 2;
}

.grid-style5 .date-badge .day {
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    color: #000;
}

.grid-style5 .date-badge .month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-top: 2px;
}

/* Category Badge */
.grid-style5 .category-badge {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    background: var(--primary-color);
    /* Green from the brand */
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 30px;
    white-space: nowrap;
    z-index: 3;
    box-shadow: none;
}

/* Content Area */
.grid-style5 .post-info {
    padding: 25px 20px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.grid-style5 .post-title {
    font-size: 21px;
    line-height: 1.4;
    font-weight: 700;
    margin-bottom: 10px !important;
    font-family: var(--font-familyr);
    text-transform: uppercase;
}

.grid-style5 .post-title a {
    color: var(--primary-color, #333);
    text-decoration: none;
    transition: color 0.3s ease;
}

.grid-style5 .post-title a:hover {
    color: var(--third-color);
}

/* Meta Data */
.grid-style5 .post-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.grid-style5 .post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.grid-style5 .post-meta i {
    color: #b0b0b0;
}

/* Excerpt */
.grid-style5 .post-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}
.grid-style5 .post-excerpt p{
    white-space: normal;
}
/* Read More */
.grid-style5 .read-more-btn {
    display: inline-block;
    font-family: var(--font-philosopher);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.grid-style5 .read-more-btn:hover {
    color: var(--third-color);
}

/* Responsive */
@media (max-width: 991px) {
    .blog-grid-style5 .posts-wrap {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }
}

@media (max-width: 575px) {
    .blog-grid-style5 .posts-wrap {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .grid-style5 .post-info {
        padding: 20px 15px 15px;
    }

    .grid-style5 .post-title {
        font-size: 0.95rem;
    }
}