/* KOMON - ガイドページ専用スタイル */
/* 全ページ共通のカラーシステム・タイポグラフィは common.css を参照 */



/* ヒーローセクション */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.min-vh-50 {
    min-height: 50vh;
}

/* カード */
.card {
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-cubic);
}

.card:hover {
    box-shadow: var(--shadow-xl);
}

/* ボタン */
.btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* フッター */
footer {
    background-color: var(--bg-footer);
}

footer a {
    color: var(--bg-footer-link);
    text-decoration: none;
}

footer a:hover {
    color: var(--white);
}

.footer-col h6 {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: var(--white);
}


/* フッター レスポンシブ */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ガイドページのメインコンテンツ */
.guide-layout .col-lg-8 article {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
}

/* パンくずリスト（小さく控えめに） */
.guide-layout .breadcrumb {
    font-size: var(--font-size-xs);
    margin-bottom: 1rem;
    background-color: transparent;
    padding: 0;
}

.guide-layout .breadcrumb-item,
.guide-layout .breadcrumb-item a {
    color: var(--text-light);
}

.guide-layout .breadcrumb-item a:hover {
    color: var(--primary-color);
}

/* サイドバーのカード（目次・関連記事） */
.guide-layout .toc-sidebar,
.guide-layout .related-articles {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-md) !important;
    margin-bottom: 1.5rem;
}

.guide-layout .related-articles:last-child {
    margin-bottom: 0;
}

/* 目次のスクロールバーを細く */
.guide-layout .toc-sidebar {
    overflow-y: auto;
    max-height: 90vh;
}

.guide-layout .toc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.guide-layout .toc-sidebar::-webkit-scrollbar-track {
    background: var(--border-scrollbar-track);
    border-radius: var(--radius-xs);
}

.guide-layout .toc-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-scrollbar);
    border-radius: var(--radius-xs);
}

.guide-layout .toc-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-scrollbar-hover);
}

/* 目次スタイル */
.guide-layout .toc-sidebar h3 {
    font-size: var(--font-size-normal);
    margin-bottom: 1rem;
    color: var(--slate-800);
    font-weight: 600;
}

.guide-layout .toc-sidebar a {
    color: var(--slate-600);
    text-decoration: none;
    display: block;
    padding: 0.3rem 0;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-tight);
    transition: var(--transition-fast);
}

.guide-layout .toc-sidebar a:hover {
    color: var(--primary-color);
}

/* アクティブな目次項目（文字色のみ） */
.guide-layout .toc-sidebar a.active {
    color: var(--primary-color);
}

/* 目次の番号を非表示 */
.toc-list {
    list-style-type: none;
    padding-left: 0;
}

.toc-list ol {
    list-style-type: none;
    padding-left: 1.5rem;
}

/* h2見出しリンク（親レベル）を太字 */
.toc-list > li > a {
    font-weight: 600;
}

/* h3見出し（ネストレベル）の縦幅を狭く */
.toc-list ol li {
    margin-bottom: 0.15rem !important;
}

/* 関連記事スタイル */
.guide-layout .related-articles h3 {
    font-size: var(--font-size-normal);
    margin-bottom: 0.75rem;
    color: var(--slate-800);
    font-weight: 600;
}

.guide-layout .related-articles a {
    color: var(--slate-600);
    text-decoration: none;
    display: block;
    padding: 0.35rem 0;
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    border-bottom: 1px solid var(--slate-200);
}

.guide-layout .related-articles a:last-child {
    border-bottom: none;
}

.guide-layout .related-articles a:hover {
    color: var(--secondary-color);
    padding-left: 0.5rem;
    transition: var(--transition-fast);
}

/* 記事コンテンツの見出しスタイル */
.article-header {
    border-bottom: 3px solid var(--border-primary);
    padding-bottom: 1rem !important;
}

.article-content h2 {
    margin-top: var(--spacing-40);
    margin-bottom: var(--spacing-10);
    padding-bottom: var(--spacing-10);
    border-bottom: 2px solid var(--slate-200);
    color: var(--slate-800);
    font-size: var(--font-size-3xl);
    font-weight: 600;
}

.article-content h3,
.article-content h4 {
    margin-top: var(--spacing-20);
    margin-bottom: var(--spacing-15);
    font-size: var(--font-size-2xl);
    font-weight: 600;
}

/* FAQ セクション - 無機質な1つずつカードスタイル */
.faq-section .accordion {
    background-color: transparent;
}

.faq-section .accordion-item {
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    background-color: var(--white);
}

.faq-section .accordion-item:last-child {
    margin-bottom: 0;
}

.faq-section .accordion-button {
    border-radius: var(--radius-sm);
}

.faq-section .accordion-button:not(.collapsed) {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background-color: var(--bg-faq);
    border-color: var(--border-gray);
    box-shadow: none;
}

