/* ======================================
   サイトガイド専用スタイル
   ====================================== */

/* コンパクトヘッダー */
.compact-header {
    padding: 20px 0;
}

.compact-header .header-content h1 {
    font-size: 24px;
    margin-bottom: 0;
}

.compact-header .site-description {
    display: none;
}

/* シンプルナビゲーション */
.simple-nav {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.simple-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.simple-nav .nav-link {
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 15px;
}

.simple-nav .nav-link:hover {
    background: #f0f4ff;
    transform: translateX(-3px);
}

.simple-nav .nav-link i {
    margin-right: 8px;
}

/* ページトップに戻るボタン */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* 目次ナビゲーション（コンテンツの上に配置） */
.sticky-toc {
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e8ecf3;
    padding: 20px;
    margin-bottom: 40px;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

.sticky-toc h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.sticky-toc h3 i {
    margin-right: 10px;
    color: #667eea;
}

.sticky-toc h3::after {
    content: '\f107'; /* Font Awesome down arrow */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    transition: transform 0.3s ease;
    transform: rotate(-90deg);
}

.sticky-toc.expanded h3::after {
    transform: rotate(0deg);
}

.sticky-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.4s ease;
}

.sticky-toc.expanded ul {
    max-height: 800px;
    margin-top: 15px;
}

.sticky-toc.collapsed ul {
    max-height: 0;
    margin-top: 0;
}

.sticky-toc li {
    margin-bottom: 0;
}

.sticky-toc a {
    text-decoration: none;
    color: #666;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    background: white;
    border: 1px solid #e0e0e0;
}

.sticky-toc a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.sticky-toc a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 500;
    border-color: transparent;
}

.sticky-toc i {
    margin-right: 10px;
    width: 18px;
    font-size: 14px;
}

/* 特徴リスト */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.feature-item i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 15px;
    display: block;
}

.feature-item strong {
    display: block;
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.feature-item p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* 状況別ガイド */
.situation-guide {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.situation-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-top: 4px solid #667eea;
}

.situation-card.emergency {
    border-top-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.situation-card h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
}

.situation-card h3 i {
    margin-right: 12px;
    font-size: 24px;
}

.situation-card h4 {
    font-size: 18px;
    margin: 20px 0 15px;
    color: #555;
    display: flex;
    align-items: center;
}

.recommendation-list,
.emergency-list,
.daily-list,
.support-list,
.training-list,
.trend-list,
.reference-list,
.career-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommendation-list li,
.emergency-list li,
.daily-list li,
.support-list li,
.training-list li,
.trend-list li,
.reference-list li,
.career-list li {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border-left: 3px solid #667eea;
}

.recommendation-list li:hover,
.emergency-list li:hover,
.daily-list li:hover,
.support-list li:hover,
.training-list li:hover,
.trend-list li:hover,
.reference-list li:hover,
.career-list li:hover {
    background: #e8f0ff;
    transform: translateX(5px);
}

.recommendation-list li strong,
.emergency-list li strong,
.daily-list li strong,
.support-list li strong,
.training-list li strong,
.trend-list li strong,
.reference-list li strong,
.career-list li strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.recommendation-list li a,
.emergency-list li a,
.daily-list li a,
.support-list li a,
.training-list li a,
.trend-list li a,
.reference-list li a,
.career-list li a {
    text-decoration: none;
    color: #667eea;
    transition: color 0.3s ease;
}

.recommendation-list li a:hover,
.emergency-list li a:hover,
.daily-list li a:hover,
.support-list li a:hover,
.training-list li a:hover,
.trend-list li a:hover,
.reference-list li a:hover,
.career-list li a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.recommendation-list li a strong,
.emergency-list li a strong,
.daily-list li a strong,
.support-list li a strong,
.training-list li a strong,
.trend-list li a strong,
.reference-list li a strong,
.career-list li a strong {
    color: inherit;
}

.recommendation-list li p,
.emergency-list li p,
.daily-list li p,
.support-list li p,
.training-list li p,
.trend-list li p,
.reference-list li p,
.career-list li p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 使い方のヒント */
.usage-tips {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.tip-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #27ae60;
}

.tip-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
}

.tip-card h3 i {
    margin-right: 12px;
    color: #27ae60;
}

.tip-card h4 {
    font-size: 16px;
    margin: 20px 0 10px;
    color: #555;
}

.tip-card ul,
.tip-card ol {
    margin: 10px 0;
    padding-left: 25px;
}

.tip-card li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #666;
}

