/**
 * GMC Church News — frontend cover cards (homepage widget + shortcode).
 */

.gmc-news-event-date-display {
    display: none !important;
}

/* Hide theme "On: …" byline for GMC News posts (date is in the title). */
.gmc-church-news-post .entry-byline,
.gmc-church-news-post .entry-meta,
.gmc-church-news-post .byline,
.gmc-church-news-post .post-byline,
.gmc-church-news-post .entry-footer .entry-meta,
.gmc-church-news-post time.entry-date,
.gmc-church-news-post .published {
    display: none !important;
}

/*
 * Hootkit "Display Styled Content Blocks (Posts)" widget — used on GMC homepage.
 * That widget does not add post_class(), so hide the hardcoded "On:" subtitle here.
 */
.widget_hootkit-posts-blocks .content-block-subtitle,
.widget_hootkit-posts-blocks .entry-byline,
.widget_hootkit-posts-blocks .entry-byline-label,
.widget_hootkit-posts-blocks .entry-byline-date {
    display: none !important;
}

/* One "Continue Reading" per block — keep theme-more-link, drop excerpt duplicate. */
.widget_hootkit-posts-blocks .content-block-text a.read-more {
    display: none !important;
}

.widget_hootkit-posts-blocks .content-block-text:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gmc-news-frontend {
    margin: 1.5rem 0 2rem;
}

.gmc-news-frontend__heading {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1d2327;
    text-align: center;
}

.gmc-news-cover-grid {
    display: grid;
    gap: 1.25rem;
    width: 100%;
}

.gmc-news-cover-grid--cols-1 {
    grid-template-columns: 1fr;
}

.gmc-news-cover-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gmc-news-cover-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gmc-news-cover-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gmc-news-cover-card {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    background: #1d2327;
}

.gmc-news-cover-card__link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.gmc-news-cover-card__link:hover .gmc-news-cover-card__title,
.gmc-news-cover-card__link:focus .gmc-news-cover-card__title {
    text-decoration: underline;
}

.gmc-news-cover-card__media {
    position: relative;
    min-height: 220px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #2271b1;
}

.gmc-news-cover-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    opacity: 0.35;
}

.gmc-news-cover-card__overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
    color: #fff;
}

.gmc-news-cover-card__date {
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.gmc-news-cover-card__title {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.gmc-news-cover-card__button {
    display: inline-block;
    margin: 0;
}

.gmc-news-cover-card__button .wp-block-button__link {
    display: inline-block;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    color: #fff !important;
    background: #2271b1 !important;
    border-radius: 6px;
    text-decoration: none !important;
    border: none;
    box-shadow: none;
}

.gmc-news-cover-card__link:hover .wp-block-button__link,
.gmc-news-cover-card__link:focus .wp-block-button__link {
    background: #135e96 !important;
}

/* Single hero layout */
.gmc-news-frontend--cover-hero .gmc-news-cover-card__media {
    min-height: 320px;
}

@media (max-width: 900px) {
    .gmc-news-cover-grid--cols-3,
    .gmc-news-cover-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gmc-news-cover-grid--cols-2,
    .gmc-news-cover-grid--cols-3,
    .gmc-news-cover-grid--cols-4 {
        grid-template-columns: 1fr;
    }

    .gmc-news-cover-card__media {
        min-height: 200px;
    }
}
