/* 関連記事セクション全体 */
.p-related-posts {
    margin-top: 80px;
}

/* 関連記事専用の見出しスタイル */
.p-related-posts__header {
    text-align: center;
    position: relative;
    margin-bottom: 40px;
}

/* 中央を横切る線 */
.p-related-posts__header::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ddd; /* 線の色 */
    z-index: 1;
}

/* テキスト部分（背景色で線を隠す） */
.p-related-posts__header-title {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    background-color: #fff; /* 記事エリアの背景色（白）に合わせる */
    z-index: 2;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* 3カラムレイアウト */
.p-related-posts__list {
    display: flex;
    gap: 20px;
}

.p-related-posts__item {
    flex: 1;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

.p-related-posts__item:hover {
    opacity: 0.8;
}

.p-related-posts__thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 15px;
}

.p-related-posts__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ★タイトルを3行で制限し、...を表示する */
.p-related-posts__title {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 700;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* 行数を指定 */
    overflow: hidden;
}

@media (max-width: 768px) {
    .p-related-posts__list {
        flex-direction: column;
    }
}