/* Circle of Māmā — Resource card styling
   -------------------------------------------------------------------
   Same colour/font variables as the Recipes plugin, kept independent
   here so this plugin works fine on its own -- nudge these to match
   the rest of the site without hunting through the rest of the file. */

:root {
    --comres-accent:      #D28179;
    --comres-accent-soft: #fbeae5;
    --comres-border:      #f1ddda;
    --comres-heading-font: 'Playfair Display', Georgia, "Times New Roman", serif;
    --comres-body-font:    'Inter', Helvetica, Arial, Lucida, sans-serif;
    --comres-text:         #3c3b2e;
}

.com-resource-grid,
.com-resource-grid * {
    box-sizing: border-box;
}

/* ---- grid of cards ---- */
.com-resource-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25em;
}

/* ---- one card -- matches the "Simple Recipes" cards elsewhere on the
   page: a white card with a soft pink border, and the photo framed with
   a little breathing room inside rather than running edge-to-edge. ---- */
.com-resource-card {
    flex: 1 1 260px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--comres-border);
    border-radius: 14px;
    overflow: hidden;
    padding: 14px;
    font-family: var(--comres-body-font);
    color: var(--comres-text);
}

.com-resource-card__image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 16px;
    background: var(--comres-accent-soft);
}
.com-resource-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.com-resource-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.com-resource-card__title {
    font-family: var(--comres-heading-font);
    color: var(--comres-accent);
    font-size: 1.2em;
    line-height: 1.3;
    margin: 0 0 0.4em;
}

.com-resource-card__blurb {
    margin: 0 0 1.1em;
    line-height: 1.5;
    flex: 1 1 auto;
}

/* ---- download button -- pushed to the bottom of the card even when
   blurbs are different lengths, thanks to flex above ---- */
.com-resource-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    font-family: var(--comres-body-font);
    font-size: 1em;
    font-weight: 300;
    color: #fff;
    background: var(--comres-accent);
    border: none;
    border-radius: 999px;
    padding: 7px 21px;
    text-decoration: none;
    text-align: center;
    margin-top: auto;
    transition: transform 0.15s, box-shadow 0.15s;
}
.com-resource-download-btn:hover,
.com-resource-download-btn:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
button.com-resource-download-btn {
    cursor: pointer;
}
.com-resource-download-btn i {
    font-size: 0.95em;
}

/* ---- narrow screens ---- */
@media (max-width: 480px) {
    .com-resource-grid { gap: 1em; }
    .com-resource-card { flex: 1 1 100%; max-width: none; }
}