.tip-card li a {
    text-decoration: none;
    color: #667eea;
    transition: color 0.3s ease;
}

.tip-card li a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* FAQ セクション */
.faq-section {
    margin: 30px 0;
}

.faq-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.faq-item h3 {
    font-size: 18px;
    margin-bottom: 0;
    color: #333;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.faq-item h3:hover {
    color: #667eea;
}

.faq-item h3 i {
    margin-right: 12px;
    color: #667eea;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.faq-item h3:hover i {
    transform: scale(1.1);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 32px;
    padding-top: 10px;
}

.faq-answer p {
    margin-bottom: 10px;
    color: #555;
}

.faq-answer ul {
    margin: 10px 0;
    padding-left: 20px;
}

.faq-answer li {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.6;
}

/* トップページリスト */
.top-pages ol {
    counter-reset: top-counter;
    list-style: none;
    padding: 0;
}

.top-pages li {
    counter-increment: top-counter;
    background: white;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.top-pages li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.top-pages li::before {
    content: counter(top-counter);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.top-pages li strong {
    color: #333;
}

.top-pages li a {
    text-decoration: none;
    color: #667eea;
    transition: color 0.3s ease;
}

.top-pages li a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.top-pages li a strong {
    color: inherit;
}

/* カテゴリ統計表 */
.category-stats {
    margin: 30px 0;
    overflow-x: auto;
}

.category-stats table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.category-stats thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.category-stats th {
    padding: 15px;
    text-align: left;
    font-weight: 500;
}

.category-stats td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.category-stats tbody tr:hover {
    background: #f8f9fa;
}

.category-stats tbody tr:last-child td {
    border-bottom: none;
}

/* 使用例カード */
.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.use-case {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.use-case:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.use-case h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
}

.use-case h3 i {
    margin-right: 10px;
    color: #667eea;
}

.use-case ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.use-case li {
    padding: 8px 0;
    color: #666;
    line-height: 1.6;
}

.use-case li::before {
    content: '✓';
    color: #27ae60;
    font-weight: bold;
    margin-right: 8px;
}

/* 今後のコンテンツ */
.future-content {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.future-item {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #f39c12;
}

.future-item h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
}

.future-item h4 i {
    margin-right: 10px;
    color: #f39c12;
}

.future-item ul {
    margin: 0;
    padding-left: 20px;
}

.future-item li {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.6;
}

/* アクセス情報 */
.access-section {
    margin: 40px 0;
}

.access-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.access-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-top: 3px solid #667eea;
}

.access-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
}

.access-card h3 i {
    margin-right: 10px;
    color: #667eea;
}

.access-card code {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
}

.access-card ul {
    margin: 10px 0;
    padding-left: 20px;
}

.access-card li {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.6;
}

/* サマリーセクション */
.summary-section {
    margin: 40px 0;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.stat-card i {
    font-size: 40px;
    color: #667eea;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 42px;
    font-weight: bold;
    color: #333;
    margin: 10px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 最終メッセージ */
.final-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.final-message h3 {
    font-size: 24px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-message h3 i {
    margin-right: 12px;
    font-size: 28px;
}

.final-message p {
    font-size: 16px;
    line-height: 1.8;
    margin: 10px 0;
    opacity: 0.95;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .sticky-toc ul {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .feature-list {
        grid-template-columns: 1fr;
    }

    .use-cases {
        grid-template-columns: 1fr;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .access-info {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .sticky-toc ul {
        grid-template-columns: 1fr;
    }

    .sticky-toc h3 {
        font-size: 16px;
    }

    .sticky-toc {
        margin-bottom: 30px;
        padding: 15px;
    }

    .simple-nav {
        position: relative;
    }
}

@media (max-width: 480px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 36px;
    }

    .final-message {
        padding: 30px 20px;
    }

    .final-message h3 {
        font-size: 20px;
        flex-direction: column;
    }

    .final-message h3 i {
        margin: 0 0 10px 0;
    }
}

/* ページヘッダーの調整 */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.page-header .lead {
    font-size: 16px;
    color: #666;
    margin: 10px 0;
}

/* スムーススクロール */
html {
    scroll-behavior: smooth;
}

/* セクション間のスペース */
section {
    margin-bottom: 50px;
    scroll-margin-top: 80px; /* 固定ナビゲーション分の余白 */
}

section:last-child {
    margin-bottom: 30px;
}

/* コンテナの幅調整 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 24px;
    }

    .page-header .lead {
        font-size: 14px;
    }

    .container {
        padding: 15px;
    }

    section {
        scroll-margin-top: 60px;
    }
}
