/**
 * BASE ドキュメントサイト風レイアウト
 * Astro風サイドバーナビゲーション
 */

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --docs-sidebar-width: 280px;
    --docs-toc-width: 180px;
    --docs-sidebar-bg: #f8f9fa;
    --docs-sidebar-border: #e5e7eb;
    --docs-nav-text: #374151;
    --docs-nav-text-hover: #6b47d9;
    --docs-nav-active: #6b47d9;
    --docs-nav-active-bg: rgba(107, 71, 217, 0.08);
    --docs-search-bg: #ffffff;
    --docs-search-border: #d1d5db;
    --docs-search-focus: #6b47d9;
    --docs-transition: 0.2s ease;
}

/* ==========================================================================
   2カラムレイアウト（Astro風 - サイドバー左端固定）
   ========================================================================== */
/* 親コンテナの幅制限を解除 */
.page-contents_area:has(.docs-layout) {
    max-width: none;
    width: 100%;
    padding: 0;
}

.page-contents_area > .contents-wrap:has(.docs-layout) {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

.docs-layout {
    display: block;
    min-height: calc(100vh - 200px);
    width: 100%;
}

.docs-main {
    margin-left: var(--docs-sidebar-width);
    padding: 0 24px;
    min-height: calc(100vh - 200px);
}

/* ==========================================================================
   モバイル用検索ボックス（メインコンテンツ上部）
   ========================================================================== */
.docs-mobile-search {
    display: none;
    position: relative;
    margin-bottom: 24px;
}

.docs-mobile-search .docs-search-input-wrap {
    position: relative;
}

.docs-mobile-search .docs-search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--docs-search-border);
    border-radius: 8px;
    background: var(--docs-search-bg);
    font-size: 14px;
    color: var(--docs-nav-text);
    transition: border-color var(--docs-transition), box-shadow var(--docs-transition);
}

.docs-mobile-search .docs-search-input:focus {
    outline: none;
    border-color: var(--docs-search-focus);
    box-shadow: 0 0 0 3px rgba(107, 71, 217, 0.1);
}

.docs-mobile-search .docs-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.docs-mobile-search .docs-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--docs-search-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.docs-mobile-search .docs-search-results.is-active {
    display: block;
}

/* ==========================================================================
   サイドバー（画面左端固定）
   ========================================================================== */
.docs-sidebar {
    position: fixed;
    top: 140px;
    left: 0;
    width: var(--docs-sidebar-width);
    height: calc(100vh - 140px);
    background: #fff;
    border-right: 1px solid var(--docs-sidebar-border);
    z-index: 100;
}


/* .page-contents_area のスタイルをリセット（サイドバー内） */
.docs-sidebar ul,
.docs-sidebar li {
    list-style: none;
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.docs-sidebar-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 24px 0 20px 20px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.docs-sidebar-inner::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar-inner::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar-inner::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

/* ==========================================================================
   サイドバーヘッダー（ロゴ + 検索）
   ========================================================================== */
.docs-sidebar-header {
    margin-bottom: 16px;
    padding-right: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--docs-sidebar-border);
}

.docs-sidebar-logo {
    display: block;
    text-decoration: none;
    margin-bottom: 12px;
}

.docs-sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--docs-nav-text);
    letter-spacing: -0.02em;
}

.docs-sidebar-logo:hover .docs-sidebar-logo-text {
    color: var(--docs-nav-active);
}

/* ヘッダー内の検索ボックス */
.docs-sidebar-header .docs-search {
    margin-bottom: 0;
    padding-right: 0;
}

/* ==========================================================================
   BASEページ：大きなヘッダー画像を非表示（Astro docs風にシンプルに）
   ========================================================================== */
.docs-layout ~ .page-header-sec,
body:has(.docs-layout) .page-header-sec {
    display: none;
}

/* パンくずリストもdocs-layoutがある場合は非表示（サイドバーでナビゲーション） */
body:has(.docs-layout) .breadcrumbs {
    display: none;
}

/* BASEページはフッター非表示 */
body:has(.docs-layout) footer,
body:has(.docs-layout) .footer {
    display: none;
}

/* ==========================================================================
   検索ボックス
   ========================================================================== */
.docs-search {
    position: relative;
    margin-bottom: 24px;
    padding-right: 16px;
}

.docs-search-input-wrap {
    position: relative;
}

