/* ============================================================
   Block: 関連作品（acf/related-works）
   ============================================================ */

.cv-related {
    margin: 1.5em 0;
}

.cv-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-related__item {
    list-style: none;
    margin: 0;
}

.cv-related__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: color .15s ease;
}

.cv-related__thumb {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #f4f4f4;
    border: 1px solid #e5e7eb;
    transition: border-color .15s ease;
}

.cv-related__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cv-related__title {
    margin-top: 8px;
    font-size: .88em;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
    /* 2 行で省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .15s ease;
}

.cv-related__link:hover .cv-related__thumb,
.cv-related__link:focus-visible .cv-related__thumb {
    border-color: #fc2348;
}

.cv-related__link:hover .cv-related__title,
.cv-related__link:focus-visible .cv-related__title {
    color: #fc2348;
}

/* スマホ: 2 列固定で詰める */
@media (max-width: 480px) {
    .cv-related__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .cv-related__title {
        font-size: .82em;
    }
}