.faq-section .accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-gray);
}

/* CTAセクション - 横から圧迫されないように余白確保 */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-xl);
    padding: 3rem;
    color: var(--white);
    box-shadow: var(--shadow-cta);
    margin: 0 1rem;
}

.cta-box {
    max-width: 100%;
}

.cta-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-description {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
}

.cta-features {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.cta-features li {
    margin-bottom: 0.75rem;
    font-size: var(--font-size-lg);
    display: flex;
    align-items: center;
}

.cta-features i {
    color: var(--success-color);
    margin-right: 0.75rem;
    font-size: var(--font-size-2xl);
}

.btn-cta {
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    border: none;
    font-size: var(--font-size-xl);
    transition: var(--transition-base);
    box-shadow: var(--shadow-button);
}

.btn-cta:hover {
    background-color: var(--gray-200);
    color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
}

.cta-note {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }

    .hero-section {
        text-align: center;
    }

    .cta-section {
        padding: 2rem 1.5rem;
        margin: 0 0.5rem;
    }

    .cta-title {
        font-size: var(--font-size-3xl);
    }

    .btn-cta {
        width: 100%;
        padding: 0.875rem 2rem;
    }
}

/* ガイドページ固有スタイル */
.guide-layout {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* タイポグラフィ */
@media (min-width: 1200px) {
    .display-5 {
        font-size: var(--font-size-5xl);
    }
    .h2, h2 {
        font-size: var(--font-size-4xl);
    }
}

.lead {
    font-size: var(--font-size-lg);
    font-weight: 300;
    line-height: 1.5rem;
}

.article-content {
    font-size: var(--font-size-article);
    line-height: 1.5rem;
}

/* サイドバー */
.sidebar-sticky {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

@media (max-width: 991px) {
    .sidebar-sticky {
        position: static;
        margin-bottom: 2rem;
        max-height: none;
    }
}

/* 記事本文内の目次を非表示 */
.col-lg-8 .toc, .col-lg-8 nav.toc {
    display: none;
}

/* CTA注釈 */
.cta-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
}

/* 次に読むべき記事セクション */
.next-articles-section {
    margin-top: 3rem;
}

.section-title {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
}

/* 記事カード */
.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
    border: 1px solid var(--slate-200);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.article-card-header {
    padding: 1.25rem 1.25rem 0.5rem;
}

.article-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: var(--radius-2xl);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.article-card-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0.75rem;
    line-height: var(--line-height-normal);
}

.article-card-description {
    font-size: var(--font-size-md);
    color: var(--slate-500);
    line-height: var(--line-height-relaxed);
    margin-bottom: 0;
}

.article-card-footer {
    padding: 0 1.25rem 1.25rem;
}

.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: var(--font-size-normal);
    transition: var(--transition-fast);
}

.article-card-link:hover {
    color: var(--primary-hover);
    gap: 0.75rem;
}

.article-card-link i {
    transition: transform 0.2s;
}

.article-card:hover .article-card-link i {
    transform: translateX(3px);
}

