.wp-block-sharpfamily-adjacent-posts {
    clear: both;
    margin-top: 40px;
    margin-bottom: 40px;
}

.sharpfamily-adjacent-posts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 0;
}

.sharpfamily-adjacent-posts.is-single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 75%;
}

.sharpfamily-adjacent-posts__item {
    min-width: 0;
    margin: 0;
}

.sharpfamily-adjacent-posts__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.sharpfamily-adjacent-posts__link:hover,
.sharpfamily-adjacent-posts__link:focus {
    color: #333;
    border-color: #999;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
    text-decoration: none;
}

.sharpfamily-adjacent-posts__link:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 3px;
}

.sharpfamily-adjacent-posts__thumbnail {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #eee;
}

.sharpfamily-adjacent-posts__thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.sharpfamily-adjacent-posts__link:hover
.sharpfamily-adjacent-posts__thumbnail img {
    transform: scale(1.03);
}

.sharpfamily-adjacent-posts__thumbnail--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 13px;
}

.sharpfamily-adjacent-posts__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 15px 18px 18px;
}

.sharpfamily-adjacent-posts__label {
    display: block;
    margin-bottom: 6px;
    color: #777;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.sharpfamily-adjacent-posts__item--previous
.sharpfamily-adjacent-posts__label::before {
    content: "← ";
}

.sharpfamily-adjacent-posts__item--next
.sharpfamily-adjacent-posts__label {
    text-align: right;
}

.sharpfamily-adjacent-posts__item--next
.sharpfamily-adjacent-posts__label::after {
    content: " →";
}

.sharpfamily-adjacent-posts__title {
    display: block;
    margin: 0;
    color: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

@media screen and (max-width: 767px) {
    .sharpfamily-adjacent-posts {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .sharpfamily-adjacent-posts.is-single {
        max-width: none;
    }

    .sharpfamily-adjacent-posts__content {
        padding: 13px 15px 16px;
    }

    .sharpfamily-adjacent-posts__title {
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sharpfamily-adjacent-posts__link,
    .sharpfamily-adjacent-posts__thumbnail img {
        transition: none;
    }

    .sharpfamily-adjacent-posts__link:hover,
    .sharpfamily-adjacent-posts__link:focus {
        transform: none;
    }
}
