.link-tiles {
    container-type: inline-size;
    margin-bottom: 40px;
}

.link-tiles__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.link-tile {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 11 / 4;
    border-radius: 8px;
    background: #e5ecf2;
    color: #fff;
    text-decoration: none;
}

.link-tile:hover,
.link-tile:focus {
    color: #fff;
    text-decoration: none;
}

.link-tile:focus-visible {
    outline: 3px solid #4dab8c;
    outline-offset: 2px;
}

.link-tile__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.link-tile__text {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 26px;
    padding: 4px 8px;
    background: rgba(34, 34, 34, .55);
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    text-wrap: balance;
}

/* Lines break on the widened space, and the absolutely positioned bar never changes line widths. */
.link-tile__sep {
    position: relative;
    word-spacing: .5em;
}

.link-tile__sep::before {
    content: '|';
    content: '|' / '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.link-tile__sep.is-line-edge::before {
    content: none;
}

@media (hover: hover) {
    .link-tile:hover .link-tile__img {
        transform: scale(1.04);
    }
}

@container (width >= 640px) {
    .link-tiles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .link-tile__text {
        min-height: 36px;
        padding: 5px 12px;
        font-size: 15px;
        line-height: 1.3;
    }
}

@container (width >= 960px) {
    .link-tiles__grid {
        gap: 30px;
    }

    .link-tile__text {
        min-height: 52px;
        padding: 6px 16px;
        font-size: 18px;
        line-height: 1.45;
    }
}

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