/* 基本スタイル */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    position: relative;
}

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

/* ヘッダー */
header {
    display: none;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: #0066cc;
}

/* 目次トグルボタン - 縦中央に配置 */
/* .toc-toggle-button {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: #0066cc;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
} */
.toc-toggle-button {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: #0066cc;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: all 0.3s ease;
}

.toc-toggle-button::before {
    content: "目次";
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-size: .53rem;
    white-space: nowrap;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
}

.fa-list:before, .fa-times:before
 {
    top: 21px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
 }

.toc-toggle-button:hover {
    background-color: #0052a3;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* トグルボタンの位置変更（目次表示時） */
.toc-toggle-button.active {
    left: 290px; /* 目次の幅 + 余白 */
}

/* フローティング目次 - 左側表示 */
.table-of-contents {
    position: fixed;
    left: -300px; /* 最初は画面外 */
    top: 80px; /* ヘッダーの下 */
    width: 280px;
    background-color: #fff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    border-radius: 0 10px 10px 0;
    height: calc(100vh - 160px); /* ヘッダーとマージンを考慮 */
    overflow-y: auto;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 998;
}

.table-of-contents.show {
    left: 0; /* 表示時は左端に */
    opacity: 1;
}

/* 目次の背景オーバーレイ */
.toc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.toc-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 目次内部のスタイル調整 */
.toc-inner {
    padding: 25px 20px;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.toc-header h2 {
    font-size: 20px;
    margin: 0;
    color: #0066cc;
}

.toc-close {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
}

.toc-close:hover {
    color: #333;
    transform: rotate(90deg);
}

/* 目次リストの改善 */
#toc-list {
    list-style: none;
    padding-left: 0;
}

#toc-list li {
    margin-bottom: 14px;
    transition: all 0.2s;
}

#toc-list li:hover {
    transform: translateX(3px);
}

#toc-list li a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    font-weight: 500;
}

#toc-list li a:hover {
    background-color: #f0f7ff;
    color: #0066cc;
}

#toc-list li a.active {
    background-color: #e6f0ff;
    color: #0066cc;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 102, 204, 0.1);
}

/* メインコンテンツ */
.main-content {
    padding: 40px;
    background-color: #fff;
}

.content-section {
    margin-bottom: 600px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.content-section:last-child {
    border-bottom: none;
}

.content-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #222;
}

/* 特徴セクション */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.feature-card h3 {
    margin-bottom: 10px;
    color: #0066cc;
}

/* 料金プラン */
.pricing-table {
    display: flex;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.price-card {
    flex: 1;
    min-width: 250px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.price-card.featured {
    background-color: #f0f7ff;
    border: 2px solid #0066cc;
    transform: scale(1.05);
}

.price-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.price-card .price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #0066cc;
}

.price-card ul {
    list-style: none;
    margin-bottom: 20px;
    text-align: left;
}

.price-card ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

/* 導入事例 */
.case-studies {
    margin: 30px 0;
}

.case-study {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.case-study h3 {
    margin-bottom: 10px;
    color: #0066cc;
}

/* FAQ */
.faq-container {
    margin: 30px 0;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.faq-item h3 {
    margin-bottom: 10px;
    color: #444;
    font-size: 18px;
}

/* CTA */
.cta-container {
    text-align: center;
    margin: 30px 0;
}

.cta-button {
    display: inline-block;
    background-color: #0066cc;
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0052a3;
}

/* フッター */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

/* レスポンシブデザイン */
@media (max-width: 992px) {
    .pricing-table {
        flex-direction: column;
    }
    
    .price-card.featured {
        transform: none;
    }
    
    .toc-toggle-button {
        width: 40px;
        height: 40px;
        left: 10px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        margin-top: 10px;
        align-self: stretch;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav ul li {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .content-section h2 {
        font-size: 24px;
    }
    
    /* 目次の幅を小さくする */
    .table-of-contents {
        width: 240px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 20px 0;
    }
    
    .content-section {
        margin-bottom: 40px;
        padding-bottom: 30px;
    }
    
    .cta-button {
        width: 100%;
        padding: 15px;
    }
    
    .price-card {
        padding: 15px;
    }
    
    /* 目次をより小さく */
    .table-of-contents {
        width: 220px;
    }
    
    /* 目次トグルボタンをさらに小さく */
    .toc-toggle-button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* レスポンシブ対応の追加 */
@media (max-width: 992px) {
    .toc-toggle-button.active {
        left: 240px; /* 目次の幅を考慮して調整 */
    }
    
    .table-of-contents {
        width: 230px;
    }
}

@media (max-width: 768px) {
    .table-of-contents {
        width: 80%;
        max-width: 280px;
        height: 100vh;
        top: 0;
        border-radius: 0;
    }
    
    .toc-toggle-button {
        width: 45px;
        height: 45px;
    }
    
    .toc-toggle-button.active {
        left: calc(80% + 10px); /* モバイル時は目次の幅に合わせて調整 */
        max-left: calc(280px + 10px);
    }
    
    .toc-inner {
        padding: 20px 15px;
        padding-top: 30px;
    }
}

@media (max-width: 480px) {
    .toc-toggle-button {
        width: 40px;
        height: 40px;
        left: 10px;
    }
    
    .toc-toggle-button.active {
        left: calc(80% + 5px);
    }
}

/* =============================================
   ソース閲覧防止用CSS
   ============================================= */

/* テキスト選択無効化 */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 画像のドラッグ無効化 */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* 印刷時に空白ページを表示 */
@media print {
    body {
        display: none !important;
    }
    
    html::after {
        content: "印刷は許可されていません";
        display: block;
        text-align: center;
        font-size: 24px;
        margin-top: 100px;
    }
}