.docs-search-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--docs-search-border);
    border-radius: 8px;
    background: var(--docs-search-bg);
    font-size: 14px;
    color: var(--docs-nav-text);
    transition: border-color var(--docs-transition), box-shadow var(--docs-transition);
}

.docs-search-input:focus {
    outline: none;
    border-color: var(--docs-search-focus);
    box-shadow: 0 0 0 3px rgba(107, 71, 217, 0.1);
}

.docs-search-input::placeholder {
    color: #9ca3af;
}

.docs-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* 検索結果ドロップダウン */
.docs-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 16px;
    background: #fff;
    border: 1px solid var(--docs-search-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.docs-search-results.is-active {
    display: block;
}

.docs-search-results-empty,
.docs-search-results-loading {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.docs-search-result-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    transition: background var(--docs-transition);
}

.docs-search-result-item:last-child {
    border-bottom: none;
}

.docs-search-result-item:hover {
    background: var(--docs-nav-active-bg);
}

.docs-search-result-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--docs-nav-text);
    margin-bottom: 4px;
}

.docs-search-result-category {
    font-size: 12px;
    color: #6b7280;
}

/* ==========================================================================
   ナビゲーション
   ========================================================================== */
.docs-nav {
    padding-right: 16px;
}

.docs-nav-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--docs-nav-text);
    text-decoration: none;
    border-radius: 6px;
    transition: background var(--docs-transition), color var(--docs-transition);
}

.docs-nav-all:hover {
    background: var(--docs-nav-active-bg);
    color: var(--docs-nav-active);
}

.docs-nav-all.is-current {
    background: var(--docs-nav-active-bg);
    color: var(--docs-nav-active);
}

.docs-nav-all svg {
    flex-shrink: 0;
}

/* セクションタイトル（部門別シリーズ、AI速報＆実践Tips） */
.docs-nav-section {
    margin-bottom: 8px;
}

.docs-nav-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 8px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--docs-sidebar-border);
    margin-bottom: 8px;
}

.docs-nav-section-icon {
    font-size: 14px;
}

/* カテゴリグループ */
.docs-nav-group {
    margin-bottom: 4px;
}

.docs-nav-group-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--docs-nav-text);
    text-align: left;
    border-radius: 6px;
    transition: background var(--docs-transition);
}

.docs-nav-group-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

.docs-nav-group-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    transition: transform var(--docs-transition);
}

.docs-nav-group.is-open .docs-nav-group-icon {
    transform: rotate(90deg);
}

.docs-nav-group-name {
    flex: 1;
}

.docs-nav-group-count {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 10px;
}

/* 記事リスト（Astro docs風 - シンプル） */
/* .page-contents_area ul のスタイルを上書き */
.docs-sidebar .docs-nav-items,
.docs-nav-items {
    list-style: none;
    margin: 0;
    padding: 4px 0 8px 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border: none;
    background: transparent;
}

.docs-nav-group.is-open .docs-nav-items {
    max-height: 2000px;
}

.docs-nav-item {
    position: relative;
}

.docs-nav-item a {
    display: block;
    padding: 6px 12px;
    font-size: 14px;
    color: #6b7280;
    text-decoration: none;
    line-height: 1.5;
    border-radius: 4px;
    transition: color var(--docs-transition), background var(--docs-transition);
    word-break: break-word;
}

.docs-nav-item a:hover {
    color: var(--docs-nav-text);
    background: rgba(0, 0, 0, 0.04);
}

.docs-nav-item.is-current a {
    color: var(--docs-nav-active);
    font-weight: 500;
    background: var(--docs-nav-active-bg);
}

/* ==========================================================================
   モバイルトグル
   ========================================================================== */
.docs-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--docs-nav-active);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(107, 71, 217, 0.4);
    cursor: pointer;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.docs-sidebar-toggle .toggle-icon {
    position: relative;
    width: 20px;
    height: 2px;
    background: #fff;
}

.docs-sidebar-toggle .toggle-icon::before,
.docs-sidebar-toggle .toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
}

.docs-sidebar-toggle .toggle-icon::before {
    top: -6px;
}

.docs-sidebar-toggle .toggle-icon::after {
    top: 6px;
}

.docs-sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--docs-nav-text);
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background var(--docs-transition);
}

.docs-sidebar-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.docs-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ==========================================================================
   メインコンテンツ調整
   ========================================================================== */
.docs-main .page-contents {
    max-width: none;
}

.docs-main .base-single-contents {
    max-width: none;
}

.docs-main .base-sec {
    padding: 0;
}

.docs-main .base-sec .contents-wrap {
    padding: 0;
}

