/**
 * Latest Posts Grid Widget Styles
 * Save this file as: assets/css/latest-posts-grid.css
 */

/* Grid Container */
.lpg-posts-wrapper {
    width: 100%;
    max-width: 100%;
}

.lpg-posts-grid {
    display: grid;
    gap: 36px;
    width: 100%;
    grid-auto-flow: dense;
}

/* Responsive Columns */
.lpg-posts-grid.lpg-columns-1 {
    grid-template-columns: repeat(1, minmax(0, 309px));
    justify-content: center;
}

.lpg-posts-grid.lpg-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 309px));
    justify-content: center;
}

.lpg-posts-grid.lpg-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 309px));
    justify-content: center;
}

.lpg-posts-grid.lpg-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 309px));
    justify-content: center;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .lpg-posts-grid.lpg-columns-tablet-1 {
        grid-template-columns: repeat(1, minmax(0, 309px));
    }
    
    .lpg-posts-grid.lpg-columns-tablet-2 {
        grid-template-columns: repeat(2, minmax(0, 309px));
    }
    
    .lpg-posts-grid.lpg-columns-tablet-3 {
        grid-template-columns: repeat(3, minmax(0, 309px));
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .lpg-posts-grid.lpg-columns-mobile-1 {
        grid-template-columns: repeat(1, minmax(0, 309px));
    }
    
    .lpg-posts-grid.lpg-columns-mobile-2 {
        grid-template-columns: repeat(2, minmax(0, 309px));
    }
}

/* Post Card */
.lpg-post-card {
    display: flex;
    flex-direction: column;
    background-color: #ffffff00;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 309px;
    width: 100%;
	outline: none;
}



/* Image Container */
.lpg-post-image {
    position: relative;
    width: 100%;
    max-width: 309px;
    height: 320px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.lpg-post-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.60) 0%, rgba(0, 0, 0, 0.00) 100%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}



/* Category Badge */
.lpg-post-category {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    background-color: rgba(5, 45, 99, 0.8);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}



/* Image Content Overlay */
.lpg-post-image-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 2;
}

/* Post Date */
.lpg-post-date {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* Post Title */
.lpg-post-title {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.lpg-post-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}



/* Content Container */
.lpg-post-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Post Excerpt */
.lpg-post-excerpt {
    color: #666666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Button Wrapper */
.lpg-post-button-wrapper {
    margin-top: auto;
}

/* Button */
.lpg-post-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #ffffff00;
    color: #052D63;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
	outline: none;
}



.lpg-post-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}


/* Responsive Adjustments */
@media (max-width: 767px) {
    .lpg-post-image {
        height: 250px;
    }
    
    .lpg-post-title {
        font-size: 18px;
    }
    
    .lpg-post-excerpt {
        font-size: 14px;
    }
    
    .lpg-post-content {
        padding: 15px;
    }
    
    .lpg-post-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}


/* Loading State (optional) */
.lpg-posts-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* No Posts Message */
.lpg-posts-wrapper > p {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}