/* ==========================================================================
   Resource Cards
   ========================================================================== */

/*
 * Theming hooks — override these in your theme to match brand colours
 * without touching the rules below.
 */
:root {
    --resource-card-bg: #e8fad6;
    --resource-card-border: #409400;
    --resource-card-radius: 10px;
    --resource-card-text: #232323;
    --resource-card-muted: #5c5c5c;

    --resource-download-bg: #409400;
    --resource-download-text: #ffffff;
}

/* --------------------------------------------------------------------------
   Grid — two columns (~33% width each), single column on small screens
   -------------------------------------------------------------------------- */
.resource-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .resource-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .resource-card-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Card — media first, then a stacked content column
   -------------------------------------------------------------------------- */
.resource-card {
    display: flex;
    flex-direction: column;
    background: var(--resource-card-bg);
    border: 1px solid var(--resource-card-border);
    border-radius: var(--resource-card-radius);
    overflow: hidden;
    /* keeps the media block's corners clipped to match the card */
    height: 100%;
    position: relative;
}

/* Media: Featured Image OR inline video, 16:9, fills the card's full width */
.resource-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.resource-card__media-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* The oEmbed field outputs an iframe/embed/object directly into this container */
.resource-card__media--video iframe,
.resource-card__media--video embed,
.resource-card__media--video object {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.resource-card__body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    flex-grow: 1;
}

.resource-card__title {
    margin: 0 0 0.4rem;
    color: var(--resource-card-border);
}

.resource-card__description {
    margin: 0 0 1rem;
}

/* --------------------------------------------------------------------------
   Download button
   -------------------------------------------------------------------------- */
.resource-card__actions {
    margin-bottom: 1rem;
}

.resource-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 0.6rem 1.1rem;
    border-radius: 3px;
    text-decoration: none;
    cursor: pointer;
    line-height: 1.2;
    transition: background-color 0.15s ease;
    border-radius: 100px;
    text-transform: uppercase;
}

.resource-card__button--download {
    background: var(--resource-download-bg);
    color: var(--resource-download-text);
}

.resource-card__button--download:hover,
.resource-card__button--download:focus-visible {
    background: color-mix(in srgb, var(--resource-download-bg) 85%, black);
}

.resource-card__button:focus-visible {
    outline: 2px solid var(--resource-download-bg);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Resource type icon(s) — sits last, at the bottom of the card
   -------------------------------------------------------------------------- */
.resource-card__types {
    display: inline-flex;
    gap: 0.4rem 0.9rem;
    margin-top: auto;
    align-items: center;
    justify-content: flex-end;



}

.resource-card__type {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  gap: 0.4rem;
  top: -25px;
  background-color: #01214a;
  padding: 1% 2%;
  border-radius: 6px;

}

.resource-card__icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.resource-card__type-label {
    font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #fff;
  text-transform: uppercase;
}