/* ================= CARD GRID SYSTEM ================= */
.card-grid,
.g-grid.g-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ================= BASE CARD ================= */
.g-card.card-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: all 0.25s ease;
}

.g-card.card-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
}

/* ================= IMAGE / PLACEHOLDER ================= */
.g-card.card-item img,
.g-card.card-item .event-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

/* ================= PLACEHOLDER BACKGROUNDS ================= */
/* NEWS */
.g-card.card-item .event-placeholder.news {
    background: linear-gradient(135deg, #2a364f, #3f4a66);
    color: #fff;
}

/* EVENT - slightly different */
.g-card.card-item .event-placeholder.event {
    background: linear-gradient(135deg, #1a2b45, #2c4469);
    color: #fff;
}

/* PUBLICATION - slightly different */
.g-card.card-item .event-placeholder.publication {
    background: linear-gradient(135deg, #1c3557, #4a7fa8);
    color: #fff;
}

/* Shared placeholder */
.event-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
}

/* Finer diagonal stripes - left to right */
.event-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        135deg,
        rgba(255,255,255,0.10),
        rgba(255,255,255,0.10) 8px,
        transparent 8px,
        transparent 22px
    );
    pointer-events: none;
}

/* ================= BADGE ================= */
.event-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    font-size: 0.75rem;
    border-radius: 20px;
    color: #fff;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.event-badge.badge-news        { background: rgba(0,0,0,0.45); }
.event-badge.badge-event       { background: #1d3557; }
.event-badge.badge-publication { background: #0f766e; }

/* ================= CONTENT ================= */
.g-card-content {
    padding: 20px 20px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.home-card-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 8px;
}

.g-card-content h3 {
    color: #1d2b4a;
    font-size: 1.12rem;
    margin-bottom: 10px;
    line-height: 1.35;
}

.g-card-content p {
    color: #4b5563;
    font-size: 0.94rem;
    line-height: 1.55;
    flex-grow: 1;
    margin-bottom: 0;
}

/* ================= BUTTONS ================= */
.home-card-actions {
    margin-top: auto;
    padding: 18px 0 20px;
}

.g-btn.g-btn-secondary {
    width: 100%;
    display: block;
    padding: 13px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    background: #2a5f8c;
    color: #fff;
    transition: all 0.25s ease;
}

.g-btn.g-btn-secondary:hover {
    background: #1e4a73;
    transform: translateY(-2px);
}

/* ================= SPACING FIXES FOR HEADINGS ================= */
.home-subheading {
    margin-bottom: 20px !important;     /* space between heading and cards */
    margin-top: 40px;
    color: #1d2b4a;
    font-size: 1.35rem;
    font-weight: 600;
}

/* Extra space after the last set of cards (before next section) */
.home-content-hub .g-grid.g-card-grid {
    margin-bottom: 50px;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 992px) {
    .card-grid,
    .g-grid.g-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid,
    .g-grid.g-card-grid {
        grid-template-columns: 1fr;
    }
    
    .home-subheading {
        margin-top: 30px;
    }
}