.docs-main .sec-main_title {
    text-align: left;
    margin-bottom: 32px;
}

.docs-main .sec-main_title .sec-title_head {
    font-size: 28px;
}

/* カテゴリフィルターはサイドバーに統合されたので非表示 */
.docs-layout .base-category-filter {
    display: none;
}

/* BASEトップ説明文 */
.base-description {
    text-align: center;
    font-size: 16px;
    color: #6b7280;
    margin: -16px 0 32px 0;
    line-height: 1.6;
}

/* 記事カードレイアウト調整 */
.docs-main .base-card_area {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   記事ページレイアウト（本文 + 目次）
   ========================================================================== */
.docs-main--with-toc {
    margin-right: var(--docs-toc-width);
}

.docs-article-layout {
    display: block;
}

.docs-article {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
}

/* アイキャッチ画像（note風） */
.base-article_eyecatch {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.base-article_eyecatch img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 記事タイトル（Astro docs風） */
.base-article_title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 16px 0 32px 0;
    letter-spacing: -0.02em;
}

/* 記事メタ情報 */
.base-article_meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.base-article_category {
    display: inline-block;
    padding: 4px 12px;
    background: var(--docs-nav-active);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    transition: background var(--docs-transition);
}

.base-article_category:hover {
    background: #5a3bc7;
}

.base-article_date {
    font-size: 14px;
    color: #6b7280;
}

/* タグリスト（note風） */
.base-article_tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.base-article_tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    transition: background var(--docs-transition), color var(--docs-transition);
}

.base-article_tag:hover {
    background: var(--docs-nav-active-bg);
    color: var(--docs-nav-active);
}

/* ==========================================================================
   目次（TOC）- 画面右端固定
   ========================================================================== */
.docs-toc {
    position: fixed;
    top: 140px;
    right: 0;
    width: var(--docs-toc-width);
    height: calc(100vh - 140px);
    background: #fff;
    border-left: 1px solid var(--docs-sidebar-border);
    z-index: 100;
}

.docs-toc-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 24px 16px 20px 16px;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

.docs-toc-inner::-webkit-scrollbar {
    width: 4px;
}

.docs-toc-inner::-webkit-scrollbar-track {
    background: transparent;
}

.docs-toc-inner::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 2px;
}

.docs-toc-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--docs-sidebar-border);
}

.docs-toc-nav {
    display: flex;
    flex-direction: column;
}

.docs-toc-nav a {
    display: block;
    padding: 6px 0 6px 12px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    line-height: 1.5;
    border-left: 2px solid transparent;
    transition: color var(--docs-transition), border-color var(--docs-transition);
}

.docs-toc-nav a:hover {
    color: var(--docs-nav-active);
}

.docs-toc-nav a.is-active {
    color: var(--docs-nav-active);
    border-left-color: var(--docs-nav-active);
}

/* 見出しレベルに応じたインデント */
.docs-toc-nav a[data-level="3"] {
    padding-left: 24px;
    font-size: 12px;
}

.docs-toc-nav a[data-level="4"] {
    padding-left: 36px;
    font-size: 12px;
}

/* 目次が空の場合は非表示 */
.docs-toc:has(.docs-toc-nav:empty) {
    display: none;
}

.docs-toc-nav:empty + .docs-toc-title {
    display: none;
}

/* ==========================================================================
   レスポンシブ
   ========================================================================== */
@media screen and (max-width: 1024px) {
    /* 親コンテナのパディング調整 */
    .page-contents_area > .contents-wrap:has(.docs-layout) {
        padding: 0 20px;
    }

    .docs-layout {
        display: block;
    }

    /* モバイル用検索ボックス表示 */
    .docs-mobile-search {
        display: block;
    }

    /* サイドバーをオフスクリーンに（スライドイン用） */
    .docs-sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background: #fff;
        border-right: 1px solid var(--docs-sidebar-border);
        z-index: 999;
        transition: left 0.3s ease;
    }

    .docs-sidebar.is-open {
        left: 0;
    }

    .docs-sidebar-inner {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 60px 20px 20px 20px;
        box-shadow: none;
    }

    .docs-sidebar.is-open .docs-sidebar-inner {
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    }

    .docs-sidebar-toggle {
        display: flex;
    }

    .docs-sidebar-close {
        display: flex;
    }

    .docs-sidebar.is-open .docs-sidebar-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    /* メインコンテンツのマージン解除 */
    .docs-main {
        margin-left: 0;
        padding: 0;
    }

    /* 記事レイアウト：目次を非表示 */
    .docs-main--with-toc {
        margin-right: 0;
    }

    .docs-article {
        max-width: none;
    }

    .docs-toc {
        display: none;
    }

    .docs-search {
        padding-right: 0;
    }

    .docs-search-results {
        right: 0;
    }

    .docs-nav {
        padding-right: 0;
    }
}

