/* ========================================
 * 08_column-styles.css
 * Column Archive & Single Post Styles (FIXED - Layout Issues)
 * 画像比率16:9に対応
 *
 * @package CIW-Construction
 * ======================================== */

/* ========================================
   1. GLOBAL & SHARED LAYOUT
 * ======================================== */
.column-layout-wrapper {
    padding: 72px 0 96px;
}

.column-layout-wrapper .container,
.single-post-layout .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

.article-inner-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

.main-content,
.single-column-article {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* ========================================
   2. SIDEBAR (Shared)
 * ======================================== */
.sidebar-container {
    align-self: start;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-section {
    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 32px;
    margin-bottom: 48px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 24px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #2D4A43;
    letter-spacing: 0.1em;
    position: relative;
    text-transform: uppercase;
}

.sidebar-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #C0A375;
}

.sidebar-empty-message {
    text-align: center;
    padding: 20px;
    color: #6e6e6e;
    font-size: 13px;
    font-style: italic;
}

/* Sidebar - Popular Posts */
.popular-posts-list {
    list-style: none;
    counter-reset: popular-counter;
    padding: 0;
    margin: 0;
}

.popular-posts-list li {
    counter-increment: popular-counter;
    padding: 20px 0 20px 52px;
    border-bottom: 1px solid #e7e7e7;
    position: relative;
    margin: 0;
}

.popular-posts-list li:first-child {
    padding-top: 0;
}

.popular-posts-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-posts-list li::before {
    content: counter(popular-counter, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-dark);
    font-family: "Georgia", serif;
    line-height: 1;
}

.popular-posts-list a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.popular-posts-list li a:hover h4 {
    color: #2D4A43;
}

.sidebar-post-content h4 {
    font-size: 13px;
    line-height: 1.85;
    font-weight: 500;
    color: #4a4a4a;
    margin: 0 0 8px 0;
    transition: color 0.3s ease;
}

.sidebar-post-date {
    font-size: 11px;
    color: #6e6e6e;
    font-family: "Georgia", serif;
    font-style: normal;
}

/* Sidebar - Category Badges */
.category-badges {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.category-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #e7e7e7;
    font-size: 13px;
    font-weight: 500;
    color: #4a4a4a;
    transition: all 0.3s ease;
    text-decoration: none;
}

.category-badge:hover {
    color: #2D4A43;
    padding-left: 8px;
}

.category-badge:first-child {
    padding-top: 0;
}

.category-badge:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.category-badge > div {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
}

.category-name {
    flex: 1;
}

.category-count {
    font-size: 11px;
    color: #6e6e6e;
    background: #fafafa;
    padding: 4px 10px;
    border-radius: 2px;
    font-family: "Georgia", serif;
    border: 1px solid #e7e7e7;
    font-weight: 600;
    flex-shrink: 0;
}

.category-badge.active {
    color: #2D4A43;
    font-weight: 600;
}

.category-badge.active .category-count {
    background: #2D4A43;
    color: #ffffff;
    border-color: #2D4A43;
}

/* ========================================
   3. ARCHIVE PAGE SPECIFIC
 * ======================================== */
/* Archive - Hero Section */
.archive .archive-hero-section {
    background-color: #f9f9f9;
    background-image: linear-gradient(rgba(45, 74, 67, 0.06) 1px, transparent 1px), linear-gradient(to right, rgba(45, 74, 67, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
    padding: 120px 0 112px;
    border-bottom: 1px solid #e7e7e7;
    position: relative;
    text-align: left;
}

.archive .archive-hero-section::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 56px;
    background: #e7e7e7;
}

.archive .archive-hero-kicker {
    font-size: 11px;
    color: var(--secondary-dark);
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 32px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.archive .archive-hero-kicker::before,
.archive .archive-hero-kicker::after {
    content: '';
    width: 24px;
    height: 1px;
    background: #C0A375;
}

.archive .archive-hero-title {
    font-size: 46px;
    font-weight: 600;
    line-height: 1.65;
    color: #2D4A43;
    margin-bottom: 28px;
    letter-spacing: 0.05em;
    text-align: left;
}

.archive .archive-hero-subtitle {
    font-size: 15px;
    color: #4a4a4a;
    max-width: 680px;
    line-height: 2;
    margin: 0;
    text-align: left;
}

/* Archive - キーワード検索フォーム */
.archive .column-search-form {
    display: flex;
    align-items: stretch;
    gap: 10px;
    max-width: 560px;
    margin-top: 32px;
}

.archive .column-search-form input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 14px;
    background: #ffffff;
    color: #2b2b2b;
}

.archive .column-search-form input[type="search"]:focus {
    outline: 2px solid #2D4A43;
    outline-offset: 1px;
}

.archive .column-search-btn {
    flex: 0 0 auto;
    border: none;
    border-radius: 4px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: #2D4A43;
    color: #ffffff;
    cursor: pointer;
}

.archive .column-search-btn:hover {
    background: #3a5c54;
}

.archive .column-search-result-info {
    margin-top: 18px;
    font-size: 14px;
    color: #4a4a4a;
}

.archive .column-search-result-info strong {
    color: #2D4A43;
    font-size: 1.1em;
}

.archive .column-search-clear {
    margin-left: 14px;
    font-size: 13px;
    color: #4a4a4a;
    text-decoration: underline;
}

/* Archive - Category Navigation */
.archive-category-nav {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e7e7e7;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-item {
    padding: 24px 32px;
    color: #737373;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.25s ease;
}

.category-item:hover {
    color: #2D4A43;
}

.category-item.active {
    color: #2D4A43;
    font-weight: 600;
    border-bottom-color: #2D4A43;
}

/* Archive - Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
    width: 100%;
    box-sizing: border-box;
}

.post-card {
    background: #ffffff;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.post-card-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 16px;
    border: 1px solid #e7e7e7;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* ========================================
   Column Dynamic Eyecatch (タイトル入り自動アイキャッチ)
   文字サイズはコンテナクエリ単位で表示枠に追従
   ======================================== */
.ciw-eyecatch {
    container-type: inline-size;
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 13% 9% 16%;
    color: #fff;
    overflow: hidden;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 34px),
        linear-gradient(150deg, #2d4a43 0%, #21382f 100%);
}

.ciw-eyecatch__brand {
    position: absolute;
    top: 8.5%;
    left: 9%;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-weight: 700;
    font-size: clamp(10px, 3.4cqw, 18px);
    letter-spacing: 0.12em;
    color: var(--secondary-color, #C0A375);
}

.ciw-eyecatch__title {
    font-size: clamp(14px, 6.4cqw, 30px);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ciw-eyecatch::after {
    content: '';
    position: absolute;
    left: 9%;
    bottom: 11%;
    width: clamp(28px, 10cqw, 56px);
    height: 3px;
    background: var(--secondary-color, #C0A375);
}

.post-card .entry-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.8;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    transition: color 0.3s ease;
}

.post-card:hover .entry-title {
    color: #2D4A43;
}

.post-card .post-date {
    font-size: 11px;
    color: #6e6e6e;
    font-style: normal;
}

/* カード内カテゴリーバッジ（サムネイル左下に重ねる） */
.post-card-thumbnail {
    position: relative;
}

.post-card-category {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-color, #2d4a43);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.6;
}

/* ========================================
   Featured Post Card（マガジントップの最新記事）
   ======================================== */
.featured-post-card {
    grid-column: 1 / -1;
    border: 1px solid #e7e7e7;
    background: #ffffff;
}

.featured-post-card .post-card-link {
    display: grid;
    grid-template-columns: 11fr 9fr;
    align-items: stretch;
}

.featured-post-card .post-card-thumbnail {
    margin-bottom: 0;
    border: none;
    border-right: 1px solid #e7e7e7;
    height: 100%;
}

.featured-post-card .post-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 32px;
}

.featured-post-card .entry-title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.6;
    color: #1a1a1a;
    margin: 0 0 14px 0;
    transition: color 0.3s ease;
}

.featured-post-card:hover .entry-title {
    color: var(--primary-color, #2d4a43);
}

.featured-post-excerpt {
    font-size: 14px;
    line-height: 1.9;
    color: #4a4a4a;
    margin: 0 0 18px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-post-badge {
    /* アイキャッチ左上のブランド表記と重ならないよう右上に配置 */
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-block;
    padding: 4px 12px;
    background: var(--secondary-dark, #8a6d3b);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .featured-post-card .post-card-link {
        grid-template-columns: 1fr;
    }

    .featured-post-card .post-card-thumbnail {
        border-right: none;
        border-bottom: 1px solid #e7e7e7;
    }

    .featured-post-card .post-card-content {
        padding: 20px;
    }

    .featured-post-card .entry-title {
        font-size: 17px;
    }
}

/* Archive - Pagination */
.pagination-wrapper {
    margin-top: 64px;
    text-align: center;
}

.pagination-wrapper .nav-links {
    display: inline-flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 2px solid #e7e7e7;
    border-radius: 9999px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
    background: #ffffff;
}

.page-numbers:hover,
.page-numbers.current {
    background: #2D4A43;
    color: white;
    border-color: #2D4A43;
    transform: scale(1.05);
}

.no-posts-message {
    text-align: center;
    padding: 64px 32px;
    background: #fafafa;
    border-radius: 8px;
    color: #737373;
    font-size: 16px;
    border: 1px dashed #e7e7e7;
    margin: 40px 0;
}

/* ========================================
   4. SINGLE POST SPECIFIC
 * ======================================== */
/* Single Post - Breadcrumbs (base.cssのモダンなスタイルを使用) */
.breadcrumbs-section {
    border-bottom: 1px solid #e7e7e7;
}

/* Single Post - Layout */
.single-post-layout {
    padding: 40px 0 96px;
}

.single-post-layout .article-inner-grid {
    gap: 80px;
}

/* Single Post - Header */
.post-header {
    margin-bottom: 28px;
}

.article-category-badge {
    margin-bottom: 16px;
}

.article-category-badge a {
    display: inline-block;
    background: #2D4A43;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.article-category-badge a:hover {
    background: #3d5f56;
    transform: translateY(-1px);
}

.post-header .entry-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.5;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    letter-spacing: 0.01em;
}

.post-header .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #737373;
    padding-bottom: 20px;
    border-bottom: 1px solid #e7e7e7;
}

/* Single Post - Featured Image */
.single-column-article .featured-image {
    width: 100%;
    margin: 28px 0 32px 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f5f5f5;
}

.single-column-article .featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Single Post - Content */
.entry-content {
    font-size: 16px;
    line-height: 1.9;
    color: #4a4a4a;
}

.entry-content h2 {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.5;
    color: #2D4A43;
    margin: 48px 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 2px solid #e7e7e7;
    position: relative;
}

.entry-content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #C0A375;
}

.entry-content h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.5;
    color: #2D4A43;
    margin: 36px 0 18px 0;
    padding-left: 14px;
    border-left: 4px solid #C0A375;
}

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

.entry-content a {
    color: #2D4A43;
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

.entry-content a:hover {
    opacity: 0.7;
}

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

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

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 28px auto;
    display: block;
}

.entry-content blockquote {
    margin: 28px 0;
    padding: 20px 24px;
    background: #fafafa;
    border-left: 4px solid #C0A375;
    font-style: italic;
    color: #4a4a4a;
}

/* Single Post - CTA Section */
.cta-section-wrapper {
    margin: 56px 0;
    padding: 40px;
    background: linear-gradient(135deg, #2D4A43 0%, #3d5f56 100%);
    border-radius: 12px;
    text-align: center;
}

.cta-title {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.5;
    color: #ffffff;
    margin: 0 0 18px 0;
}

.cta-title .mobile-br {
    display: none;
}

.cta-text {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 28px 0;
}

.cta-text strong {
    color: var(--secondary-dark);
}

.cta-section-wrapper .cta-button {
    display: inline-block;
    padding: 14px 36px;
    background: #ffffff;
    color: #2D4A43;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cta-section-wrapper .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Single Post - Author Box */
.author-box {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 28px;
    background: #fafafa;
    border-radius: 8px;
    margin: 44px 0;
    border: 1px solid #e7e7e7;
}

.author-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #2D4A43;
    margin: 0 0 10px 0;
}

.author-info p {
    font-size: 13px;
    line-height: 1.7;
    color: #4a4a4a;
    margin: 0;
}

/* 実名著者の肩書き（コンサルタントの役職など） */
.author-info .author-position {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: var(--bg-light, #f8f6f2);
    border: 1px solid var(--border-warm, #e7e2d8);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    /* h4 の color を継承させない（肩書きは主従が逆になるため一段弱く） */
    color: var(--text-muted, #5f5f5f);
    vertical-align: middle;
}

.author-info .author-link {
    margin-top: 8px;
    font-size: 12px;
}

.author-info .author-link a {
    color: var(--secondary-dark, #8a6d3b);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Single Post - Post Navigation */
.post-navigation .nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-previous a,
.nav-next a {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
}

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

.nav-subtitle {
    font-size: 11px;
    font-weight: 600;
    color: #6e6e6e;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.nav-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #1a1a1a;
}

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

/* ========================================
   5. RESPONSIVE STYLES
 * ======================================== */
@media (max-width: 1024px) {
    .article-inner-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .sidebar-container {
        position: static;
        top: auto;
    }

    .column-layout-wrapper .container,
    .single-post-layout .container {
        padding: 0 32px;
    }

    .post-header .entry-title {
        font-size: 28px;
    }
}

@media (max-width: 968px) {
    .column-layout-wrapper {
        padding: 48px 0 64px;
    }

    .column-layout-wrapper .container,
    .single-post-layout .container {
        padding: 0 24px;
    }

    .archive .archive-hero-section {
        padding: 60px 0 56px;
        background-size: 40px 40px;
    }

    .archive .archive-hero-title {
        font-size: 32px;
        line-height: 1.5;
    }

    .archive .archive-hero-subtitle {
        font-size: 14px;
    }

    .category-list {
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 20px;
        flex-wrap: nowrap;
    }

    .category-list::-webkit-scrollbar {
        display: none;
    }

    .category-item {
        white-space: nowrap;
        padding: 20px 24px;
    }

    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .article-inner-grid {
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .archive .archive-hero-section {
        padding: 48px 0 44px;
    }

    .archive .archive-hero-title {
        font-size: 28px;
    }

    .column-layout-wrapper {
        padding: 32px 0 48px;
    }

    .post-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sidebar-section {
        padding: 24px;
    }

    .single-post-layout {
        padding: 16px 0 48px;
    }

    .post-header .entry-title {
        font-size: 24px;
    }

    .entry-content {
        font-size: 15px;
    }

    .entry-content h2 {
        font-size: 22px;
    }

    .entry-content h3 {
        font-size: 18px;
    }

    .entry-content table {
        display: block;
        overflow-x: auto;
    }

    .cta-title .mobile-br {
        display: block;
    }

    .cta-section-wrapper .cta-button {
        display: block;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .post-navigation .nav-links {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .nav-next a {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .column-layout-wrapper .container,
    .single-post-layout .container {
        padding: 0 16px;
    }

    .article-inner-grid {
        gap: 24px;
    }

    .post-grid {
        gap: 20px;
    }

    .archive .archive-hero-section {
        padding: 36px 0 32px;
    }

    .archive .archive-hero-title {
        font-size: 24px;
    }

    .post-header .entry-title {
        font-size: 20px;
    }
}


/* ============================================================
 * 記事内目次（アコーディオン形式・JSで自動生成）
 * ============================================================ */
.article-toc {
    margin: 28px 0 36px;
    background: #fafaf7;
    border: 1px solid #e2dccd;
    border-left: 4px solid var(--secondary-color, #C0A375);
    border-radius: 6px;
    overflow: hidden;
}

.article-toc[hidden] {
    display: none;
}

.article-toc__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    color: #1a2f2a;
    letter-spacing: 0.04em;
}

.article-toc__title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.article-toc__title svg {
    color: var(--secondary-dark);
}

.article-toc__icon {
    width: 12px;
    height: 12px;
    border-right: 2px solid #4a4a4a;
    border-bottom: 2px solid #4a4a4a;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    margin-top: -4px;
}

.article-toc__toggle[aria-expanded="false"] .article-toc__icon {
    transform: rotate(-45deg);
    margin-top: 4px;
}

.article-toc__list {
    list-style: none;
    margin: 0;
    padding: 0 20px 16px 36px;
    counter-reset: toc-counter;
    max-height: 1200px;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.25s ease;
}

.article-toc__toggle[aria-expanded="false"] + .article-toc__list {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.article-toc__list li {
    counter-increment: toc-counter;
    margin: 8px 0;
    position: relative;
    line-height: 1.6;
}

.article-toc__list > li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: -24px;
    color: var(--secondary-dark);
    font-weight: 700;
    font-size: 14px;
}

.article-toc__list li a {
    color: #2D4A43;
    text-decoration: none;
    font-size: 14.5px;
    transition: color 0.2s ease;
}

.article-toc__list li a:hover,
.article-toc__list li a:focus {
    color: var(--secondary-dark);
    text-decoration: underline;
}

.article-toc__list ol {
    list-style: none;
    margin: 6px 0 0;
    padding: 0 0 0 16px;
    counter-reset: toc-sub-counter;
}

.article-toc__list ol li {
    counter-increment: toc-sub-counter;
}

.article-toc__list ol li::before {
    content: counter(toc-counter) "-" counter(toc-sub-counter) ".";
    left: -28px;
    font-size: 13px;
    color: var(--secondary-dark);
}

.article-toc__list ol li a {
    font-size: 13.5px;
    color: #4a4a4a;
}

/* ============================================================
 * サイドバー転職誘導バナー（「人気記事」直下）
 * ============================================================ */
.sidebar-banner-section {
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
}

.sidebar-banner {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid #e2dccd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sidebar-banner:hover,
.sidebar-banner:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(45, 74, 67, 0.12);
    border-color: var(--secondary-color, #C0A375);
}

.sidebar-banner-content {
    padding: 22px 22px 24px;
    background-image:
        radial-gradient(circle at 100% 0%, rgba(192, 163, 117, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 0% 100%, rgba(45, 74, 67, 0.05) 0%, transparent 60%);
}

.sidebar-banner-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--secondary-dark);
    letter-spacing: 0.08em;
    background: rgba(192, 163, 117, 0.12);
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    text-transform: none;
}

.sidebar-banner-title {
    font-size: 16px;
    font-weight: 800;
    color: #2D4A43;
    line-height: 1.5;
    margin: 0 0 10px;
}

.sidebar-banner-text {
    font-size: 12.5px;
    color: #4a4a4a;
    line-height: 1.7;
    margin: 0 0 16px;
}

.sidebar-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-dark);
    font-weight: 700;
    font-size: 13.5px;
    transition: gap 0.2s ease;
}

.sidebar-banner:hover .sidebar-banner-cta {
    gap: 12px;
}

/* ============================================================
 * 関連するコラム（記事末尾の関連記事一覧）
 * ============================================================ */
.related-columns {
    margin: 64px 0 0;
    padding-top: 48px;
    border-top: 1px solid #e7e7e7;
}

.related-columns__title {
    font-size: 22px;
    font-weight: 700;
    color: #1a2f2a;
    margin: 0 0 28px;
    padding: 0 0 12px;
    border-bottom: 2px solid var(--secondary-color, #C0A375);
    display: inline-block;
    letter-spacing: 0.02em;
}

.related-columns__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 24px;
}

.related-columns__item {
    margin: 0;
    padding: 0;
    list-style: none;
}

.related-columns__link {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.related-columns__link:hover,
.related-columns__link:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(45, 74, 67, 0.12);
    border-color: var(--secondary-color, #C0A375);
}

.related-columns__thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #f5f5f5;
    overflow: hidden;
}

.related-columns__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-columns__link:hover .related-columns__thumb img {
    transform: scale(1.05);
}

.related-columns__body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.related-columns__date {
    font-size: 12px;
    color: #737373;
    letter-spacing: 0.04em;
}

.related-columns__heading {
    font-size: 15px;
    font-weight: 700;
    color: #2D4A43;
    line-height: 1.6;
    margin: 0;
    /* 2行で省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-columns__link:hover .related-columns__heading {
    color: var(--secondary-dark);
}

@media (max-width: 640px) {
    .related-columns {
        margin-top: 48px;
        padding-top: 36px;
    }
    .related-columns__title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    .related-columns__list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .related-columns__body {
        padding: 14px 16px 18px;
    }
}
/* =========================================================================
   アーカイブヒーロー上書き（旧 08_column-hero-override.css を統合）
   ========================================================================= */
/* Critical Override for Column Hero Section */
.archive-hero-section {
    background-color: #f9f9f9 !important;
    background-image:
        linear-gradient(rgba(45, 74, 67, 0.06) 1px, transparent 1px),
        linear-gradient(to right, rgba(45, 74, 67, 0.06) 1px, transparent 1px) !important;
    background-size: 60px 60px !important;
    padding: 64px 0 56px !important;
    text-align: left !important;
    border-bottom: 1px solid #e7e7e7 !important;
    position: relative !important;
}
.archive-hero-section::before { display: none !important; content: none !important; }
.archive-hero-section::after {
    content: '' !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 1px !important;
    height: 56px !important;
    background: #e7e7e7 !important;
}
.archive-hero-kicker {
    font-size: 11px !important;
    color: #C0A375 !important;
    font-weight: 700 !important;
    letter-spacing: 0.25em !important;
    text-transform: uppercase !important;
    margin-bottom: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.archive-hero-kicker::before,
.archive-hero-kicker::after {
    content: '' !important;
    width: 24px !important;
    height: 1px !important;
    background: #C0A375 !important;
}
.archive-hero-title, .archive-hero-section .section-title {
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #2D4A43 !important;
    margin-bottom: 14px !important;
    letter-spacing: 0.04em !important;
    text-align: left !important;
    max-width: 100% !important;
}
.archive-hero-subtitle {
    font-size: 15px !important;
    color: #4a4a4a !important;
    text-align: left !important;
    max-width: 680px !important;
    line-height: 2 !important;
    margin: 0 !important;
    opacity: 1 !important;
}
@media (max-width: 968px) {
    .archive-hero-section { padding: 48px 0 44px !important; background-size: 40px 40px !important; }
    .archive-hero-title, .archive-hero-section .section-title { font-size: 24px !important; }
    .archive-hero-subtitle { font-size: 14px !important; }
    .archive-hero-kicker { font-size: 10px !important; gap: 8px !important; margin-bottom: 24px !important; }
    .archive-hero-kicker::before,
    .archive-hero-kicker::after { width: 16px !important; }
}

/* ========================================
   記事 → 資格ページ（ピラー）への上りリンク
   ======================================== */
.column-qual-links {
    margin: 48px 0 0;
    padding: 24px;
    background: var(--bg-light, #f8f6f2);
    border: 1px solid var(--border-warm, #e7e2d8);
    border-radius: 12px;
}

.column-qual-links__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color, #2d4a43);
    margin: 0 0 14px;
}

.column-qual-links__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* 資格名は「1級建築施工管理技士の求人」など長めなので、折り返さない幅を確保する */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.column-qual-links__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-warm, #e7e2d8);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}

.column-qual-links__link:hover {
    border-color: var(--secondary-dark, #8a6d3b);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.column-qual-links__label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color, #2d4a43);
}

.column-qual-links__count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #5f5f5f);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .column-qual-links {
        padding: 20px 16px;
    }

    .column-qual-links__list {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   ハブ（まとめ記事）のクラスタ一覧・上りリンク・転職事例
   既存の上位記事をピラーに育てるための内部リンクブロック。新規URLは作らない。
   ======================================== */
.column-hub {
    margin: 56px 0 0;
    padding: 28px;
    background: var(--bg-white, #fff);
    border: 2px solid var(--border-warm, #e7e2d8);
    border-radius: 12px;
}

.column-hub__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color, #2d4a43);
    margin: 0 0 6px;
    padding: 0 0 10px;
    border-bottom: 2px solid var(--secondary-color, #b99769);
    display: inline-block;
}

.column-hub__lead {
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--text-muted, #5f5f5f);
}

.column-hub__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: hub;
}

.column-hub__item {
    counter-increment: hub;
    border-top: 1px solid var(--border-warm-soft, #f0ece3);
}

.column-hub__item:first-child {
    border-top: none;
}

.column-hub__link {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 13px 4px;
    text-decoration: none;
}

.column-hub__link::before {
    content: counter(hub);
    flex: 0 0 24px;
    font-family: var(--font-accent, 'Poppins', sans-serif);
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary-dark, #8a6d3b);
}

.column-hub__heading {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    /* a:hover の継承色に負けないよう明示する */
    color: var(--primary-color, #2d4a43);
}

.column-hub__link:hover .column-hub__heading {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.column-hub__date {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--text-muted, #5f5f5f);
}

/* --- クラスタ内の記事からハブへの上りリンク --- */
.column-hub-uplink {
    margin: 48px 0 0;
    padding: 18px 22px;
    background: var(--bg-white, #fff);
    border-left: 4px solid var(--secondary-color, #b99769);
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 6px rgba(45, 74, 67, 0.06);
}

.column-hub-uplink__label {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--secondary-dark, #8a6d3b);
}

.column-hub-uplink__link {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--primary-color, #2d4a43);
    text-decoration: none;
}

.column-hub-uplink__link:hover {
    color: var(--primary-color, #2d4a43);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --- ハブ記事に添える転職事例 --- */
.column-hub-cases {
    margin: 32px 0 0;
    padding: 24px;
    background: var(--bg-light, #f8f6f2);
    border-radius: 12px;
}

.column-hub-cases__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color, #2d4a43);
    margin: 0 0 14px;
}

.column-hub-cases__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.column-hub-cases__link {
    display: block;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-warm, #e7e2d8);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--primary-color, #2d4a43);
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}

.column-hub-cases__link:hover {
    color: var(--primary-color, #2d4a43);
    border-color: var(--secondary-dark, #8a6d3b);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.column-hub-cases__more {
    margin: 12px 0 0;
    font-size: 13px;
}

.column-hub-cases__more a {
    color: var(--primary-color, #2d4a43);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .column-hub {
        padding: 22px 16px;
    }

    .column-hub__title {
        font-size: 18px;
    }

    .column-hub__link {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 4px 10px;
    }

    .column-hub__date {
        flex-basis: 100%;
        padding-left: 36px;
    }

    .column-hub-cases {
        padding: 20px 16px;
    }
}
