/* tabs
-------------------------- */
.p-tabs {}

/* ラッパー */
.p-tabs__nav-wrapper {
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Nav：横断する線を ::before で描画 */
.p-tabs__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    position: relative;
    width: fit-content;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 全体を横断する横線 */
.p-tabs__nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 60px);
    height: 1.5px;
    background-color: var(--c-border-gray, #d0dce5);
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* 各タブアイテム（非アクティブ：112px 白丸） */
.p-tabs__nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* テキストを上下中央に */
    align-items: center;
    gap: 20px;
    /* アイコンとテキストの間 */
    width: 112px;
    height: 112px;
    border-radius: 56px;
    background-color: var(--c-white);
    box-shadow: 0 0 40px rgba(172, 183, 190, 0.1);
    cursor: pointer;
    position: relative;
    z-index: 1;
    /* 文字スタイル */
    font-family: var(--ff-body);
    font-size: 16px;
    font-weight: 400;
    color: #878a92;
    letter-spacing: 0.02em;
    line-height: 1.2;
    border: none;
    text-align: center;
    transition: box-shadow 0.3s ease;
}

/* ホバー */
.p-tabs__nav-item:hover {
    box-shadow: 0 0 20px rgba(172, 183, 190, 0.3);
}

/* アイコン画像 */
.p-tabs__nav-icon {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0;
    flex-shrink: 0;

    img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }
}

/* テキストラベル */
.p-tabs__nav-label {
    display: block;
}

/* 非アクティブタブの下向き▼アイコン */
.p-tabs__nav-item:not(.is-active)::after {
    content: "";
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    /* 下向き三角形（14px × 10px） */
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 7px 0 7px;
    border-color: #0A93E9 transparent transparent transparent;
    transition: bottom 0.3s ease;
}

.p-tabs__nav-item:hover:not(.is-active)::after {
    bottom: 11px;
}

/* アクティブタブ（124px 青丸） */
.p-tabs__nav-item.is-active {
    width: 124px;
    height: 124px;
    border-radius: 62px;
    background-color: #0A93E9;
    color: var(--c-white);
    box-shadow: 0 0 40px rgba(0, 122, 204, 0.2);
    z-index: 2;
    justify-content: flex-start;
    gap: 14px;
    padding: 16px 7px;
    padding-top: 24px;
    transform: translateY(-20px);
}

/* アクティブタブのアイコン */
.p-tabs__nav-item.is-active .p-tabs__nav-icon {
    display: block;
    /* 白くフィルタリング */
    /* filter: brightness(0) invert(1); */
    /* アイコンエリア上部方向へ */
    margin-bottom: 0;
}

/* アクティブタブのテキスト */
.p-tabs__nav-item.is-active .p-tabs__nav-label {
    color: var(--c-white);
}

/* アクティブタブの下向き吹き出し三角形 */
.p-tabs__nav-item.is-active::after {
    content: "";
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 10px 0 10px;
    border-color: #0A93E9 transparent transparent transparent;
}


/* コンテンツ領域 */
.p-tabs__contents {
    border-radius: 10px;
}

.p-tabs__content {
    display: none;
}

.p-tabs__content.is-active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* SP レスポンシブ */
@media screen and (max-width: 768px) {
    .p-tabs__nav-wrapper {
        overflow: auto;
        margin-bottom: 15px;
        justify-content: flex-start;
        overflow-x: auto;

        /* スクロールバー非表示 */
        &::-webkit-scrollbar {
            display: none;
        }

        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .p-tabs__nav {
        gap: 16px;
        margin: 0 auto;
        padding: 0 20px;
        padding-top: 40px;
        padding-bottom: 10px;
        min-width: fit-content;
    }

    .p-tabs__nav::before {
        top: 61%;
        left: 50%;
        width: calc(100% - 60px);
    }

    /* SP時は縮小 */
    .p-tabs__nav-item {
        font-size: 13px;
        width: 90px;
        height: 90px;
        border-radius: 45px;
        gap: 12px;
    }

    .p-tabs__nav-item:not(.is-active)::after {
        border-width: 8px 5.5px 0 5.5px;
        bottom: 9px;
    }

    .p-tabs__nav-icon img {
        width: 30px;
        height: 30px;
    }

    .p-tabs__nav-item.is-active {
        width: 100px;
        height: 100px;
        border-radius: 50px;
        padding: 12px 7px;
        gap: 0;
        justify-content: center;
        transform: translateY(-15px);
    }

    .p-tabs__nav-item.is-active::after {
        bottom: -9px;
        border-width: 10px 8px 0 8px;
    }

    .p-tabs__contents {
        padding: 0;
    }
}