@media screen and (max-width: 768px) {
    .docs-main .base-card_area {
        grid-template-columns: 1fr;
    }

    .docs-main .sec-main_title .sec-title_head {
        font-size: 24px;
    }
}

/* ==========================================================================
   BASE トップページ（ランディングページ）
   ========================================================================== */

/* トップページ用レイアウト調整 */
.docs-layout--top .docs-main {
    padding-top: 100px; /* ヘッダー + CONTACTボタン分の余白 */
}


/* ----------------------------------------
   最新更新通知
   ---------------------------------------- */
.base-latest-update {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 1px solid rgba(123, 104, 238, 0.15);
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.base-latest-update_label {
    background: linear-gradient(135deg, #7B68EE 0%, #9B8BFF 100%);
    color: #fff !important;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.base-latest-update_date {
    color: #666;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.base-latest-update_link {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    transition: color 0.2s ease;
}

.base-latest-update_link:hover {
    color: #7B68EE;
}

@media screen and (max-width: 768px) {
    .base-latest-update {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 14px;
    }

    .base-latest-update_link {
        flex-basis: 100%;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}


/* ----------------------------------------
   ヒーローセクション
   ---------------------------------------- */
.base-hero {
    text-align: center;
    padding: 60px 32px;
    background: url('../images/page-header_base.png') center center / cover no-repeat;
    border-radius: 16px;
    margin-top: 30px !important;
    margin-bottom: 30px;
    position: relative;
}

.base-hero_title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    line-height: 1.3;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.95),
        0 0 40px rgba(255, 255, 255, 0.8),
        0 0 60px rgba(255, 255, 255, 0.6),
        2px 2px 4px rgba(255, 255, 255, 1),
        -2px -2px 4px rgba(255, 255, 255, 1),
        2px -2px 4px rgba(255, 255, 255, 1),
        -2px 2px 4px rgba(255, 255, 255, 1);
}

.base-hero_lead {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.9;
    margin-bottom: 32px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    text-shadow:
        0 0 15px rgba(255, 255, 255, 0.95),
        0 0 30px rgba(255, 255, 255, 0.8),
        1px 1px 3px rgba(255, 255, 255, 1),
        -1px -1px 3px rgba(255, 255, 255, 1),
        1px -1px 3px rgba(255, 255, 255, 1),
        -1px 1px 3px rgba(255, 255, 255, 1);
    font-weight: 500;
}

.base-hero_cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.base-hero_cta .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.base-hero_cta .btn-primary {
    background: var(--docs-nav-active);
    color: #fff;
}

.base-hero_cta .btn-primary:hover {
    background: #5a3bc7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 71, 217, 0.3);
}

.base-hero_cta .btn-secondary {
    background: #fff;
    color: var(--docs-nav-text);
    border: 1px solid #d1d5db;
}

.base-hero_cta .btn-secondary:hover {
    border-color: var(--docs-nav-active);
    color: var(--docs-nav-active);
}

/* ----------------------------------------
   2本柱セクション
   ---------------------------------------- */
.base-pillars {
    margin-bottom: 48px;
}

.base-pillars_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.base-pillar-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 32px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.base-pillar-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.base-pillar-card_icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
}

.base-pillar-card_title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.base-pillar-card_subtitle {
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 16px;
}

.base-pillar-card_desc {
    font-size: 0.95rem;
    color: #495057;
    line-height: 1.7;
    margin-bottom: 20px;
}

.base-pillar-card_link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--docs-nav-active);
    text-decoration: none;
    transition: color 0.2s ease;
}

.base-pillar-card_link:hover {
    color: #5a3bc7;
}

/* ----------------------------------------
   部門パネルセクション
   ---------------------------------------- */
.base-departments {
    margin-bottom: 48px;
}

.base-departments_title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 24px;
}

