/* =============================================
   WP Posts Grid — Exact Event Card Design
   ============================================= */

*, *::before, *::after { box-sizing: border-box; }

.wpg-grid {
    display: grid;
    gap: 28px;
    padding: 24px 0;
    width: 100%;
}

.wpg-cols-1 { grid-template-columns: 1fr; }
.wpg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wpg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wpg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- Card ---- */
.wpg-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wpg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 32px rgba(0,0,0,0.14);
}

/* ---- Image Area ---- */
.wpg-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #ede9fe;
    flex-shrink: 0;
}

.wpg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.35s ease;
}

.wpg-card:hover .wpg-card-image img {
    transform: scale(1.05);
}

/* No image placeholder */
.wpg-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

/* ---- Badges (overlaid on bottom of image) ---- */
.wpg-badges {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: stretch;
    height: 34px;
}

.wpg-badge-a,
.wpg-badge-b {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Card Body ---- */
.wpg-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wpg-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    color: #111827;
    margin: 0 0 8px 0;
}

.wpg-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.wpg-title a:hover {
    color: #7c3aed;
}

.wpg-date {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.wpg-excerpt {
    font-size: 13px;
    color: #6b7280;
    margin: 6px 0 0 0;
    line-height: 1.6;
}

/* ---- Footer ---- */
.wpg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

.wpg-learn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s;
}

.wpg-learn span {
    font-size: 20px;
    line-height: 1;
    margin-top: -1px;
}

.wpg-learn:hover {
    color: #1d4ed8;
    gap: 8px;
}

.wpg-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #7c3aed;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    border-radius: 50px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    transition: opacity 0.2s, transform 0.15s;
    white-space: nowrap;
}

.wpg-btn:hover {
    opacity: 0.85;
    transform: scale(1.04);
    color: #fff !important;
}

/* No posts */
.wpg-no-posts {
    text-align: center;
    color: #9ca3af;
    padding: 48px 20px;
    font-size: 15px;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px dashed #e5e7eb;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
    .wpg-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .wpg-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .wpg-cols-2,
    .wpg-cols-3,
    .wpg-cols-4 { grid-template-columns: 1fr; }
    .wpg-card-image { height: 190px; }
    .wpg-btn { font-size: 11px; padding: 9px 14px; }
}
