.mejor-amigas {
    width: min(100%, calc(100vw - 1rem));
    container-type: inline-size;
}

.mejor-amigas h2 {
    padding: 0.375rem 0.625rem;
}

.mejor-amigas-enlaces {
    display: grid;
    justify-items: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.mejor-amigas a,
.mejor-rescates-ficha {
    display: grid;
    place-items: center;
    min-height: 44px;
}

.mejor-amigas a:hover,
.mejor-rescates-ficha:hover {
    opacity: 0.9;
}

.mejor-amigas a:focus-visible,
.mejor-rescates-ficha:focus-visible {
    outline: 2px solid #293f88;
    outline-offset: 2px;
}

.mejor-amigas-cinubo {
    width: min(100%, 175px);
}

.mejor-amigas-rescates {
    width: min(100%, 265px);
}

.mejor-amigas img,
.mejor-rescates-ficha img {
    display: block;
    width: 100%;
    height: auto;
}

.mejor-rescates-estrecho {
    display: none;
}

@container (max-width: 231px) {
    .mejor-amigas .mejor-rescates-original {
        display: none;
    }

    .mejor-rescates-estrecho {
        display: block;
        width: 100%;
        background: #294d79;
        color: white;
        text-align: center;
        line-height: 1.2;
    }

    .mejor-rescates-estrecho::before {
        content: "";
        display: block;
        aspect-ratio: 104 / 58;
        background: url("../images/mejortorrent/rescates_1.png") left center / 625% auto no-repeat;
    }

    .mejor-rescates-estrecho strong,
    .mejor-rescates-estrecho span {
        display: block;
        padding-inline: 0.25rem;
    }

    .mejor-rescates-estrecho strong {
        padding-top: 0.375rem;
        font-size: 0.9375rem;
    }

    .mejor-rescates-estrecho span {
        padding-block: 0.125rem 0.375rem;
        font-size: 0.75rem;
    }
}

@container (min-width: 500px) {
    .mejor-amigas-enlaces {
        grid-template-columns: 175px 265px;
        justify-content: center;
        column-gap: 1rem;
    }
}

.mejor-rescates-ficha {
    width: min(100%, 650px, calc(100vw - 1rem));
    margin: 0 auto 0.75rem;
}

.mejor-rescates-ficha picture {
    display: block;
    width: 100%;
}

@media (1024px <= width < 1280px) {
    .mejor-rescates-ficha {
        margin-top: 0.75rem;
    }
}

@media (max-width: 599px) {
    .mejor-rescates-ficha {
        width: min(100%, calc(100vw - 1rem));
        margin-inline: 0;
    }

    .mejor-rescates-ficha picture {
        width: min(100%, 265px);
    }
}
