/*
 * 単一投稿ページ専用CSS
 * ブログ記事の詳細表示ページ
 */

/* ==========================================================================
   投稿ヘッダー
   ========================================================================== */

.single-post-header {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(52, 152, 219, 0.8) 100%),
        url('/path/to/default-bg.jpg') center/cover;
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
    margin-bottom: 40px;
}

.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.single-post-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.single-post-date,
.single-post-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.single-post-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    animation: fadeInUp 0.8s ease;
}

.single-post-excerpt {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.6;
    margin: 0;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ==========================================================================
   投稿本文
   ========================================================================== */

.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 60px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin-top: -30px;
    position: relative;
    z-index: 2;
}

.post-content {
    padding: 50px 40px;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

/* 本文内の見出し */
.post-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
    margin: 40px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #74ACDD;
    position: relative;
}

.post-content h2::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #3498db;
}

.post-content h3 {
    color: #34495e;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid #74ACDD;
}

.post-content h4 {
    color: #34495e;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 25px 0 12px 0;
}

/* 本文内のテキスト */
.post-content p {
    margin-bottom: 24px;
    line-height: 1.8;
}

.post-content ul,
.post-content ol {
    margin: 20px 0;
    padding-left: 25px;
}

.post-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

/* 引用 */
.post-content blockquote {
    background-color: #f8f9fa;
    border-left: 5px solid #74ACDD;
    margin: 30px 0;
    padding: 20px 25px;
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
}

.post-content blockquote p {
    margin-bottom: 0;
}

/* 画像 */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 25px 0;
}

.post-content figure {
    margin: 30px 0;
    text-align: center;
}

.post-content figcaption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    font-style: italic;
}

/* テーブル */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.post-content th {
    background-color: #74ACDD;
    color: #fff;
    font-weight: 600;
}

.post-content tr:hover {
    background-color: #f8f9fa;
}

/* コードブロック */
.post-content pre {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 25px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-content code {
    background-color: #f1f2f3;
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
}

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

/* ==========================================================================
   投稿フッター
   ========================================================================== */

.single-post-footer {
    padding: 30px 40px;
    border-top: 2px solid #f1f2f3;
    background-color: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.post-tags-section {
    margin-bottom: 25px;
}

.post-tags-title {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.post-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tag-link {
    background-color: #fff;
    color: #666;
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.85rem;
    border: 1px solid #e1e1e1;
    transition: all 0.3s ease;
}

.post-tag-link:hover {
    background-color: #74ACDD;
    color: #fff;
    border-color: #74ACDD;
}

.post-share {
    text-align: center;
}

.post-share-title {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.share-button.twitter {
    background-color: #1da1f2;
}

.share-button.facebook {
    background-color: #1877f2;
}

.share-button.line {
    background-color: #00c300;
}

.share-button.copy {
    background-color: #95a5a6;
}

/* ==========================================================================
   ナビゲーション（前の記事・次の記事）
   ========================================================================== */

.post-navigation {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-previous,
.nav-next {
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.nav-previous:hover,
.nav-next:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.nav-subtitle {
    font-size: 0.85rem;
    color: #74ACDD;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   関連記事
   ========================================================================== */

.related-posts {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.related-posts-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 40px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.related-post-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.related-post-image {
    height: 150px;
    background-color: #f8f9fa;
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 20px;
}

.related-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.related-post-date {
    font-size: 0.85rem;
    color: #95a5a6;
}

/* ==========================================================================
   レスポンシブデザイン
   ========================================================================== */

@media (max-width: 768px) {
    .single-post-header {
        padding: 60px 0 40px;
    }

    .single-post-title {
        font-size: 2.2rem;
    }

    .single-post-excerpt {
        font-size: 1.1rem;
    }

    .single-post-meta {
        flex-direction: column;
        gap: 10px;
    }

    .post-content {
        padding: 30px 25px;
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.6rem;
    }

    .post-content h3 {
        font-size: 1.3rem;
    }

    .single-post-footer {
        padding: 25px;
    }

    .nav-links {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {

    .single-post-container,
    .single-post-content {
        padding: 0 15px;
    }

    .single-post-title {
        font-size: 1.8rem;
    }

    .post-content {
        padding: 25px 20px;
    }

    .nav-previous,
    .nav-next {
        padding: 20px;
    }

    .post-tags-list {
        justify-content: center;
    }
}

/* ==========================================================================
   アニメーション
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 投稿コンテンツのアニメーション */
.post-content>* {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.post-content>*:nth-child(1) {
    animation-delay: 0.1s;
}

.post-content>*:nth-child(2) {
    animation-delay: 0.2s;
}

.post-content>*:nth-child(3) {
    animation-delay: 0.3s;
}

.post-content>*:nth-child(4) {
    animation-delay: 0.4s;
}

.post-content>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* 関連記事のアニメーション */
.related-post-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.related-post-card:nth-child(1) {
    animation-delay: 0.1s;
}

.related-post-card:nth-child(2) {
    animation-delay: 0.2s;
}

.related-post-card:nth-child(3) {
    animation-delay: 0.3s;
}