/* PHRページ専用のデザイン改善 */

/* =================================
   1. リスト要素のスタイル改善
   ================================= */

/* 基本リストスタイルの改善 */
.panel-in-white-section ul,
.panel-in-gray-section ul,
.enhanced-card ul,
.value-item ul,
.business-item ul,
.highlight-item ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.panel-in-white-section ul li,
.panel-in-gray-section ul li,
.enhanced-card ul li,
.value-item ul li,
.business-item ul li,
.highlight-item ul li {
    position: relative;
    padding: 8px 0 8px 24px;
    margin: 4px 0;
    line-height: 1.6;
    transition: all 0.2s ease;
}

/* カスタムブレット（・）の改善 */
.panel-in-white-section ul li::before,
.panel-in-gray-section ul li::before,
.enhanced-card ul li::before,
.value-item ul li::before,
.business-item ul li::before,
.highlight-item ul li::before {
    content: '●';
    position: absolute;
    left: 8px;
    top: 8px;
    color: var(--accent-color, #007bff);
    font-size: 8px;
    transform: translateY(4px);
    opacity: 0.8;
}

/* ホバー効果 */
.panel-in-white-section ul li:hover,
.panel-in-gray-section ul li:hover,
.enhanced-card ul li:hover,
.value-item ul li:hover,
.business-item ul li:hover,
.highlight-item ul li:hover {
    background: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
    padding-left: 28px;
}

.panel-in-white-section ul li:hover::before,
.panel-in-gray-section ul li:hover::before,
.enhanced-card ul li:hover::before,
.value-item ul li:hover::before,
.business-item ul li:hover::before,
.highlight-item ul li:hover::before {
    color: var(--accent-color, #007bff);
    opacity: 1;
    transform: translateY(4px) scale(1.2);
}

/* 特別なリスト（KPI、トレンド）のスタイル */
.kpi-category ul li {
    padding: 10px 0 10px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.kpi-category ul li:last-child {
    border-bottom: none;
}

.trend-list li {
    padding: 12px 0 12px 32px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

.trend-list li::before {
    content: '▶';
    left: 12px;
    color: #28a745;
    font-size: 10px;
}

/* =================================
   2. 目次（TOC）のデザイン改善
   ================================= */

.table-of-contents {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 249, 252, 0.95) 100%);
    border: 2px solid rgba(0, 123, 255, 0.1);
    border-radius: 16px;
    padding: 32px;
    margin: 32px auto;
    max-width: 800px;
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.table-of-contents::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107);
}

.table-of-contents h2 {
    margin: 0 0 24px 0;
    color: var(--text-primary, #2c3e50);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-of-contents h2 i {
    color: var(--accent-color, #007bff);
    font-size: 1.3rem;
}

.table-of-contents nav {
    margin: 0;
}

.table-of-contents ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc-counter;
}

.table-of-contents ol li {
    counter-increment: toc-counter;
    margin: 0;
    padding: 0;
}

.table-of-contents ol li a {
    display: block;
    padding: 16px 20px;
    margin: 8px 0;
    color: var(--text-primary, #2c3e50);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    line-height: 1.5;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 123, 255, 0.05);
}

.table-of-contents ol li a::before {
    content: counter(toc-counter, decimal-leading-zero);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.table-of-contents ol li a {
    padding-left: 68px;
}

.table-of-contents ol li a:hover {
    background: rgba(0, 123, 255, 0.08);
    border-color: rgba(0, 123, 255, 0.2);
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 123, 255, 0.15);
}

.table-of-contents ol li a:hover::before {
    background: linear-gradient(135deg, #28a745, #20c997);
    transform: translateY(-50%) scale(1.1);
}

/* =================================
   3. スティッキーナビゲーション
   ================================= */

.sticky-toc {
    position: fixed;
    top: 100px;
    right: 30px;
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sticky-toc.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sticky-toc h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary, #2c3e50);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticky-toc h3 i {
    color: var(--accent-color, #007bff);
    font-size: 0.9rem;
}

.sticky-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sticky-toc ol li {
    margin: 0;
    padding: 0;
}

.sticky-toc ol li a {
    display: block;
    padding: 8px 12px;
    margin: 2px 0;
    color: var(--text-secondary, #6c757d);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sticky-toc ol li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--accent-color, #007bff);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sticky-toc ol li a:hover,
.sticky-toc ol li a.active {
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent-color, #007bff);
    font-weight: 500;
}

.sticky-toc ol li a:hover::before,
.sticky-toc ol li a.active::before {
    transform: scaleY(1);
}

/* 閉じるボタン */
.sticky-toc-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sticky-toc-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #495057;
}

/* =================================
   4. レスポンシブ対応
   ================================= */

@media (max-width: 1200px) {
    .sticky-toc {
        right: 20px;
        width: 260px;
    }
}

@media (max-width: 768px) {
    .sticky-toc {
        position: fixed;
        top: auto;
        bottom: 20px;
        right: 20px;
        left: 20px;
        width: auto;
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .table-of-contents {
        padding: 24px;
        margin: 24px 16px;
    }
    
    .table-of-contents ol li a {
        padding: 12px 16px 12px 56px;
        font-size: 0.9rem;
    }
    
    .table-of-contents ol li a::before {
        width: 24px;
        height: 24px;
        left: 16px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .sticky-toc {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 16px;
    }
    
    .table-of-contents {
        padding: 20px;
        margin: 20px 12px;
    }
}

/* =================================
   5. アクセシビリティとUX向上
   ================================= */

/* フォーカス状態の改善 */
.table-of-contents ol li a:focus,
.sticky-toc ol li a:focus {
    outline: 2px solid var(--accent-color, #007bff);
    outline-offset: 2px;
}

/* アニメーション設定の尊重 */
@media (prefers-reduced-motion: reduce) {
    .table-of-contents ol li a,
    .sticky-toc ol li a,
    .sticky-toc,
    .panel-in-white-section ul li,
    .panel-in-gray-section ul li {
        transition: none;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .table-of-contents {
        background: linear-gradient(135deg, rgba(33, 37, 41, 0.95) 0%, rgba(52, 58, 64, 0.95) 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .sticky-toc {
        background: rgba(33, 37, 41, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .table-of-contents ol li a {
        background: rgba(52, 58, 64, 0.6);
        border-color: rgba(255, 255, 255, 0.05);
    }
}