/* ==================================================
// 記事詳細ページ (article.css) - Title & Category Layout Update
// =================================================*/

/* --- ヒーローセクション --- */
.post-hero {
    position: relative;
    width: 100%;
    height: 350px;
    background-color: #333;
    margin-top: 73px;
}
.post-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.post-hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* --- メインコンテンツエリア --- */
.main-content {
    padding-top: 40px;
    margin-top: 0;
}
.single-post-article,
.post-author-box,
.post-rating,
.related-posts,
.comments-section {
    background-color: #fff;
    border: 1px solid #e9e9e9;
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 40px;
}
.single-post-article {
    padding: 40px 50px 50px;
}
.post-author-box, .post-rating {
    padding: 30px;
    margin-top: 0;
}
.related-posts, .comments-section {
    padding: 40px 40px 50px;
    margin-top: 0;
}
.comments-section {
    margin-bottom: 0;
}

/* --- 記事タイトルの新しいスタイル --- */
.single-post-article .post-title {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--base-color);
    margin: 0 0 25px 0;
    text-align: left;
}


/* --- 記事メタ情報 --- */
.single-post-header {
    margin-bottom: 40px;
}
.single-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}
.single-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.single-post-meta i {
    color: #999;
    font-size: 1em;
}
.single-post-meta .post-category a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}
.single-post-meta .post-category a:hover {
    text-decoration: underline;
}

/* --- 記事本文の可読性向上 --- */
.single-post-content {
    line-height: 1.85;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.single-post-content > *:first-child {
    margin-top: 0;
}
.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
    margin: 40px 0 20px;
    line-height: 1.4;
    color: var(--base-color);
}
.single-post-content h2 { font-size: 26px; border-bottom: 2px solid var(--pickup-label-color); padding-bottom: 10px; }
.single-post-content h3 { font-size: 22px; border-left: 5px solid var(--pickup-label-color); padding-left: 15px;}
.single-post-content h4 { font-size: 18px; font-weight: 600; }
.single-post-content p { margin-bottom: 20px; }
.single-post-content a { color: var(--accent-color); text-decoration: underline; }
.single-post-content img { max-width: 100%; height: auto; margin: 30px 0; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.single-post-content ul, .single-post-content ol { margin: 0 0 20px 20px; }
.single-post-content blockquote {
    border-left: 4px solid var(--accent-color);
    margin: 30px 0;
    padding: 15px 25px;
    background-color: #f9f9f9;
    font-style: italic;
    color: #555;
}
.single-post-content blockquote p {
    margin: 0;
}

/* --- 目次 --- */
.post-toc {
    background-color: #f9f9f9;
    padding: 25px 30px;
    border-radius: var(--border-radius);
    margin: 30px 0 40px;
    border-left: 5px solid var(--accent-color);
}
.post-toc h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px;
}
.post-toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
.post-toc ul li {
    margin-bottom: 10px;
}
.post-toc ul li:last-child {
    margin-bottom: 0;
}
.post-toc ul li a {
    color: var(--base-color);
    text-decoration: none;
    font-size: 15px;
}
.post-toc ul li a:hover {
    text-decoration: underline;
}

/* --- 記事フッター (タグ・シェアボタン) --- */
.single-post-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}
.post-tags .tag-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.post-tags .tag-links a {
    display: inline-block;
    background-color: #f5f5f5;
    color: #666;
    padding: 5px 12px;
    margin: 0;
    font-size: 13px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}
.post-tags .tag-links a:hover {
    background-color: var(--accent-color);
    color: white;
}

