/* Single Post Styles */
.single-post {
    margin-top: 80px;
}

/* ヘッダーセクション */
.post-header {
    background: linear-gradient(to right, #000, #333);
    color: #fff;
    padding: 120px 0 180px; /* 下部の余白を増やしてオーバーラップ効果を作る */
    position: relative;
}

.post-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #fff);
}

.post-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.post-category {
    margin-bottom: 30px;
}

.post-category a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
}

.post-category a:hover {
    background-color: #fff;
    color: #000;
}

.post-title {
    font-size: 42px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 40px;
    letter-spacing: 0.05em;
}

/* メインコンテンツ */
.post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.post-thumbnail {
    margin: -150px auto 60px; /* ヘッダーとオーバーラップ */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.post-content {
    font-size: 16px;
    line-height: 2;
    color: #333;
}

.post-content p {
    margin-bottom: 2em;
}

.post-content h2 {
    font-size: 28px;
    font-weight: bold;
    margin: 3em 0 1.5em;
    position: relative;
    padding-left: 20px;
}

.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #000, #333);
    border-radius: 2px;
}

.post-content h3 {
    font-size: 24px;
    font-weight: bold;
    margin: 2em 0 1em;
    color: #000;
}

/* 著者情報 */
.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 50px;
    padding: 30px;
    background: #f8f8f8;
    border-radius: 12px;
}

.author-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* シェアボタン */
.share-buttons {
    margin: 60px 0;
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid #eee;
}

.share-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.share-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.share-button:hover {
    transform: translateY(-3px);
}

.twitter { background-color: #1DA1F2; }
.facebook { background-color: #4267B2; }
.instagram { 
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* 関連記事 */
.related-posts {
    background-color: #f9f9f9;
    padding: 100px 0;
    margin-top: 80px;
}

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

.related-title {
    text-align: center;
    margin-bottom: 60px;
    font-size: 32px;
    font-weight: bold;
    position: relative;
}

.related-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #000;
    margin: 20px auto 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .post-header {
        padding: 80px 0 140px;
    }

    .post-title {
        font-size: 32px;
    }

    .post-thumbnail {
        margin-top: -100px;
    }

    .related-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .share-links {
        flex-direction: column;
        align-items: center;
    }

    .share-button {
        width: 200px;
    }
}

/* 要素が下からフェードインしながら登場 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-header-content {
    animation: fadeInUp 0.8s ease-out;
}

.post-thumbnail {
    animation: fadeInUp 1s ease-out 0.2s;
    animation-fill-mode: backwards;
}

.post-content {
    animation: fadeInUp 1s ease-out 0.4s;
    animation-fill-mode: backwards;
}

.post-thumbnail {
    transform: translateY(var(--scroll-amount));
    transition: transform 0.1s ease-out;
}

.post-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    width: 4px;
    background: #000;
    height: 0;
    transition: height 0.6s ease;
}

.post-content h2.visible::before {
    height: 100%;
}

.post-thumbnail img {
    transition: transform 0.8s ease;
}

.post-thumbnail:hover img {
    transform: scale(1.05);
}

.share-button {
    position: relative;
    overflow: hidden;
}

.share-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.share-button:hover::after {
    width: 300px;
    height: 300px;
}

.related-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.related-card.visible {
    opacity: 1;
    transform: translateY(0);
}