/* -----------------------------------------------------------
    関連記事（記事下部 / include/related-posts.php）
    辞書ページの .p-related と同じ見た目
----------------------------------------------------------- */
.p-related {
    margin-top: 60px;
    margin-bottom: 40px;
}

.p-related__heading,
.p-related h3.dc-ttl {
    margin: 0 0 30px;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
    color: #111;
}

.p-related__list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.p-related__item {
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    overflow: hidden;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
}

.p-related__item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-4px) !important;
}

.p-related__link {
    display: block !important;
    text-decoration: none !important;
    color: #111 !important;
}

.p-related__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8f8fa;
}

.p-related__thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.p-related__item:hover .p-related__thumb img {
    transform: scale(1.05);
}

.p-related__cat {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff;
    color: #ff5000;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 2;
    border: 1px solid #ff5000;
}

.p-related__date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #ff5000;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    text-align: center;
    line-height: 1.1;
    z-index: 2;
}

.p-related__date span {
    display: block;
}

.p-related__date .m {
    font-size: 12px;
}

.p-related__date .d {
    font-size: 18px;
    font-weight: bold;
    margin: 2px 0;
}

.p-related__date .y {
    font-size: 10px;
    opacity: 0.9;
}

.p-related__body {
    padding: 15px 20px !important;
}

.p-related__title {
    font-size: 15px !important;
    font-weight: bold !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

@media screen and (max-width: 768px) {
    .p-related__list {
        grid-template-columns: 1fr !important;
    }

    .p-related__heading,
    .p-related h3.dc-ttl {
        font-size: 20px;
    }
}
