/**
 * Feature Boxes front-end styles.
 * Theme developers can override the custom properties below.
 */
.feature-boxes {
    --fb-gap: 1rem;
    --fb-min-width: 11rem;
    --fb-background: #fff;
    --fb-text: #263238;
    --fb-border: #d8dee3;
    --fb-accent: #005a8b;
    --fb-focus: #005a8b;
    --fb-radius: 0.75rem;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--fb-min-width)), 1fr));
    grid-auto-flow: row;
    gap: var(--fb-gap);
    align-items: stretch;
    width: 100%;
}


.feature-boxes--fixed-columns {
    grid-template-columns: repeat(var(--fb-columns), minmax(0, 1fr));
}

.feature-boxes--hide-icons .feature-box .fb-icon {
    display: none;
}

.feature-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 1.25rem 0.875rem;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    color: var(--fb-text);
    background: var(--fb-background);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.feature-box[href]:hover {
    transform: translateY(-0.25rem);
    border-color: var(--fb-accent);
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.12);
    color: var(--fb-text);
    text-decoration: none;
}

.feature-box[href]:focus {
    outline: 0.2rem solid var(--fb-focus);
    outline-offset: 0.2rem;
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 0.15rem #fff;
}

/* Preserve a visible focus indicator in browsers without :focus-visible. */
.feature-box[href]:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.feature-box--non-link {
    cursor: default;
}

.feature-box .fb-icon {
    display: flex;
    flex: 0 0 3.25rem;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0 0 0.75rem;
    padding: 0;
    color: var(--fb-accent);
    border: 0;
    border-radius: 0;
}

.feature-box .fb-icon svg,
.feature-box .fb-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-box .fb-icon svg {
    fill: currentColor;
}

.feature-box .fb-title {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: inherit;
    font-family: var(--secondary-font, inherit);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
    min-width: 0;
    max-width: 100%;
    /*
     * English titles must wrap only at spaces or author-supplied hyphens.
     * The language-specific rule below enables automatic hyphenation and an
     * emergency wrap for languages that commonly contain long compound words.
     */
    overflow-wrap: normal;
    word-break: normal;
    -webkit-hyphens: manual;
    hyphens: manual;
}

/*
 * :lang() uses the inherited document language. This keeps English words
 * intact while allowing translated content and other non-English languages to
 * hyphenate or wrap rather than overflow.
 */
.feature-box .fb-title:not(:lang(en)) {
    overflow-wrap: break-word;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
}

@media (max-width: 480px) {
    .feature-boxes {
        --fb-gap: 0.75rem;
        box-sizing: border-box;
        grid-template-columns: repeat(var(--fb-mobile-columns, 2), minmax(0, 1fr));
        width: calc(100vw - 0.5rem) !important;
        max-width: none !important;
        margin-left: calc(50% - 50vw + 0.25rem) !important;
        margin-right: calc(50% - 50vw + 0.25rem) !important;
    }

    @supports (width: 100dvw) {
        .feature-boxes {
            width: calc(100dvw - 0.5rem) !important;
            margin-left: calc(50% - 50dvw + 0.25rem) !important;
            margin-right: calc(50% - 50dvw + 0.25rem) !important;
        }
    }

    .feature-box {
        padding: 1rem 0.625rem;
    }

    .feature-box .fb-title {
        font-size: clamp(0.75rem, 3.5vw, 0.875rem);
        letter-spacing: 0.035em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feature-box {
        transition: none;
    }

    .feature-box[href]:hover {
        transform: none;
    }
}
