@charset "utf-8";

/* ==========================================================================
   page-divisions-anchor.css
   - 部門一覧ページ専用のアンカーナビゲーション
   - ページ読み込み時に自動で100%確実に起動する、時間差（ディレイ）フェードインアニメーション
   ========================================================================== */

.p-division-anchor {
    margin-bottom: 60px;
    padding: 0 4%;
}

.p-division-anchor-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.p-division-anchor-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* PC: 4列 */
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 
   【確実なアニメーション実行設計】
   HTMLのクラスの有無に依存せず、リストアイテム「li」そのものに直接適用。
   初期状態を不透明度0、下に配置。
   読み込みと同時に、JSの有無にかかわらず100%自動でアニメーションを実行します。
*/
.p-division-anchor-list > li {
    opacity: 0;
    transform: translateY(20px);
    animation: pAnchorFadeInUp 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

/* 
   グリッドアイテム（li）の並び順に応じて時間差（ディレイ）を発生させ、
   左上から右下へ流れるようにテンポよく浮き上がらせる設定（最大12項目まで対応）
*/
.p-division-anchor-list > li:nth-child(1) { animation-delay: 0.1s; }
.p-division-anchor-list > li:nth-child(2) { animation-delay: 0.15s; }
.p-division-anchor-list > li:nth-child(3) { animation-delay: 0.2s; }
.p-division-anchor-list > li:nth-child(4) { animation-delay: 0.25s; }
.p-division-anchor-list > li:nth-child(5) { animation-delay: 0.3s; }
.p-division-anchor-list > li:nth-child(6) { animation-delay: 0.35s; }
.p-division-anchor-list > li:nth-child(7) { animation-delay: 0.4s; }
.p-division-anchor-list > li:nth-child(8) { animation-delay: 0.45s; }
.p-division-anchor-list > li:nth-child(9) { animation-delay: 0.5s; }
.p-division-anchor-list > li:nth-child(10) { animation-delay: 0.55s; }
.p-division-anchor-list > li:nth-child(11) { animation-delay: 0.6s; }
.p-division-anchor-list > li:nth-child(12) { animation-delay: 0.65s; }

.p-division-anchor-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 10px 15px;
    background: #fdfdfd;
    border: 1px solid #0054a4; /* ブランドカラーの枠線 */
    color: #0054a4;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    width: 100%; /* 親のグリッド枠にフィット */
}

/* ホバー時：ブランドカラーで塗りつぶし */
.p-division-anchor-link:hover {
    background: #0054a4;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 84, 164, 0.15);
}

/* -------------------------------------------
   読み込み時用アニメーションキーフレーム
------------------------------------------- */
@keyframes pAnchorFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------------------------
   レスポンシブ
------------------------------------------- */

/* タブレットサイズ：3列 */
@media (max-width: 900px) {
    .p-division-anchor-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* スマホサイズ：2列 */
@media (max-width: 640px) {
    .p-division-anchor {
        margin-bottom: 40px;
    }
    .p-division-anchor-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .p-division-anchor-link {
        font-size: 13px;
        min-height: 48px;
        padding: 8px 5px;
    }
}