/* --- シェアボタン (Font Awesome用) --- */
.social-share {
    margin-top: 30px;
    padding: 25px;
    background-color: transparent;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    border-radius: 0;
}
.social-share h3 {
    font-size: 16px;
    margin-bottom: 15px;
}
.share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 130px;
    padding: 10px 15px;
    border-radius: 5px;
    color: white !important;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.share-btn .fa-brands, .share-btn .fa-solid {
    font-size: 16px;
    line-height: 1;
}
.share-btn.x-twitter { background-color: #14171A; }
.share-btn.facebook { background-color: #1877F2; }
.share-btn.line { background-color: #00B900; }
.share-btn.copy-url { background-color: #555; }

/* --- 著者情報ボックス --- */
.post-author-box {
    display: flex;
    gap: 25px;
    align-items: center;
}
.author-avatar img {
    border-radius: 50%;
}
.author-info .author-name a {
    font-size: 18px;
    font-weight: 700;
    color: var(--base-color);
    text-decoration: none;
}
.author-info .author-description {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    line-height: 1.7;
}

/* --- 記事評価セクション (Font Awesome用) --- */
.post-rating {
    border-top: 1px solid #f0f0f0;
}
.post-rating h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--base-color);
}
.rating-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
}
.rating-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 180px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}
.rating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    border-color: var(--accent-color);
}
.rating-btn i {
    font-size: 28px;
    transition: color 0.3s ease;
}
.rating-btn.good i { color: #28a745; }
.rating-btn.bad i { color: #dc3545; }
.rating-btn .rating-text {
    font-weight: 600;
    color: var(--base-color);
}
.rating-btn .rating-count {
    font-size: 13px;
    color: #888;
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}
.rating-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* --- 関連記事 --- */
.related-posts h3 {
    font-size: 22px;
    text-align: center;
    margin-bottom: 30px;
}
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.related-post-item {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.3s;
}
.related-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.related-post-item .post-thumbnail a { display: block; height: 150px; }
.related-post-item .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.related-post-item .post-content { padding: 15px; }
.related-post-item .post-title { font-size: 15px; margin-bottom: 10px; }
.related-post-item .post-title a { color: var(--base-color); text-decoration: none; }
.related-post-item .post-meta { font-size: 12px; color: #888; }

/* --- コメントセクションのデザイン刷新 --- */
.comments-section .comments-title,
.comments-section .comment-reply-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--base-color);
}
.comment-list {
    list-style: none;
    padding: 0;
}
.comment-list .comment {
    padding: 25px 0;
    border-top: 1px solid #f0f0f0;
}
.comment-list .comment:first-child {
    border-top: none;
    padding-top: 0;
}
.comment-list .children {
    list-style: none;
    padding-left: 5%;
    margin-top: 20px;
    border-top: 1px dashed #e0e0e0;
}
.comment-body {
    display: grid;
    grid-template-areas: "avatar author" "avatar content" "avatar meta";
    grid-template-columns: 60px 1fr;
    gap: 0 20px;
}
.comment-author {
    grid-area: author;
    display: flex;
    align-items: center;
    gap: 10px;
}
.comment-author .avatar {
    grid-area: avatar;
    border-radius: 50%;
}
.comment-author .fn a {
    font-weight: 700;
    color: var(--base-color);
    text-decoration: none;
    font-style: normal;
}
.comment-content {
    grid-area: content;
    padding: 10px 0;
}
.comment-meta {
    grid-area: meta;
    font-size: 13px;
    color: #888;
}
.comment-meta a {
    color: #888;
    text-decoration: none;
}
.reply .comment-reply-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    border: 1px solid var(--accent-color);
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}
.reply .comment-reply-link:hover {
    background-color: var(--accent-color);
    color: white;
}
/* コメントフォーム */
.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}
.comment-form p {
    margin-bottom: 20px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.15);
}
.comment-form .required {
    color: #d32f2f;
}
.comment-form .form-submit .submit {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.comment-form .form-submit .submit:hover {
    background-color: #005a87;
}
.logged-in-as, .comment-notes {
    font-size: 14px;
    color: #666;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

/* ==================================================
// レスポンシブデザインの調整
// =================================================*/

@media (max-width: 768px) {
    /* --- タブレット表示の調整 --- */
    .post-hero {
        margin-top: 60px; /* ヘッダーとの隙間を詰める */
        height: 300px;    /* ヒーローイメージの高さを調整 */
    }

    .article-main-header .post-title {
        font-size: 32px; /* タイトルのフォントサイズを調整 */
    }

    .single-post-article,
    .post-author-box,
    .post-rating,
    .related-posts,
    .comments-section {
        padding: 30px; /* 各要素の余白を少し詰める */
    }

    .related-posts-grid {
        grid-template-columns: 1fr; /* 関連記事を1列に */
    }
}

@media (max-width: 480px) {
    /* --- スマートフォン表示の調整 --- */

    .post-hero {
        margin-top: 20px; /* ヘッダーとの隙間をさらに詰める */
        height: 250px;    /* ヒーローイメージの高さをさらに調整 */
    }

    .main-content {
        padding-top: 0;
        margin-top: 0;
    }
    .article-main-header .post-title {
        font-size: 24px; /* タイトルのフォントサイズをさらに調整 */
        line-height: 1.5;
    }

    .single-post-article,
    .post-author-box,
    .post-rating,
    .related-posts,
    .comments-section {
        padding: 20px;
        border: none; /* スマホでは境界線を消してスッキリ見せる */
    }

    .post-author-box {
        flex-direction: column; /* 著者情報を縦積みに */
        text-align: center;
    }
}
