.av-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* number of lines to show */
    line-clamp: 3; /* standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Custom Card Grid Wrapper */
.av-custom-card-grid-wrapper {
    padding: 40px 20px;
}

/* Heading */
.av-custom-card-grid-heading {
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
}

/* Grid Layout */
.av-custom-card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Individual Card */
.av-custom-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.av-custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

/* Card Image */
.av-card-image img {
    width: 100%;
    height: 250px;
    display: block;
    object-fit: cover;
    object-position: center center;
}

/* Card Content */
.av-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.av-card-title {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.av-card-title a {
    color: #333;
    text-decoration: none;
}

.av-card-title a:hover {
    color: #522398; /* Customize your theme color */
}

.av-card-excerpt {
    font-size: 0.95em;
    color: #666;
    line-height: 1.4;
}

.av-custom-card-pagination {
    text-align: center;
    margin-top: 30px;
}

.av-custom-card-pagination .page-numbers {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 12px;
    background: #f2f2f2;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
}

.av-custom-card-pagination .current {
    background: #522398;
    color: #fff;
}

.av-card-meta.av-card-category {
    padding: 20px;
    padding-bottom: 0;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.av-card-meta.av-card-date {
    padding: 20px;
    padding-top: 0;
    font-size: 12px;
    font-weight: 700;
    margin-inline-start: auto;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .av-custom-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .av-custom-card-grid {
        grid-template-columns: 1fr;
    }

    .av-custom-card-content {
        padding: 15px;
    }
}