/*
投稿ページ用CSS
*/

/*タイトル周辺エリア*/

.single-post{
    width:100%;
    overflow: hidden;
}

.single-post-header a{
    text-decoration: none;
    color: var(--color-text);
}

.single-post-header .single-post-thumbnail{
    width:100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    padding:0 1rem;
}

.single-post-header .single-post-thumbnail img{
    width:100%;
    height:auto;
    object-fit: cover;
    aspect-ratio: 16/9;
    border:1px solid var(--color-tertiary);
}   

.single-post-header .single-post-meta-container{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding-left:1rem;
}

.single-post-header .single-post-meta-container .single-post-category{
    border: 1px solid var(--color-tertiary);
    padding: 0 0.5rem;
    font-size:0.8rem;
}

.single-post-header .single-post-meta-container .single-post-date{
    padding-left: 1rem;
    font-size:1rem;
}

.single-post-header h1{
    font-size: 1.3rem;
    font-weight: 700;
    padding:0.5rem 1rem;
}

.single-post-header .single-post-author{
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding:0.5rem 1rem 0 0;
}

.single-post-header .single-post-author .single-post-author-avatar{
    aspect-ratio: 1/1;
    height:1.5rem;
}

.single-post-header .single-post-author .single-post-author-avatar img{
    object-fit: cover;
    width: 100%;
    height:100%;
    border-radius: 50%;
}

.single-post-header .single-post-author .single-post-author-name{
    padding-left: 0.5rem;
    font-size: 1rem;
    letter-spacing: 0.1rem;
}

@media screen and (min-width: 768px) {
    .single-post{
        max-width: var(--max-width_pc_content);
        margin: 0 auto;
    }

    .single-post-header .single-post-meta-container .single-post-category{
        font-size:0.7rem;
    }
    
    .single-post-header .single-post-meta-container .single-post-date{
        padding-left:0.5rem;
        font-size:0.7rem;
    }
}

/*
目次
*/

.toc-container{
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--color-text);
    margin:1rem auto;
    padding: 1rem;
}

.toc-header{
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
}

.toc-content{  
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.toc-text{
    font-size: 1rem;
    font-weight: 700;
}

.toc-text::before{
    content: "・";
    display: inline-block;
    margin-right: 0.25rem;
}

.toc-text a{
    text-decoration: none;
    color: var(--color-text);
}

.toc-text a:hover{
    opacity: 0.8;
}

.toc-text a:active{
    opacity: 0.6;
}

.toc-text a:visited{
    opacity: 0.6;
}

@media screen and (min-width: 768px) {
    .toc-container{
        max-width:500px;
    }

    .toc-header{
        font-size: 1rem;
        padding-bottom: 0.3rem;
    }

    
    .toc-text{
        font-size: 0.8rem;
    }
}

/*
contentsの中身
*/

.single-post-content{
    max-width:100%;
    margin: 0 auto;
    padding: 1rem;
}

@media screen and (min-width: 768px) {
    .single-post-content{
        max-width: var(--max-width_pc_content);
    }
}

/*ブロックのスタイルはblock.cssで設定*/

/*
タグ
*/

.single-post-tags{
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem;
    
}

.single-post-tags .single-post-tag-item a{
    text-decoration: none;
    color: var(--color-text);
    padding: 0.1rem 0.25rem;
}

.single-post-tags .single-post-tag-item{
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
}

/*
著者情報ボックス
*/

.author-info-box{
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--color-tertiary);
    margin:1rem;
}

.author-info-box .author-avater{
    aspect-ratio: 1/1;
    height:4rem;
    
}

.author-info-box .author-avater img{
    object-fit: cover;
    width: 100%;
    height:100%;
    border-radius: 50%;
}

.author-info-box .author-info-container .author-meta-container{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding-left: 1rem;
}   

.author-info-box .author-info-container .author-meta-container .author-name{
    font-size: 1.2rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
}

.author-info-box .author-info-container .author-meta-container .author-bio{
    font-size: 0.9rem;
}

.author-info-box .author-info-container .author-post-link{
    font-size: 0.9rem;
    padding: 1rem 0.5rem 0 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.author-info-box .author-info-container .author-post-link a{
    color: var(--color-text);
}

/*
関連記事
*/

.related-posts{
    margin:1rem 0;
}

.related-posts .related-post-title{
    font-size: 1.4rem;
    font-weight: 700;
    padding:0 0 0 1rem;
    letter-spacing: 0.1rem;
}

.related-posts .related-post-list{
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 1行に2つのアイテム */
    gap: 0.7rem; /* アイテム間の間隔 */
    padding: 1rem;
}

.related-posts .related-post-list .related-post-item{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;

}

.related-posts .related-post-list .related-post-item .related-post-thumbnail{
    width:100%;
}

.related-posts .related-post-list .related-post-item .related-post-thumbnail img{
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
    height:100%;
    border:1px solid var(--color-tertiary);
}

.related-posts .related-post-list .related-post-item .related-post-item-title{
    font-size: 0.9rem;
    font-weight: 700;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 3; /* 最大3行に制限 */
    line-clamp: 3; /* 最大3行に制限（一部ブラウザ） */
    text-overflow: ellipsis;
}

.related-posts .related-post-list .related-post-item .related-post-item-title a{
    text-decoration: none;
    color: var(--color-text);
}

@media screen and (min-width: 768px) {
    .related-posts .related-post-list{
        grid-template-columns: repeat(3, 1fr); /* 1行に2つのアイテム */
        gap: 1rem;
    }
}