.base-departments_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.base-dept-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.base-dept-card:hover {
    border-color: var(--docs-nav-active);
    background: var(--docs-nav-active-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.base-dept-card--empty {
    opacity: 0.5;
    pointer-events: none;
}

.base-dept-card_icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.base-dept-card_name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
    text-align: center;
}

.base-dept-card_count {
    font-size: 0.8rem;
    color: #6c757d;
}

/* ----------------------------------------
   最新記事セクション
   ---------------------------------------- */
.base-latest {
    margin-bottom: 48px;
}

.base-latest_title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 24px;
}

.base-latest_list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.base-latest_item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.base-latest_item:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
    transform: translateX(4px);
}

.base-latest_label {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.base-latest_label--news {
    background: #fff3cd;
    color: #856404;
}

.base-latest_label--action {
    background: #d4edda;
    color: #155724;
}

.base-latest_label--series {
    background: #cce5ff;
    color: #004085;
}

.base-latest_item-title {
    flex: 1;
    font-weight: 500;
    color: #1a1a2e;
    line-height: 1.5;
}

.base-latest_date {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.base-latest_more {
    display: inline-block;
    margin-top: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--docs-nav-active);
    text-decoration: none;
    transition: color 0.2s ease;
}

.base-latest_more:hover {
    color: #5a3bc7;
}

.base-latest_empty {
    padding: 40px;
    text-align: center;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 10px;
}

/* ----------------------------------------
   フッターCTA
   ---------------------------------------- */
.base-cta {
    text-align: center;
    padding: 56px 32px;
    background: url('../images/page-footer_base.png') center 15% / cover no-repeat;
    color: #fff;
    border-radius: 16px;
    margin-bottom: 40px;
    position: relative;
}

.base-cta_title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1a1a2e;
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.95),
        0 0 40px rgba(255, 255, 255, 0.8),
        0 0 60px rgba(255, 255, 255, 0.6),
        2px 2px 4px rgba(255, 255, 255, 1),
        -2px -2px 4px rgba(255, 255, 255, 1),
        2px -2px 4px rgba(255, 255, 255, 1),
        -2px 2px 4px rgba(255, 255, 255, 1);
}

.base-cta .base-cta_desc {
    color: #333 !important;
    font-size: 1rem;
    margin-bottom: 28px;
    font-weight: 500;
    text-shadow:
        0 0 15px rgba(255, 255, 255, 0.95),
        0 0 30px rgba(255, 255, 255, 0.8),
        1px 1px 3px rgba(255, 255, 255, 1),
        -1px -1px 3px rgba(255, 255, 255, 1),
        1px -1px 3px rgba(255, 255, 255, 1),
        -1px 1px 3px rgba(255, 255, 255, 1);
    line-height: 1.7;
}

.base-cta_buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.base-cta_buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.base-cta_buttons .btn-primary {
    background: var(--docs-nav-active);
    color: #fff;
}

.base-cta_buttons .btn-primary:hover {
    background: #5a3bc7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 71, 217, 0.4);
}

.base-cta_buttons .btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a2e;
    border: 1px solid #d1d5db;
}

.base-cta_buttons .btn-secondary:hover {
    background: #fff;
    border-color: var(--docs-nav-active);
    color: var(--docs-nav-active);
}

/* ----------------------------------------
   BASEトップページ レスポンシブ
   ---------------------------------------- */
@media screen and (max-width: 1024px) {
    .base-departments_grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .base-hero {
        padding: 40px 20px;
    }

    .base-hero_title {
        font-size: 1.75rem;
    }

    .base-hero_lead {
        font-size: 1rem;
    }

    .base-pillars_grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .base-pillar-card {
        padding: 24px;
    }

    .base-departments_grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .base-dept-card {
        padding: 16px 12px;
    }

    .base-dept-card_icon {
        font-size: 1.5rem;
    }

    .base-dept-card_name {
        font-size: 0.85rem;
    }

    .base-latest_item {
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .base-latest_label {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .base-latest_item-title {
        flex: 1 1 100%;
        order: 3;
        margin-top: 8px;
        font-size: 0.95rem;
    }

    .base-latest_date {
        order: 2;
        font-size: 0.8rem;
    }

    .base-cta {
        padding: 40px 20px;
    }

    .base-cta_title {
        font-size: 1.35rem;
    }
}

@media screen and (max-width: 480px) {
    .base-departments_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .base-hero_cta {
        flex-direction: column;
        gap: 12px;
    }

    .base-hero_cta .btn {
        width: 100%;
    }

    .base-cta_buttons {
        flex-direction: column;
        gap: 12px;
    }

    .base-cta_buttons .btn {
        width: 100%;
    }
}
