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

/* YARPP関連記事プラグインを非表示 */
.yarpp,
.yarpp-related,
.yarpp-related-website,
.yarpp-template-thumbnails,
.yarpp-thumbnails-horizontal,
div[class*="yarpp"] {
    display: none !important;
}

/* SWELLテーマのリセット - 最優先 */
.single-content .entry-title,
.single-content .post-title,
.single-content .c-postTitle,
.single-content [class*="postTitle"],
.single-content [class*="entry-title"] {
    display: none !important;
}

/* 記事メインエリアのリセット */
.article-main {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    background: white !important;
}

.article-main .article-header,
.article-main .article-title,
.article-main .article-meta,
.article-main .article-thumbnail,
.article-main .article-body,
.article-main .article-footer {
    position: relative !important;
    background: transparent !important;
}

/* リセット - SWELLテーマの干渉を防ぐ */
.single-content,
.single-content * {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

/* KVビジュアル */
.single-kv {
    margin-top: 93px;
    height: 40vh;
    min-height: 300px;
    background: linear-gradient(135deg, rgba(15, 26, 61, 0.95) 0%, rgba(30, 58, 138, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.single-kv::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/column-bg.jpg') center/cover no-repeat;
    opacity: 0.15;
}

.single-kv .kv-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.single-kv .kv-content h1 {
    font-family: 'Georgia', serif !important;
    font-size: 3rem !important;
    font-weight: 400 !important;
    letter-spacing: 0.3em !important;
    margin-bottom: 0.5rem !important;
    color: white !important;
    text-align: center !important;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.3s;
}

.single-kv .kv-content p {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    color: white !important;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.6s;
}

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

/* パンくずリスト */
.breadcrumb {
    background-color: #f8f9fa !important;
    padding: 1rem 3rem !important;
    border-bottom: 1px solid #e8e8e8 !important;
}

.breadcrumb-container {
    max-width: 1400px;
    margin: 0 auto;
}

.breadcrumb-list {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.8rem !important;
    list-style: none !important;
    font-size: 0.85rem !important;
    color: #666 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.breadcrumb-list li {
    display: inline-block !important;
}

.breadcrumb-list a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-list a:hover {
    color: #1e3a8a;
}

/* メインコンテンツ */
.single-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 2rem 100px;
    background: white !important;
}

.single-container {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 50px !important;
    background: white !important;
}

/* 記事本文エリア */
.article-main {
    min-width: 0;
    background: white !important;
}

/* 記事ヘッダー */
.article-header {
    margin-bottom: 2rem !important;
    display: block !important;
    width: 100% !important;
    background: white !important;
}

.article-meta {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
    background: transparent !important;
}

.article-date {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #666;
}

.article-category {
    display: inline-block !important;
    padding: 0.3rem 1rem !important;
    background: #1e3a8a !important;
    color: white !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
}

/* カテゴリー別の色 */
.article-category.keiji { background: #92400e !important; }
.article-category.jiko { background: #1e40af !important; }
.article-category.rikon { background: #9d174d !important; }
.article-category.souzoku { background: #065f46 !important; }
.article-category.syakkin { background: #3730a3 !important; }
.article-category.higai { background: #991b1b !important; }
.article-category.advise { background: #166534 !important; }
.article-category.voice { background: #854d0e !important; }

/* 記事タイトル */
.single-content .article-title,
.article-main .article-title,
h1.article-title,
.article-header .article-title {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1.8rem !important;
    font-weight: 600 !important;
    line-height: 1.7 !important;
    color: #1a1a1a !important;
    letter-spacing: 0.02em !important;
    margin: 0 0 2rem 0 !important;
    padding: 0 !important;
    text-align: left !important;
    display: block !important;
    width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    float: none !important;
    clear: both !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: auto !important;
}

.article-thumbnail {
    margin-bottom: 2.5rem;
    border-radius: 4px;
    overflow: hidden;
    background: white !important;
}

.article-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 記事本文 */
.article-body {
    font-size: 1rem;
    line-height: 2;
    color: #333;
    background: white !important;
}

.article-body h2 {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    margin: 3rem 0 1.5rem !important;
    padding: 0.8rem 1rem !important;
    background: #f8f9fa !important;
    border-left: 4px solid #1e3a8a !important;
    color: #1a1a1a !important;
    display: block !important;
}

.article-body h3 {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    margin: 2.5rem 0 1rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid #e0e0e0 !important;
    color: #1a1a1a !important;
    display: block !important;
    background: transparent !important;
}

.article-body p {
    margin-bottom: 1.5rem;
    display: block !important;
    background: transparent !important;
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
    background: transparent !important;
}

.article-body li {
    margin-bottom: 0.5rem;
    display: list-item !important;
    background: transparent !important;
}

.article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: #f8f9fa !important;
    border-left: 4px solid #1e3a8a;
    font-style: italic;
    color: #555;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    border-radius: 4px;
}

.article-body a {
    color: #1e3a8a;
    text-decoration: underline;
}

.article-body a:hover {
    color: #1e40af;
}

/* 記事フッター */
.article-footer {
    margin-top: 4rem !important;
    padding-top: 2rem !important;
    border-top: 1px solid #e8e8e8 !important;
    background: white !important;
}

/* 前後の記事ナビゲーション */
.post-navigation {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
    margin-bottom: 2rem !important;
    background: white !important;
}

.post-navigation a {
    display: block !important;
    padding: 1.2rem 1.5rem !important;
    background: #f8f9fa !important;
    text-decoration: none !important;
    border: 1px solid #e8e8e8 !important;
    transition: all 0.3s ease !important;
}

.post-navigation a:hover {
    background: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

.post-navigation a:hover .nav-label,
.post-navigation a:hover .nav-title {
    color: white !important;
}

.nav-empty {
    background: transparent !important;
    border: none !important;
}

.nav-label {
    display: block !important;
    font-size: 0.8rem !important;
    color: #888 !important;
    margin-bottom: 0.5rem !important;
    background: transparent !important;
}

.nav-title {
    display: -webkit-box !important;
    font-size: 0.9rem !important;
    color: #333 !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    background: transparent !important;
}

.nav-prev {
    text-align: left !important;
}

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

/* 一覧に戻るボタン */
.back-to-list {
    text-align: center !important;
    margin-top: 2rem !important;
    background: white !important;
}

.back-to-list a {
    display: inline-block !important;
    padding: 1rem 3rem !important;
    border: 2px solid #1e3a8a !important;
    color: #1e3a8a !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    background: white !important;
}

.back-to-list a:hover {
    background: #1e3a8a !important;
    color: white !important;
}

/* ===============================================
   サイドバー
   =============================================== */
.article-sidebar {
    position: sticky;
    top: 110px;
    height: fit-content;
    min-width: 0;
    max-width: 300px;
    background: transparent !important;
}

.sidebar-widget {
    margin-bottom: 2rem !important;
    padding: 1.5rem !important;
    background: #f8f9fa !important;
    border: 1px solid #e8e8e8 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.widget-title {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.8rem !important;
    border-bottom: 2px solid #1e3a8a !important;
    color: #1a1a1a !important;
    display: block !important;
    text-align: left !important;
    background: transparent !important;
}

/* 目次 */
.toc-widget {
    background: white !important;
}

.toc-nav {
    display: block !important;
    width: 100% !important;
    background: transparent !important;
}

.toc-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    width: 100% !important;
    background: transparent !important;
}

.toc-item {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0 !important;
    background: transparent !important;
}

.toc-item a {
    display: block !important;
    width: 100% !important;
    padding: 0.6rem 0.5rem !important;
    color: #555 !important;
    text-decoration: none !important;
    font-size: 0.85rem !important;
    line-height: 1.6 !important;
    border-bottom: 1px solid #eee !important;
    transition: all 0.3s ease !important;
    text-align: left !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    background: transparent !important;
}

.toc-item:last-child a {
    border-bottom: none !important;
}

.toc-item a:hover,
.toc-item a.active {
    color: #1e3a8a !important;
    background: #f0f4ff !important;
}

.toc-item.toc-h3 a {
    padding-left: 1.2rem !important;
    font-size: 0.8rem !important;
    color: #777 !important;
}

.toc-item.toc-h3 a:hover,
.toc-item.toc-h3 a.active {
    color: #1e3a8a !important;
}

/* カテゴリーリスト */
.category-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    background: transparent !important;
}

.category-list li {
    display: block !important;
    margin-bottom: 0 !important;
    background: transparent !important;
}

.category-list a {
    display: block !important;
    padding: 0.6rem 0 !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
    border-bottom: 1px solid #e8e8e8 !important;
    transition: color 0.3s ease !important;
    text-align: left !important;
    background: transparent !important;
}

.category-list li:last-child a {
    border-bottom: none !important;
}

.category-list a:hover,
.category-list a.active {
    color: #1e3a8a !important;
}

/* サイドバーCTA */
.sidebar-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
    padding: 2rem 1.5rem !important;
    text-align: center !important;
    color: white !important;
    border: none !important;
}

.cta-title {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
    color: white !important;
    background: transparent !important;
}

.cta-button {
    display: block !important;
    padding: 0.9rem !important;
    background: white !important;
    color: #1e3a8a !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
    transition: all 0.3s ease !important;
}

.cta-button:hover {
    background: #fbbf24 !important;
    color: #1a1a1a !important;
}

.cta-tel {
    display: block !important;
    text-decoration: none !important;
    color: white !important;
    background: transparent !important;
}

.tel-label {
    display: block !important;
    font-size: 0.8rem !important;
    opacity: 0.8 !important;
    margin-bottom: 0.3rem !important;
    background: transparent !important;
}

.tel-number {
    display: block !important;
    font-family: 'Georgia', serif !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.1em !important;
    color: white !important;
    background: transparent !important;
}

/* ===============================================
   関連記事セクション（3列表示）
   =============================================== */
.related-section {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid #e8e8e8;
    background: white !important;
}

.related-section-title {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    margin-bottom: 2.5rem !important;
    color: #1a1a1a !important;
    background: transparent !important;
}

.related-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: #1e3a8a;
    margin: 1rem auto 0;
}

.related-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    background: transparent !important;
}

.related-card {
    background: white !important;
    border: 1px solid #e8e8e8 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
}

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

.related-card a {
    text-decoration: none !important;
    display: block !important;
    background: transparent !important;
}

.related-thumbnail {
    width: 100% !important;
    height: 160px !important;
    overflow: hidden !important;
    background: #f0f0f0 !important;
}

.related-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.5s ease !important;
}

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

.related-thumbnail .no-image {
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%) !important;
    color: #999;
    font-size: 0.85rem;
}

.related-content {
    padding: 1.2rem !important;
    background: white !important;
}

.related-content .related-date {
    font-family: 'Georgia', serif !important;
    font-size: 0.8rem !important;
    color: #888 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    background: transparent !important;
}

.related-content .related-title {
    font-family: 'Noto Serif JP', serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    line-height: 1.5 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    background: transparent !important;
}

/* ===============================================
   レスポンシブ
   =============================================== */
@media (max-width: 1024px) {
    .single-container {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .article-sidebar {
        position: static !important;
        display: block !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .sidebar-widget {
        margin-bottom: 1.5rem !important;
        width: 100% !important;
    }

    .toc-widget {
        display: none !important;
    }

    .sidebar-cta {
        width: 100% !important;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .single-kv {
        margin-top: 70px;
        height: 30vh;
        min-height: 200px;
    }

    .single-kv .kv-content h1 {
        font-size: 2rem !important;
        letter-spacing: 0.15em !important;
    }

    .breadcrumb {
        padding: 1rem 1.5rem !important;
    }

    .breadcrumb-list {
        font-size: 0.75rem !important;
    }

    .single-content {
        padding: 40px 1.5rem 60px !important;
    }

    .single-content .article-title,
    .article-main .article-title,
    h1.article-title,
    .article-header .article-title {
        font-size: 1.4rem !important;
    }

    .article-body h2 {
        font-size: 1.2rem !important;
    }

    .article-body h3 {
        font-size: 1.05rem !important;
    }

    .post-navigation {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .nav-next {
        text-align: left !important;
    }

    .article-sidebar {
        display: block !important;
        width: 100% !important;
    }

    .sidebar-widget {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }

    .toc-widget {
        display: none !important;
    }

    .category-widget .category-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .category-widget .category-list li {
        display: inline-block !important;
        flex: none !important;
    }

    .category-widget .category-list a {
        display: inline-block !important;
        padding: 0.4rem 0.8rem !important;
        border: 1px solid #e8e8e8 !important;
        border-radius: 4px !important;
        font-size: 0.8rem !important;
        background: white !important;
    }

    .category-widget .category-list a.active {
        background: #1e3a8a !important;
        color: white !important;
        border-color: #1e3a8a !important;
    }

    .related-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .related-thumbnail {
        height: 180px !important;
    }

    .sidebar-cta {
        padding: 1.5rem 1rem !important;
    }

    .sidebar-cta .cta-title {
        font-size: 0.95rem !important;
    }

    .sidebar-cta .tel-number {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 480px) {
    .single-content {
        padding: 30px 1rem 50px !important;
    }

    .single-content .article-title,
    .article-main .article-title,
    h1.article-title,
    .article-header .article-title {
        font-size: 1.2rem !important;
    }

    .article-body {
        font-size: 0.95rem !important;
    }

    .article-body h2 {
        font-size: 1.1rem !important;
        padding: 0.6rem 0.8rem !important;
    }

    .article-body h3 {
        font-size: 1rem !important;
    }

    .related-section-title {
        font-size: 1.2rem !important;
    }

    .related-content .related-title {
        font-size: 0.9rem !important;
    }

    .post-navigation a {
        padding: 1rem !important;
    }

    .nav-title {
        font-size: 0.85rem !important;
    }

    .back-to-list a {
        padding: 0.8rem 2rem !important;
        font-size: 0.9rem !important;
    }
}