/* 投稿記事専用スタイル */

/* 記事ヘッダー */
.post-header {
    margin-bottom: 30px;
}

/* カテゴリー */
.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: #005081;
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.post-category:hover {
    background-color: #003d63;
}

/* 記事タイトル */
.post-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* 投稿日 */
.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.post-date {
    display: flex;
    align-items: center;
}

.post-date::before {
    content: '📅';
    margin-right: 5px;
}

/* アイキャッチ画像 */
.post-thumbnail {
    margin-bottom: 30px;
    overflow: hidden;
    border-radius: 8px;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 記事本文 */
.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

/* 本文内の段落 */
.post-content p {
    margin-bottom: 1.5em;
}

/* 本文内の画像 */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 本文内のリスト */
.post-content ul,
.post-content ol {
    margin: 1.5em 0;
    padding-left: 2em;
}

.post-content li {
    margin-bottom: 0.5em;
}

/* 本文内のテーブル */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    overflow-x: auto;
    display: block;
}

.post-content th,
.post-content td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.post-content th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #005081;
}

.post-content tr:nth-child(even) {
    background-color: #fafafa;
}

/* 本文内の引用 */
.post-content blockquote {
    border-left: 4px solid #005081;
    padding-left: 20px;
    margin: 1.5em 0;
    color: #555;
    font-style: italic;
}

/* 本文内のコード */
.post-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5em 0;
}

.post-content pre code {
    background-color: transparent;
    padding: 0;
}

/* ページネーション */
.post-pagination {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-pagination a {
    padding: 8px 12px;
    background-color: #f5f5f5;
    color: #005081;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.post-pagination a:hover {
    background-color: #005081;
    color: #fff;
}

/* タグ */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.post-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f5f5f5;
    color: #333;
    font-size: 12px;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.post-tag::before {
    content: '#';
    margin-right: 2px;
}

.post-tag:hover {
    background-color: #005081;
    color: #fff;
}

/* 記事内のH2タイトル */
.single article h2 {
    position: relative;
    padding-left: 45px;
    padding-right: 1em;
    padding-bottom: 10px;
    margin: 40px 0 20px;
    color: #005081;
    font-size: 24px;
    font-weight: 700;
    display: block;
    border-bottom: 2px solid #005081;
    width: fit-content;
}

.single article h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-image: url('h2-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 記事内のH3タイトル */
.single article h3 {
    position: relative;
    padding-left: 15px;
    padding-right: 1em;
    padding-bottom: 8px;
    margin: 30px 0 15px;
    color: #005081;
    font-size: 20px;
    font-weight: 700;
    border-left: 4px solid #005081;
    border-bottom: 1px solid #005081;
    display: block;
    width: fit-content;
}

/* 記事内のH4タイトル */
.single article h4 {
    position: relative;
    padding-left: 12px;
    margin: 25px 0 12px;
    color: #005081;
    font-size: 18px;
    font-weight: 600;
    border-left: 3px solid #005081;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    /* 記事タイトル */
    .post-title {
        font-size: 24px;
    }

    /* 記事本文 */
    .post-content {
        font-size: 15px;
    }

    /* アイキャッチ画像 */
    .post-thumbnail {
        margin-bottom: 20px;
        border-radius: 4px;
    }

    /* カテゴリー・タグ */
    .post-category,
    .post-tag {
        font-size: 11px;
        padding: 3px 10px;
    }

    /* 投稿日 */
    .post-meta {
        font-size: 13px;
    }

    /* テーブル */
    .post-content table {
        font-size: 14px;
    }

    .post-content th,
    .post-content td {
        padding: 8px;
    }

    /* 見出し */
    .single article h2 {
        font-size: 20px;
        padding-left: 40px;
    }

    .single article h2::before {
        width: 25px;
        height: 25px;
    }

    .single article h3 {
        font-size: 18px;
        padding-left: 12px;
        border-left-width: 3px;
    }

    .single article h4 {
        font-size: 16px;
        padding-left: 10px;
        border-left-width: 2px;
    }
}
