/**
 * Single Post (Blog) Styles
 * ブログ投稿詳細ページのスタイル
 */

/* ========================================
   投稿レイアウト（メイン + サイドバー）
======================================== */

.single-post .post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 48px;
    padding: 48px 0 80px;
}

.post-content {
    min-width: 0;
}

/* ========================================
   記事ヘッダー
======================================== */

.post-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #E3E8ED;
}

.post-title {
    font-size: 32px;
    color: #0A3D62;
    margin-bottom: 16px;
    line-height: 1.4;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: #6C757D;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta i {
    color: #386641;
}

.post-meta a {
    color: #6C757D;
    transition: color 0.3s ease;
}

.post-meta a:hover {
    color: #0A3D62;
}

/* ========================================
   アイキャッチ画像
======================================== */

.post-featured-image {
    margin-bottom: 32px;
    border-radius: 8px;
    overflow: hidden;
}

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

/* ========================================
   記事本文
======================================== */

.post-body {
    font-size: 16px;
    line-height: 1.8;
    color: #212529;
}

/* 見出し */
.post-body h2 {
    font-size: 26px;
    color: #0A3D62;
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #386641;
}

.post-body h3 {
    font-size: 22px;
    color: #0A3D62;
    margin: 32px 0 16px;
    padding-left: 12px;
    border-left: 4px solid #386641;
}

.post-body h4 {
    font-size: 18px;
    color: #0A3D62;
    margin: 24px 0 12px;
}

/* 段落 */
.post-body p {
    margin-bottom: 20px;
}

/* リスト */
.post-body ul,
.post-body ol {
    margin: 20px 0;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body ul li {
    list-style-type: disc;
}

/* リンク */
.post-body a {
    color: #0A3D62;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.post-body a:hover {
    color: #386641;
}

/* 画像 */
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 24px 0;
}

/* テーブル */
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

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

.post-body table th {
    background-color: #F8F9FA;
    font-weight: 700;
    color: #0A3D62;
}

/* 引用 */
.post-body blockquote {
    margin: 24px 0;
    padding: 16px 20px;
    background-color: #F8F9FA;
    border-left: 4px solid #386641;
    font-style: italic;
}

/* コードブロック */
.post-body pre {
    background-color: #212529;
    color: #F8F9FA;
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-body code {
    background-color: #F8F9FA;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

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

/* 特殊ボックス（オリジナル記事のスタイル） */
.post-body .stat-box,
.post-body .info-box,
.post-body .warning-box {
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 8px;
    border-left: 4px solid;
}

.post-body .stat-box {
    background-color: #E8F4F8;
    border-color: #3498DB;
}

.post-body .info-box {
    background-color: #E8F5E9;
    border-color: #386641;
}

.post-body .warning-box {
    background-color: #FFF3E0;
    border-color: #FF9800;
}

/* チャートコンテナ */
.post-body .chart-container {
    margin: 32px 0;
    text-align: center;
}

.post-body .chart-caption {
    margin-top: 8px;
    font-size: 14px;
    color: #6C757D;
}

/* ハイライト */
.post-body .highlight {
    background: linear-gradient(transparent 60%, #FFEB3B 60%);
    font-weight: 700;
}

/* ========================================
   CTA（問い合わせセクション）
======================================== */

.post-cta {
    margin-top: 64px;
    position: relative;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF6B35 100%);
    color: #FFFFFF;
    padding: 48px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.2);
    overflow: hidden;
}

.post-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../img/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.35;
    mix-blend-mode: overlay;
    z-index: 0;
}

.post-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.5) 0%, rgba(247, 147, 30, 0.4) 50%, rgba(255, 107, 53, 0.5) 100%);
    z-index: 1;
}

.cta-inner {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    z-index: 2;
}

.cta-heading {
    font-size: 28px;
    margin-bottom: 16px;
    color: #FFFFFF;
}

.cta-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

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

.post-navigation {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #E3E8ED;
}

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

.nav-previous,
.nav-next {
    display: block;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 20px;
    background-color: #F8F9FA;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: #E3E8ED;
    transform: translateY(-2px);
}

.nav-subtitle {
    display: block;
    font-size: 14px;
    color: #6C757D;
    margin-bottom: 8px;
}

.nav-title {
    display: block;
    font-size: 16px;
    color: #0A3D62;
    font-weight: 700;
}

.nav-next {
    text-align: right;
}

/* ========================================
   サイドバー
======================================== */

.post-sidebar {
    align-self: start;
}

.sidebar-widget {
    background-color: #FFFFFF;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 8px;
    border: 1px solid #E3E8ED;
}

.widget-title {
    font-size: 18px;
    color: #0A3D62;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #386641;
}

/* 検索ボックス */
.widget-search .search-form {
    position: relative;
}

.widget-search .search-field {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E3E8ED;
    border-radius: 6px;
    font-size: 14px;
}

.widget-search .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0A3D62;
    color: #FFFFFF;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.widget-search .search-submit:hover {
    background-color: #386641;
}

/* カテゴリ一覧 */
.widget-categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-categories li {
    padding: 8px 0;
    border-bottom: 1px solid #E3E8ED;
}

.widget-categories li:last-child {
    border-bottom: none;
}

.widget-categories a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget-categories a:hover {
    color: #0A3D62;
}

.widget-categories .count {
    float: right;
    color: #6C757D;
    font-size: 14px;
}

/* 人気記事・最新記事 */
.widget-popular-posts ul,
.widget-recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-popular-posts li,
.widget-recent-posts li {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E3E8ED;
}

.widget-popular-posts li:last-child,
.widget-recent-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-popular-posts a,
.widget-recent-posts a {
    display: flex;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.widget-popular-posts a:hover,
.widget-recent-posts a:hover {
    opacity: 0.7;
}

.widget-post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
}

.widget-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.widget-post-title {
    font-size: 14px;
    color: #0A3D62;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.widget-post-date {
    font-size: 12px;
    color: #6C757D;
}

/* タグクラウド */
.widget-tags .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget-tags .tag-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: #F8F9FA;
    color: #0A3D62;
    font-size: 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.widget-tags .tag-link:hover {
    background-color: #0A3D62;
    color: #FFFFFF;
}

/* CTAバナー - 目立つオレンジ背景 */
.widget-cta-banner {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    position: sticky;
    top: 20px;
    z-index: 100;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(255, 107, 53, 0.6);
    }
}

.cta-banner {
    text-align: center;
    position: relative;
}

.cta-banner::before {
    content: "🔥";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 32px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.cta-banner h4 {
    font-size: 22px;
    font-weight: bold;
    color: #FFFFFF;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-banner p {
    font-size: 15px;
    color: #FFFFFF;
    margin-bottom: 20px;
    font-weight: 500;
}


/* ========================================
   レスポンシブ対応
======================================== */

/* タブレット */
@media (max-width: 1024px) {
    .single-post .post-layout {
        grid-template-columns: 1fr 280px;
        gap: 32px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-cta {
        padding: 32px 24px;
    }
    
    .cta-heading {
        font-size: 24px;
    }
}

/* スマートフォン */
@media (max-width: 768px) {
    .single-post .post-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .post-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }
    
    .widget-cta-banner {
        position: static;
    }
    
    .post-title {
        font-size: 24px;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .post-body h2 {
        font-size: 22px;
    }
    
    .post-body h3 {
        font-size: 18px;
    }
    
    .post-cta {
        padding: 24px 20px;
    }
    
    .cta-heading {
        font-size: 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .nav-next {
        text-align: left;
    }
}

