/* Resources page (Pages/Resources.cshtml), laid out like the template's Event grid, three cards a row.
   The page hero is in page-hero.css; .img-shine is in home.css. */

.res-section {
    padding: 40px 0 100px;
    background: #fff;
}

.res-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Full height so cards in a row line up even inside the fade-up wrapper. */
.res-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(26, 86, 50, 0.12);
    border-radius: 16px;
    background: #fff;
}

.res-thumb {
    position: relative;
}

.res-thumb img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.res-card:hover .res-thumb img {
    transform: scale(1.05);
}

.res-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px 24px;
}

.res-body h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 400;
    line-height: 30px;
}

.res-body h3 a {
    color: var(--brand-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.res-body h3 a:hover {
    color: #2f7a4b;
}

.res-body > p {
    margin: 12px 0 0;
    color: rgba(26, 86, 50, 0.8);
    font-size: 16px;
    line-height: 26px;
}

/* Sits at the bottom of the card so buttons line up across a row. */
.res-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 6px 6px 6px 18px;
    border-radius: 30px;
    background: var(--brand-green);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.res-body > p + .res-btn {
    margin-top: 24px;
}

.res-btn span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--brand-lime);
    color: var(--brand-green);
    font-size: 13px;
    -webkit-text-stroke: 0.5px;
    transition: transform 0.3s ease;
}

.res-btn:hover {
    background: var(--brand-green-dark);
    color: #fff;
}

.res-btn:hover span {
    transform: rotate(45deg);
}

@media (max-width: 1199.98px) {
    .res-thumb img {
        height: 220px;
    }

    .res-body h3 {
        font-size: 22px;
        line-height: 28px;
    }
}

@media (max-width: 991.98px) {
    .res-section {
        padding-bottom: 70px;
    }

    .res-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .res-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .res-body {
        padding: 22px 18px;
    }
}
