@charset "utf-8";

/* =================================================================
   1. レイアウト・固定設定
================================================================= */
#literacy-main { 
    overflow: visible !important; 
}

.literacy-container {
    display: flex;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 4%;
    gap: 50px;
    align-items: flex-start;
}

.literacy-sidebar {
    width: 280px;
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    flex-shrink: 0;
    z-index: 10;
}

/* =================================================================
   2. サイドバーナビ（共通） + フラグ追従設定
================================================================= */
.literacy-nav {
    background: #fff;
    padding: 25px 25px 25px 40px; /* 左側にフラグ用の余白を確保 */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative; /* フラグの基準位置 */
}

/* フラグが通る縦線 */
.literacy-nav::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 65px; /* CONTENTSのタイトルの下から */
    bottom: 30px;
    width: 2px;
    background: #f0f0f0;
}

/* 動くフラグ本体 */
#nav-flag {
    position: absolute;
    left: 16px;
    top: 0; /* JSで動的に制御 */
    width: 10px;
    height: 10px;
    background: #ee18dc;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(238, 24, 220, 0.6);
    transition: top 0.3s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    z-index: 5;
}

/* フラグの横に小さな三角（旗のイメージ） */
#nav-flag::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 2px;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    border-left: 5px solid #ee18dc;
}

.nav-title { 
    font-weight: bold; 
    font-size: 1.4rem; 
    color: #ee18dc; 
    margin-bottom: 20px; 
    border-bottom: 2px solid #f4f4f4; 
    padding-bottom: 10px; 
}

.literacy-nav ul { 
    list-style: none !important; 
    padding: 0 !important; 
}

.literacy-nav li { 
    margin-bottom: 10px; 
}

.literacy-nav a { 
    display: block; 
    padding: 10px 15px; 
    color: #333; 
    text-decoration: none; 
    font-size: 1.5rem; 
    border-left: 2px solid transparent; /* フラグがあるのでボーダーは透明に */
    transition: 0.3s; 
}

/* アクティブな項目の色を変える（JSで制御） */
.literacy-nav a.is-active {
    color: #ee18dc;
    font-weight: bold;
}

.literacy-nav a:hover { 
    color: #ee18dc; 
    background: rgba(238, 24, 220, 0.05); 
}

/* =================================================================
   3. コンテンツ装飾（共通）
================================================================= */
.literacy-content { 
    flex-grow: 1; 
}

.main-title { 
    font-size: 3.2rem; 
    margin-bottom: 50px; 
    color: #333; 
    text-align: left; 
}

.literacy-section { 
    margin-bottom: 100px; 
    padding-top: 100px; 
    margin-top: -100px; 
}

/* テンプレート用見出し */
.literacy-section h2 { 
    font-size: 2.4rem; 
    color: #5d2266; 
    border-left: 6px solid #ee18dc; 
    padding: 8px 20px; 
    background: #f9f9f9; 
    margin-bottom: 30px; 
    text-align: left; 
}

.section-body { 
    font-size: 1.6rem; 
    line-height: 2; 
    color: #444; 
}

.lead-text { 
    font-size: 1.8rem; 
    color: #5d2266; 
    margin-bottom: 30px; 
    line-height: 1.8; 
    font-weight: 500; 
}

.concept-card { 
    background: #fff; 
    padding: 30px; 
    border-radius: 15px; 
    margin-bottom: 30px; 
    border: 1px solid #eee; 
}

.concept-card h3 { 
    text-align: left; 
    font-size: 1.9rem; 
    color: #ee18dc; 
    border-bottom: 1px solid #fce4f6; 
    padding-bottom: 10px; 
    margin-bottom: 20px; 
}

/* リスト・タイル装飾 */
.literacy-elements, .evidence-triad { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    list-style: none !important; 
    padding: 0 !important; 
    margin: 20px 0; 
}

.literacy-elements li, .evidence-triad li { 
    flex: 1; 
    min-width: 180px; 
    background: #fdfbff; 
    padding: 20px; 
    border-radius: 8px; 
    border: 1px solid #f4f7ff; 
    font-size: 1.5rem; 
    text-align: center; 
}

.evidence-triad li { 
    border-top: 4px solid #ee18dc; 
    text-align: left; 
}

.evidence-triad li strong { 
    display: block; 
    margin-bottom: 5px; 
    color: #5d2266; 
}

/* 特殊枠 */
.emphasis-box { 
    background: linear-gradient(135deg, #5d2266 0%, #3a1540 100%); 
    color: #fff !important; 
    padding: 30px; 
    border-radius: 12px; 
    font-size: 1.6rem; 
}

.ai-support-list li { 
    position: relative; 
    padding: 12px 12px 12px 45px; 
    background: #f8f9fa; 
    margin-bottom: 10px; 
    border-radius: 8px; 
    list-style: none !important; 
    font-size: 1.5rem; 
}

.ai-support-list li::before { 
    content: "AI"; 
    position: absolute; 
    left: 10px; 
    background: #ee18dc; 
    color: #fff; 
    padding: 2px 6px; 
    border-radius: 4px; 
    font-weight: bold; 
    font-size: 1rem; 
}

/* ロールグリッド（当ラボの役割） */
.role-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}

.role-item { 
    background: #fff; 
    padding: 40px 20px 20px; 
    border-radius: 20px; 
    border: 1px solid #eee; 
    position: relative; 
}

.role-icon { 
    position: absolute; 
    top: -15px; 
    left: 50%; 
    transform: translateX(-50%); 
    background: #ee18dc; 
    color: #fff; 
    padding: 5px 20px; 
    border-radius: 20px; 
    font-size: 1.3rem; 
    font-weight: bold; 
}

.role-item h4 { 
    font-size: 1.8rem; 
    color: #5d2266; 
    margin-bottom: 10px; 
}

.role-item p { 
    font-size: 1.4rem; 
    line-height: 1.6; 
}

/* =================================================================
   4. NTSページ固有の調整（管理画面エディタ用）
================================================================= */
.nts-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.entry-content h2 {
    font-size: 2.4rem;
    color: #5d2266;
    border-left: 6px solid #ee18dc;
    padding: 8px 20px;
    background: #f9f9f9;
    margin: 60px 0 30px;
    text-align: left;
    scroll-margin-top: 140px; 
}

.entry-content h3 {
    font-size: 2.0rem;
    color: #ee18dc;
    border-bottom: 2px solid #fce4f6;
    padding-bottom: 10px;
    margin: 40px 0 20px;
    text-align: left;
}

/* =================================================================
   5. レスポンシブ
================================================================= */
@media (max-width: 900px) {
    .literacy-container { 
        flex-direction: column; 
    }
    .literacy-sidebar { 
        width: 100%; 
        position: static; 
        margin-bottom: 30px; 
    }
    #nav-flag, .literacy-nav::before {
        display: none; /* スマホではフラグを隠す */
    }
    .literacy-nav {
        padding-left: 25px;
    }
}