/**
 * 投稿詳細ページ スタイル
 */

/* メインコンテンツ */
.single-post-container {
    padding: 0;
    background-color: white;
}

/* articleのデフォルトスタイルを上書き */
.single-post-container article {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.single-post-content {
    max-width: 720px;
    margin: 0 auto;
    background-color: white;
    padding: 0;
}

/* 投稿ヘッダー */
.entry-header {
    padding: 100px 20px 60px;
    text-align: left;
    background: linear-gradient(to bottom, #fafbfc 0%, white 100%);
    position: relative;
    overflow: hidden;
}

/* 背景アニメーション */
.entry-header::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle at center, var(--color-primary), transparent);
    opacity: 0.02;
    top: -300px;
    right: -200px;
    animation: rotate-slow 30s linear infinite;
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.entry-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: 24px;
    letter-spacing: -0.03em;
    max-width: 800px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fade-in-left 0.8s ease-out 0.2s forwards;
}

@keyframes fade-in-left {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 投稿メタ情報 */
.entry-meta {
    font-size: 14px;
    color: #666;
    letter-spacing: 0.05em;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: fade-in 0.6s ease-out 0.4s forwards;
}

.posted-on {
    display: inline-block;
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

/* アイキャッチ画像 */
.post-thumbnail {
    margin: 0 auto 80px;
    max-width: 100%;
    background-color: #f8f9fa;
    opacity: 0;
    animation: fade-in-up 0.8s ease-out 0.6s forwards;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 投稿本文 */
.entry-content {
    padding: 0 20px 80px;
    font-size: 17px;
    line-height: 1.9;
    color: #333;
    font-weight: 400;
    opacity: 0;
    animation: fade-in 1s ease-out 0.8s forwards;
}

.entry-content h2 {
    font-size: 30px;
    font-weight: 800;
    margin: 80px 0 30px;
    color: var(--color-text);
    position: relative;
    letter-spacing: -0.02em;
}

.entry-content h2::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background-color: var(--color-primary);
    border-radius: 2px;
    animation: slide-in-left 0.6s ease-out;
}

@keyframes slide-in-left {
    from {
        transform: translateY(-50%) scaleY(0);
    }
    to {
        transform: translateY(-50%) scaleY(1);
    }
}

.entry-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 60px 0 20px;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.entry-content p {
    margin-bottom: 28px;
}

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

.entry-content li {
    margin-bottom: 10px;
}

.entry-content blockquote {
    margin: 48px -20px;
    padding: 40px 40px 40px 60px;
    background-color: #f8fafb;
    border-left: 4px solid var(--color-primary);
    font-style: normal;
    color: #444;
    font-size: 19px;
    line-height: 1.7;
    position: relative;
}

.entry-content blockquote::before {
    content: '"';
    position: absolute;
    left: 20px;
    top: 20px;
    font-size: 60px;
    color: var(--color-primary);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.entry-content img {
    max-width: calc(100% + 40px);
    margin: 48px -20px;
    height: auto;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.entry-content pre {
    margin: 20px 0;
    padding: 20px;
    background-color: #1e1e1e;
    color: #e6e6e6;
    border-radius: 8px;
    overflow-x: auto;
}

.entry-content code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.entry-content p code {
    background-color: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    color: #e74c3c;
}

/* 投稿フッター */
.entry-footer {
    margin: 0 20px;
    padding: 60px 0;
    border-top: 2px solid #f0f0f0;
}

/* ナビゲーション */
.post-navigation {
    margin: 0;
    padding: 100px 0;
    background: linear-gradient(to bottom, white 0%, #fafbfc 100%);
    position: relative;
    overflow: hidden;
}

/* ナビゲーション背景アニメーション */
.post-navigation::before,
.post-navigation::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), transparent);
    opacity: 0.02;
}

.post-navigation::before {
    width: 600px;
    height: 600px;
    top: -300px;
    left: -200px;
    animation: float-gentle 15s ease-in-out infinite;
}

.post-navigation::after {
    width: 400px;
    height: 400px;
    bottom: -200px;
    right: -100px;
    animation: float-gentle 20s ease-in-out infinite reverse;
}

@keyframes float-gentle {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -20px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 30px) rotate(240deg);
    }
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    max-width: 550px;
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: var(--color-text);
    padding: 30px;
    border-radius: 16px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.post-navigation a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #0284c7);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.post-navigation a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.08);
}

.post-navigation a:hover::before {
    transform: translateX(0);
}

.post-navigation .nav-subtitle {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-navigation .nav-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-navigation a:hover .nav-title {
    color: var(--color-primary);
}

.post-navigation .nav-next a {
    align-items: flex-end;
    text-align: right;
}

.post-navigation .nav-previous .nav-subtitle::before {
    content: "←";
    font-size: 14px;
}

.post-navigation .nav-next .nav-subtitle::after {
    content: "→";
    font-size: 14px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .single-post-container {
        margin-top: 60px;
    }
    
    .entry-header {
        padding: 60px 20px 40px;
    }
    
    .entry-title {
        font-size: 28px;
    }
    
    .entry-content {
        padding: 0 20px 60px;
        font-size: 16px;
    }
    
    .entry-content h2 {
        font-size: 24px;
        margin: 60px 0 20px;
    }
    
    .entry-content h2::before {
        left: -20px;
    }
    
    .entry-content h3 {
        font-size: 20px;
    }
    
    .entry-content blockquote {
        margin: 40px -20px;
        padding: 30px 30px 30px 50px;
        font-size: 17px;
    }
    
    .entry-content img {
        margin: 32px -20px;
    }
    
    .entry-footer {
        margin: 0 20px;
    }
    
    .post-navigation {
        padding: 60px 20px;
    }
    
    .entry-title {
        font-size: 28px;
    }
    
    .entry-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 14px;
    }
    
    .entry-content {
        font-size: 15px;
    }
    
    .entry-content h2 {
        font-size: 24px;
    }
    
    .entry-content h3 {
        font-size: 20px;
    }
    
    .post-navigation .nav-links {
        flex-direction: column;
    }
}