.fm-resource-buttons {
    --fm-resource-resting-edge: var(--dark-blue, #0c384f);
    margin-inline: auto;
    max-width: 1100px;
    width: 100%;
}

/*
 * These shortcodes may be placed inside an existing Divi card column carrying
 * .trusted-images. That utility caps the column at 470px and clips hover
 * details, so neutralize those card constraints only for this component.
 */
.et_pb_column.trusted-images:has(.fm-resource-buttons) {
    max-width: none !important;
    overflow: visible !important;
    width: 100% !important;
}

.fm-resource-buttons--ml6 {
    --fm-resource-resting-edge: var(--lightest-black, #49494a);
}

.fm-resource-buttons .fm-resource-buttons__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 1.5vw, 24px);
    list-style: none;
    margin: 0;
    padding: 0 !important;
}

.fm-resource-buttons .fm-resource-buttons__item {
    margin: 0;
    min-width: 0;
}

.fm-resource-buttons__link {
    align-items: center;
    background: var(--pure-white, #fff);
    border: 1px solid rgba(12, 56, 79, 0.22);
    border-bottom: 5px solid var(--fm-resource-resting-edge);
    color: var(--dark-blue, #0c384f) !important;
    display: flex;
    font-family: var(--lato, "Lato", sans-serif);
    font-size: clamp(18px, 1.4vw, 24px);
    font-weight: 900;
    justify-content: center;
    line-height: 1.25;
    min-height: clamp(165px, 12vw, 200px);
    overflow: hidden;
    padding-block: clamp(30px, 3vw, 44px);
    padding-inline: clamp(22px, 2.5vw, 40px);
    position: relative;
    text-align: center;
    text-decoration: none;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        color 0.3s ease,
        transform 0.3s ease;
    isolation: isolate;
    border-radius: 4px;
}

.fm-resource-buttons__link::before {
    background: var(--blue, #105daa);
    content: "";
    inset: 0;
    opacity: 0;
    position: absolute;
    transform: translateY(12%);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    z-index: 0;
}

.fm-resource-buttons__link::after {
    background: var(--orange, #f2873b);
    content: "";
    height: 4px;
    left: 50%;
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    transition: width 0.3s ease;
    width: 78px;
    z-index: 2;
}

.fm-resource-buttons__label {
    max-width: 24ch;
    position: relative;
    z-index: 1;
}

.fm-resource-buttons__arrow {
    bottom: 20px;
    opacity: 0.8;
    position: absolute;
    right: 24px;
    transform: translateX(0);
    transition:
        color 0.3s ease,
        opacity 0.3s ease,
        transform 0.3s ease;
    z-index: 1;
}

.fm-resource-buttons__arrow::before {
    color: var(--orange, #f2873b);
    content: "\f061";
    font-family: "font awesome 6 pro";
    font-size: 25px;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    transition: color 0.3s;
}

.fm-resource-buttons__link:hover,
.fm-resource-buttons__link:focus-visible {
    border-color: var(--blue, #105daa);
    box-shadow: 0 14px 30px rgba(12, 56, 79, 0.18);
    color: var(--white, #f6fafe) !important;
    transform: none;
}

#page-container .fm-resource-buttons__link:hover .fm-resource-buttons__label,
#page-container .fm-resource-buttons__link:focus-visible .fm-resource-buttons__label {
    color: var(--white, #f6fafe) !important;
    -webkit-text-fill-color: var(--white, #f6fafe);
}

.fm-resource-buttons__link:hover::before,
.fm-resource-buttons__link:focus-visible::before {
    opacity: 1;
    transform: translateY(0);
}

.fm-resource-buttons__link:hover::after,
.fm-resource-buttons__link:focus-visible::after {
    width: 100%;
}

.fm-resource-buttons__link:hover .fm-resource-buttons__arrow,
.fm-resource-buttons__link:focus-visible .fm-resource-buttons__arrow {
    opacity: 1;
    transform: translateX(5px);
}

.fm-resource-buttons__link:hover .fm-resource-buttons__arrow::before,
.fm-resource-buttons__link:focus-visible .fm-resource-buttons__arrow::before {
    color: var(--white, #f6fafe);
}

.fm-resource-buttons__link:focus-visible {
    outline: 3px solid var(--orange, #f2873b);
    outline-offset: 4px;
}

@media screen and (max-width: 640px) {
    .fm-resource-buttons .fm-resource-buttons__grid {
        grid-template-columns: 1fr;
    }

    .fm-resource-buttons__link {
        min-height: 150px;
        padding: 34px 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fm-resource-buttons__link,
    .fm-resource-buttons__link::before,
    .fm-resource-buttons__link::after,
    .fm-resource-buttons__arrow {
        transition-duration: 0.01ms;
    }
}
