/* Main Grid Container */
.cpgl-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Grid Item */
.cpgl-grid-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.cpgl-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Thumbnail Styles */
.cpgl-thumbnail-wrapper {
    position: relative;
    margin-bottom: -5px; /* Remove white space from bottom */
}

.cpgl-thumbnail {
    display: block;
    position: relative;
    overflow: hidden;
}

.cpgl-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.cpgl-grid-item:hover .cpgl-thumbnail img {
    transform: scale(1.05);
}

.cpgl-thumbnail-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
}

.cpgl-thumbnail-category span {
    background: var(--primary-color, #463F82);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 500;
}

.cpgl-thumbnail-title {
    border: 1px solid #fff;
    border-radius: 6px;
    padding: 8px 8px;
    background: rgba(0,0,0,0.3);
    transition: background 0.3s, color 0.3s;
    display: inline-flex;
    color: #fff;
    margin-top: 10px;
    text-align: left;
    align-items: left;
    justify-content: left;
    
}

.cpgl-thumbnail:hover .cpgl-thumbnail-title {
    background: var(--primary-color, #463F82);
    color: #fff;
}

.cpgl-thumbnail-title h3 {
    font-size: 12px;
    font-weight: 500;
    color: #fff !important;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    text-align: center;
}

/* Action Buttons */
.cpgl-action-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.cpgl-bookmark-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 16px;
    height: 16px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cpgl-bookmark-btn:hover {
    background: #fff;
    color: var(--primary-color, #463F82);
    transform: scale(1.1);
}

.cpgl-bookmark-btn.bookmarked {
    color: #ff4757;
}

/* Post Content */
.cpgl-post-content {
    padding: 20px;
}

.cpgl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.cpgl-meta i {
    margin-right: 5px;
    color: var(--primary-color, #463F82);
}

.cpgl-excerpt {
    margin: 15px 0;
    color: #444;
    line-height: 1.6;
}

/* Tags */
.cpgl-tags {
    margin: 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.cpgl-tags i {
    color: var(--primary-color, #463F82);
    margin-right: 5px;
}

.cpgl-tags a {
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 12px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cpgl-tags a:hover {
    background: var(--primary-color, #463F82);
    color: white;
}

/* Footer */
.cpgl-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.cpgl-read-more {
    background: var(--primary-color, #463F82);
    color: white;
    padding: 5px 5px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.cpgl-read-more:hover {
    background: #6258b5;
    color: white;
    transform: translateY(-2px);
}

/* Social Share */
.cpgl-social-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpgl-social-share span {
    font-size: 13px;
    color: #666;
}

.cpgl-social-share a {
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.cpgl-social-share a:nth-child(2) {
    background: #3b5998; /* Facebook */
}

.cpgl-social-share a:nth-child(3) {
    background: #1a1b1bbc; /* Twitter */
}

.cpgl-social-share a:nth-child(4) {
    background: #0077b5; /* LinkedIn */
}

.cpgl-social-share a:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Pagination */
.cpgl-pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.cpgl-pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cpgl-pagination .page-numbers.current,
.cpgl-pagination .page-numbers:hover {
    background: var(--primary-color, #463F82);
    color: white;
    border-color: var(--primary-color, #463F82);
}

/* Responsive */
@media (max-width: 768px) {
    .cpgl-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .cpgl-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .cpgl-social-share {
        width: 100%;
        justify-content: flex-start;
    }
}