﻿/* RESOURCE CARD */
.resource-card {
    --iconSize: 38px;
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    border-radius: 4px;
}

    /* IMAGE */
    .resource-card img {
        width: 100%;
        height: auto;
        display: block;
    }

/* GRADIENT OVERLAY */
.resource-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient( to top, rgba(245, 244, 240, 1) 0%, rgba(245, 244, 240, 0.7) 40%, rgba(245, 244, 240, 0) 60% );
}

/* ICON (pinned bottom-right) */
.icon-link {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: var(--iconSize);
    height: var(--iconSize);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #006325;
    color: #ffffff;
    border-radius: 2px;
    text-decoration: none;
    line-height: 1;
    transition: background-color 250ms ease-in-out;
}

    .icon-link i {
        transform: scale(1);
        transition: transform 250ms ease-in-out;
        will-change: transform;
    }

/* CONTENT AREA
   Top edge starts ~40% from bottom => top: 60% */
.resource-content {
    position: absolute;
    left: 0;
    right: 0;
    top: 60%;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1.25em 1.25em 1.25em;
    padding-right: calc(1.25em + var(--iconSize) + 0.75em);
}

/* TITLE */
.resource-title {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
    color: #006325;
    transition: color 250ms ease-in-out;
}

/* HOVER / FOCUS (no movement) */
.resource-card:hover .resource-title,
.resource-card:focus-visible .resource-title {
    color: #213b34;
}

.resource-card:hover .icon-link,
.resource-card:focus-visible .icon-link {
    background-color: #213b34;
}

    .resource-card:hover .icon-link i,
    .resource-card:focus-visible .icon-link i {
        transform: scale(1.1);
    }


    /*_____________________________________________*/
    .intro-text {
        color: #ffffff;
        font-size: 1.7em;
        letter-spacing: 2px;
    }

    .banner-title {
        color: #ffffff;
        font-family: Termina;
        font-weight: 900;
        letter-spacing: 1px;
    }


    /* Base styles: mobile first (0–575px) */
    .intro-text {
        font-size: 0.75em;
        letter-spacing: 0.15em;
    }

    .banner-title {
        font-size: 2em;
    }

    /* ≥576px — Small devices (landscape phones) */
    @media (min-width: 576px) {
        .intro-text {
            font-size: 0.8em;
        }

        .banner-title {
            font-size: 2.25em;
        }
    }

    /* ≥768px — Medium devices (tablets) */
    @media (min-width: 768px) {
        .intro-text {
            font-size: 1em;
        }

        .banner-title {
            font-size: 2.75em;
        }
    }

    /* ≥992px — Large devices (desktops) */
    @media (min-width: 992px) {
        .intro-text {
            font-size: 1.2em;
        }

        .banner-title {
            font-size: 3.25em;
        }
    }

    /* ≥1200px — Extra-large devices */
    @media (min-width: 1200px) {
        .intro-text {
            font-size: 1.5em;
        }

        .banner-title {
            font-size: 3.75em;
        }
    }

    /* ≥1400px — XXL / wide screens */
    @media (min-width: 1400px) {
        .intro-text {
            font-size: 1.7em;
        }

        .banner-title {
            font-size: 4.25em;
        }
    }


/* =========================================================
   RESOURCE ICON TILES (namespaced, SVG-safe, no .card conflicts)
   ========================================================= */

/* TILE WRAPPER (optional, but keeps structure predictable) */
.resource-icon-tile {
    height: 100%;
}

/* LINK WRAPPER */
.resource-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* ICON ROW
   - Provides a consistent "canvas" for raw SVGs with inconsistent viewBox sizing */
.resource-icon-media {
    width: 100%;
    height: 105px; /* reduced size */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5em; /* requested spacing */
}

    /* BASE SVG RULES
   - Explicit width + height so SVG <img> always renders
   - object-fit contain prevents distortion */
    .resource-icon-media img {
        width: 38%;
        height: 100%;
        max-width: 135px;
        max-height: 105px;
        object-fit: contain;
        display: block;
    }

    /* WIDE VARIANT (for pintail)
   Apply .is-wide to the .resource-icon-media wrapper */
    .resource-icon-media.is-wide img {
        width: 100%;
        max-width: 220px;
    }

/* LABEL
   - Explicit font size to override global h2 rules
   - Centered
   - Single line (no wrap, no ellipsis) */
.resource-icon-label {
    margin: 0;
    color: #a1cead;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden; /* clips if too long */
}

/* DESCRIPTION */
.resource-icon-desc {
    margin: 0.75rem 0 0;
    color: #ffffff;
    text-align: center;
}

/* RESPONSIVE TUNING (optional, sensible defaults) */
@media (min-width: 768px) {
    .resource-icon-media {
        height: 115px;
    }

        .resource-icon-media img {
            max-height: 115px;
        }
}

@media (min-width: 992px) {
    .resource-icon-media {
        height: 120px;
    }

        .resource-icon-media img {
            max-height: 120px;
        }
}
/* HOVER / FOCUS */
.resource-icon-link {
    transition: transform 180ms ease, color 180ms ease;
}

.resource-icon-media,
.resource-icon-label {
    transition: transform 180ms ease, color 180ms ease;
    transform-origin: center;
}

.resource-icon-link:hover .resource-icon-media,
.resource-icon-link:focus-visible .resource-icon-media,
.resource-icon-link:hover .resource-icon-label,
.resource-icon-link:focus-visible .resource-icon-label {
    transform: scale(1.05);
}

.resource-icon-link:hover .resource-icon-label,
.resource-icon-link:focus-visible .resource-icon-label {
    color: #ffffff;
}

/* Optional: visually push SVG toward white (not true fill change, but close) */
.resource-icon-link:hover .resource-icon-media img,
.resource-icon-link:focus-visible .resource-icon-media img {
    filter: brightness(0) invert(1);
    transition: filter 180ms ease;
}