/* メインコンテンツ・セクションのカード化 */
.guide-layout .col-lg-8 article {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.faq-section-wrapper {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.faq-section-wrapper .faq-section {
    margin: 0;
}

.next-articles-wrapper {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.next-articles-wrapper .next-articles-section {
    margin: 0;
}

/* カードグリッド */
.next-articles-grid h3 {
    font-size: var(--font-size-3xl);
    margin-bottom: 1.5rem;
    color: var(--slate-800);
}

.next-articles-grid .card {
    border: 1px solid var(--slate-200);
    transition: var(--transition-base);
    height: 100%;
}

.next-articles-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.next-articles-grid .card-title {
    font-size: var(--font-size-xl);
    color: var(--slate-800);
    font-weight: 600;
}

.next-articles-grid .card-text {
    font-size: var(--font-size-md);
    color: var(--slate-500);
}

.next-articles-grid .badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* レスポンシブ（モバイル） */
@media (max-width: 768px) {
    .guide-layout .col-lg-8 article,
    .faq-section-wrapper,
    .next-articles-wrapper {
        padding: 1.5rem;
    }

    .article-card-title {
        font-size: var(--font-size-xl);
    }
}

/* ========================================
   Tables - モダン・シック・フレンドリー
   ======================================== */

/* テーブルコンテナ（スクロール対応） */
.price-overview,
.tech-pricing,
.tax-info {
    overflow-x: auto;
    margin: var(--spacing-xl) 0;
}

/* 共通テーブルスタイル */
.price-table,
.comparison-table,
.tax-table,
.criminal-table,
.insurance-table,
.role-table,
.position-table,
.merit-demerit-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: var(--font-size-normal);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ヘッダー - シンプルでモダン */
.price-table thead,
.comparison-table thead,
.tax-table thead,
.criminal-table thead,
.insurance-table thead,
.role-table thead,
.position-table thead,
.merit-demerit-table thead {
    background: var(--slate-800);
}

.price-table thead th,
.comparison-table thead th,
.tax-table thead th,
.criminal-table thead th,
.insurance-table thead th,
.role-table thead th,
.position-table thead th,
.merit-demerit-table thead th {
    color: var(--white);
    font-weight: 500;
    font-size: var(--font-size-normal);
    padding: 1.2rem 1.5rem;
    text-align: left;
    border: none;
    letter-spacing: 0.02em;
}

/* テーブル本体 - ストライプで読みやすく */
.price-table tbody tr,
.comparison-table tbody tr,
.tax-table tbody tr,
.criminal-table tbody tr,
.insurance-table tbody tr,
.role-table tbody tr,
.position-table tbody tr,
.merit-demerit-table tbody tr {
    transition: var(--transition-fast);
}

.price-table tbody tr:nth-child(even),
.comparison-table tbody tr:nth-child(even),
.tax-table tbody tr:nth-child(even),
.criminal-table tbody tr:nth-child(even),
.insurance-table tbody tr:nth-child(even),
.role-table tbody tr:nth-child(even),
.position-table tbody tr:nth-child(even),
.merit-demerit-table tbody tr:nth-child(even) {
    background: var(--slate-50);
}

.price-table tbody tr:hover,
.comparison-table tbody tr:hover,
.tax-table tbody tr:hover,
.criminal-table tbody tr:hover,
.insurance-table tbody tr:hover,
.role-table tbody tr:hover,
.position-table tbody tr:hover,
.merit-demerit-table tbody tr:hover {
    background: #f0f4ff;
    transform: translateX(4px);
}

.price-table tbody td,
.comparison-table tbody td,
.tax-table tbody td,
.criminal-table tbody td,
.insurance-table tbody td,
.role-table tbody td,
.position-table tbody td,
.merit-demerit-table tbody td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    line-height: var(--line-height-relaxed);
}

.price-table tbody tr:last-child td,
.comparison-table tbody tr:last-child td,
.tax-table tbody tr:last-child td,
.criminal-table tbody tr:last-child td,
.insurance-table tbody tr:last-child td,
.role-table tbody tr:last-child td,
.position-table tbody tr:last-child td,
.merit-demerit-table tbody tr:last-child td {
    border-bottom: none;
}

/* 1列目 - カテゴリー名を強調 */
.price-table tbody td:first-child,
.comparison-table tbody td:first-child,
.tax-table tbody td:first-child,
.criminal-table tbody td:first-child,
.insurance-table tbody td:first-child,
.role-table tbody td:first-child,
.position-table tbody td:first-child,
.merit-demerit-table tbody td:first-child {
    font-weight: 600;
    color: var(--slate-900);
}

/* 2列目・3列目 - 報酬額を目立たせる */
.price-table tbody td:nth-child(2),
.price-table tbody td:nth-child(3),
.comparison-table tbody td:nth-child(2),
.comparison-table tbody td:nth-child(3),
.criminal-table tbody td:nth-child(2),
.insurance-table tbody td:nth-child(2) {
    font-weight: 600;
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

/* 税務テーブル専用 */
.tax-table tbody td:nth-child(2) {
    font-weight: 600;
}

.tax-table tbody td:nth-child(3) {
    font-weight: 600;
    color: var(--primary-color);
}

/* 4列目 - 特徴（薄めの文字） */
.comparison-table tbody td:nth-child(4) {
    color: var(--slate-500);
    font-size: var(--font-size-sm);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .price-table thead th,
    .comparison-table thead th,
    .tax-table thead th,
    .criminal-table thead th,
    .insurance-table thead th,
    .role-table thead th,
    .position-table thead th,
    .merit-demerit-table thead th {
        padding: 0.8rem 1rem;
        font-size: var(--font-size-sm);
    }

    .price-table tbody td,
    .comparison-table tbody td,
    .tax-table tbody td,
    .criminal-table tbody td,
    .insurance-table tbody td,
    .role-table tbody td,
    .position-table tbody td,
    .merit-demerit-table tbody td {
        padding: 0.8rem 1rem;
        font-size: var(--font-size-sm);
    }

    .price-table tbody td:nth-child(2),
    .price-table tbody td:nth-child(3),
    .comparison-table tbody td:nth-child(2),
    .comparison-table tbody td:nth-child(3),
    .criminal-table tbody td:nth-child(2),
    .insurance-table tbody td:nth-child(2) {
        font-size: var(--font-size-md);
    }
}

/* タブレット */
@media (max-width: 1024px) and (min-width: 769px) {
    .price-table,
    .comparison-table,
    .tax-table,
    .criminal-table,
    .insurance-table,
    .role-table,
    .position-table,
    .merit-demerit-table {
        font-size: var(--font-size-base);
    }
}
