/* ========================================
   記事投稿ページ専用CSS (single.php)
   ======================================== */

   .single-post {
    min-height: 100vh;
    padding: 6rem 0 3rem 0; /* ヘッダーとの余白を確保するため上のパディングを増加 */
    background: inherit;
}

.single-post__container {
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
}

/* パンくずリスト */
.breadcrumb {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUpSingle 0.8s ease-out forwards;
}

.breadcrumb__list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
}

.breadcrumb__item::after {
    content: '>';
    margin-left: 0.5rem;
    color: #666;
}

.breadcrumb__item:last-child::after {
    content: '';
}

.breadcrumb__item a {
    color: #ccc !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.breadcrumb__item a:hover {
    color: #fff !important;
    text-decoration: none !important;
}

.breadcrumb__item--current {
    color: #fff !important;
    font-weight: normal;
}

/* ヘッダー */
.single-post__header {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSingle 0.8s ease-out 0.2s forwards;
}

.single-post__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.single-post__date {
    color: #ccc !important;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
}

.single-post__category {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.single-post__title {
    font-size: 2.5rem;
    color: #fff !important;
    font-weight: normal;
    letter-spacing: 0.1em;
    line-height: 1.3;
    margin: 0;
}

/* メインコンテンツ */
.single-post__content {
    color: #fff !important;
    font-size: 1.1rem;
    line-height: 1.8;
    letter-spacing: 0.1em;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSingle 0.8s ease-out 0.4s forwards;
}

.single-post__content h1 {
    font-size: 2.2rem;
    margin: 3rem 0 2rem 0;
    color: #fff !important;
    font-weight: normal;
    letter-spacing: 0.1em;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.single-post__content h2 {
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem 0;
    color: #fff !important;
    font-weight: normal;
    letter-spacing: 0.1em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.single-post__content h2::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
}

.single-post__content h3 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem 0;
    color: #fff !important;
    font-weight: normal;
    letter-spacing: 0.1em;
    position: relative;
    padding-left: 1rem;
}

.single-post__content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.2em;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.single-post__content h4 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem 0;
    color: #fff !important;
    font-weight: normal;
    letter-spacing: 0.1em;
    padding-left: 0.5rem;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.single-post__content h5 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.8rem 0;
    color: #fff !important;
    font-weight: normal;
    letter-spacing: 0.1em;
}

.single-post__content h6 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem 0;
    color: #fff !important;
    font-weight: normal;
    letter-spacing: 0.1em;
}

.single-post__content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #fff !important;
}

.single-post__content ul,
.single-post__content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
    color: #fff !important;
}

.single-post__content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #fff !important;
}

.single-post__content ul li::marker {
    color: rgba(255, 255, 255, 0.7);
}

.single-post__content ol li::marker {
    color: rgba(255, 255, 255, 0.7);
}

.single-post__content blockquote {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    border-radius: 0 4px 4px 0;
    color: #fff !important;
}

.single-post__content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #fff !important;
}

.single-post__content pre {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.single-post__content pre code {
    background: none;
    padding: 0;
    color: #fff !important;
}

.single-post__content a {
    color: #fff !important;
    text-decoration: underline !important;
    transition: opacity 0.3s ease;
}

.single-post__content a:hover {
    opacity: 0.7;
    color: #fff !important;
    text-decoration: underline !important;
}

.single-post__content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.single-post__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.single-post__content th,
.single-post__content td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.single-post__content th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: normal;
    letter-spacing: 0.1em;
}

.single-post__content strong {
    color: #fff !important;
    font-weight: bold;
}

.single-post__content em {
    color: #fff !important;
    font-style: italic;
}

/* ブログ一覧へ戻るボタン */
.back-to-blog {
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSingle 0.8s ease-out 0.6s forwards;
}

.back-to-blog__btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 1rem;
    letter-spacing: 0.2em;
    transition: all 0.3s ease;
}

.back-to-blog__btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    color: #fff !important;
    text-decoration: none !important;
}

/* ========================================
   目次（Table of Contents）のスタイル
   ======================================== */

.table-of-contents {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSingle 0.8s ease-out 0.3s forwards;
}

.toc-title {
    font-size: 1.2rem;
    color: #fff !important;
    margin-bottom: 1rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.toc-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    display: block;
    padding: 0.3rem 0;
    border-left: 3px solid transparent;
    padding-left: 0.5rem;
}

.toc-list a:hover {
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none !important;
    border-left-color: rgba(255, 255, 255, 0.5);
    padding-left: 1rem;
}

.toc-indent-1 a {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.toc-indent-1 a:hover {
    padding-left: 2rem;
}

.toc-indent-2 a {
    padding-left: 2.5rem;
    font-size: 0.85rem;
}

.toc-indent-2 a:hover {
    padding-left: 3rem;
}

/* ========================================
   関連記事（Related Posts）のスタイル
   ======================================== */

.related-posts {
    margin: 4rem 0;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpSingle 0.8s ease-out 0.5s forwards;
}

.related-posts__title {
    font-size: 1.8rem;
    color: #fff !important;
    margin-bottom: 2rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.related-post {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.related-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.related-post__link {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    padding: 1.5rem;
}

.related-post__link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

.related-post__content {
    width: 100%;
}

.related-post__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.related-post__date {
    color: #999 !important;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.related-post__category {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.related-post__title {
    color: #fff !important;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
    letter-spacing: 0.1em;
    line-height: 1.4;
}

.related-post__excerpt {
    color: #ccc !important;
    font-size: 0.85rem;
    line-height: 1.5;
    letter-spacing: 0.1em;
}

/* アニメーション */
@keyframes fadeInUpSingle {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* レスポンシブ対応 */
@media (max-width: 1000px) {
    .single-post {
        padding: 5rem 0 3rem 0; /* デスクトップより少し小さめに調整 */
    }

    .single-post__container {
        width: 90%;
    }

    .single-post__title {
        font-size: 2rem;
    }

    .single-post__content {
        font-size: 1rem;
    }

    .single-post__content h1 {
        font-size: 1.8rem;
    }

    .single-post__content h2 {
        font-size: 1.5rem;
    }

    .single-post__content h3 {
        font-size: 1.3rem;
    }

    .single-post__content h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .single-post {
        padding: 4rem 0 2rem 0; /* スマホ用により適切なサイズに調整 */
    }

    .single-post__container {
        width: 95%;
    }

    .single-post__title {
        font-size: 1.5rem;
    }

    .single-post__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .breadcrumb__list {
        flex-wrap: wrap;
        font-size: 0.8rem;
    }

    .single-post__content {
        font-size: 0.95rem;
    }

    .single-post__content h1 {
        font-size: 1.5rem;
    }

    .single-post__content h2 {
        font-size: 1.3rem;
    }

    .single-post__content h3 {
        font-size: 1.1rem;
    }

    .single-post__content th,
    .single-post__content td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* 目次のレスポンシブ対応 */
    .table-of-contents {
        padding: 1.5rem;
    }

    .toc-title {
        font-size: 1.1rem;
    }

    .toc-list a {
        font-size: 0.9rem;
    }

    .toc-indent-1 a {
        font-size: 0.85rem;
    }

    .toc-indent-2 a {
        font-size: 0.8rem;
    }

    /* 関連記事のレスポンシブ対応 */
    .related-posts__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-post__link {
        padding: 1rem;
    }

    .related-post__title {
        font-size: 0.9rem;
    }

    .related-post__excerpt {
        font-size: 0.8rem;
    }
}