/*メインコンテンツ共通部分　-----------------------------*/
.main-contents {
    margin-left: 5%;
    margin-right: 5%;
}

.main-contents h2 {
    font-size: 2.5vw;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 15px;
    text-decoration:underline;
    text-decoration-color: rgba(4, 0, 255, 0.664);
}

/* 「業務内容」の部分 */
.main-contents {
    position: relative;
}



.main-contents .group01 article{
    float: left;
    margin: 1vw;
    width: 45%; 
    height: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.main-contents .group01 article figure {
    float: right;
    width: 50%;
}

.main-contents .group01 article div {
    float: left;
    height: 15vw;
    width: 45%;
    margin-bottom: 0;
}

.main-contents .group01 article div h3 {
    font-size: 1.5vw;
    font-weight: bold;
    margin: 0;
    padding: 1rem;
    background-color: rgb(0, 82, 205);
    color: white;
}

.main-contents .group01 article div p {
    font-size: 1.1vw;
    margin-top: 1rem;
    margin-left: 1rem;
    text-align: justify;

}

.main-contents .group01::after {
    content: "";
    display: block;
    clear: both;
}

/* 「働く人を知る」の部分 */
.main-contents .group02::after {
    content: "";
    display: block;
    clear: both;
}


.main-contents .group02 article {
    float: left;
    margin: 1vw;
    width: 45%; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.main-contents .group02 article figure {
    float:left;
    width: 35%;
}

.main-contents .group02 article div {
    float: left;
    width: 55%;
    margin: 2%;
}

.main-contents .group02 article div h3 {
    font-size: 1.5vw;
    font-weight: bold;
}

.main-contents .group02 article div p {
    font-size: 1.2vw;
}

.main-contents .group02 article div p span {
    font-weight: bold;
}


/* 「募集要項」の部分 */
.group03 dl {
    float: right;
    width: 70%;
    margin-right: 15%;
    font-size: 1.5vw;
    display: flex;
    flex-wrap: wrap;
}

.group03 dt {
    font-weight: bold;
    width: 30%;
    padding-left: 2vw;
    margin-top: 5vh;
    padding-bottom: 1vh;
    margin-bottom: 2vh;
    border-bottom: 1px solid black;
}

.group03 dd {
    width: 70%;
    margin-top: 5vh;
    padding-bottom: 1vh;
    margin-bottom: 2vh;
    border-bottom: 1px solid black;
    font-size: 1.2vw;
}

.main-contents .group03::after {
    content: "";
    display: block;
    clear: both;
}


/* 「エントリーはこちらから」の部分 */
.main-contents .group04 {
    width: 60%;
    margin: 2rem;
    padding: 1rem;
    margin-right: auto;
    margin-left: auto;
    border-width: 1px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);

}

.main-contents .group04 h2 {
    margin: 1rem;
    margin-bottom: 0;
    font-size: 1.5vw;
    font-weight: bold;
    text-decoration-line: none;
}

.main-contents .group04 p{
    font-size: 1vw;
    display: inline-block;  
    width: 80%;
    margin-top: 1rem;
}

.main-contents .group04 figure{
    display: inline-block;  
    width: 19%;
    cursor: pointer;
}
/* 選考スケジュール全体のレイアウト */
selection-schedule {
    margin-top: 80px;
    margin-bottom: 80px;
    clear: both;
}

.schedule-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    width: 70%; 
    margin-left: auto;
    margin-right: 15%; 
    padding-top: 40px;
    position: relative; /* 矢印の基準 */
}

/* --- 【重なり順 1番上】 応募などの箱 --- */
.step-box {
    position: relative;
    z-index: 10; /* 最前面 */
    width: 80%;
    aspect-ratio: 1 / 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    font-size: 1.4vw;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    background-color: white;
}

.schedule-item.active .step-box {
    background-color: #001f56;
    color: white;
}

.schedule-item:not(.active) .step-box {
    border: 2px solid #000;
}

/* --- 【重なり順 2番目】 矢印 --- */
.arrow-line {
    position: absolute;
    top: 105px; 
    left: 0;
    /* 82%から「81%」に少し短くして調整 */
    width: 81%; 
    height: 18px;
    background-color: #0066ff;
    z-index: 5; /* 箱(10)と柱(1)の間 */
}

.arrow-line::after {
    content: "";
    position: absolute;
    /* 三角形の先端が箱にめり込みすぎないよう、右側の位置を調整 */
    right: -22px; 
    top: -11px;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 28px solid #0066ff;
}

/* --- 【重なり順 3番目】 エントリーシート提出下の枠（柱） --- */
.schedule-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.schedule-item::before {
    content: "";
    position: absolute;
    top: -20px;
    width: 90%;
    height: calc(100% + 40px);
    background-color: #f2f2f2;
    z-index: 1; /* 最背面 */
    border-radius: 6px;
}

/* 文字設定（数字を縦にする） */
.step-desc {
    position: relative;
    z-index: 10;
    margin-top: 25px;
    font-size: 1.1vw;
    writing-mode: vertical-rl;
    text-orientation: upright;
    color: #333;
    letter-spacing: 0.1em;
    padding-bottom: 20px;
    white-space: nowrap;
}

/* キャリアパス全体のレイアウト */
.career-path {
    margin-top: 100px;
    margin-bottom: 100px;
    clear: both;
}

.career-container {
    display: flex;
    align-items: flex-end; /* 下揃えで階段状にする */
    width: 70%;
    margin-left: auto;
    margin-right: 15%;
    padding-top: 50px;
    height: 300px; /* 階段の高さを確保 */
}

/* 各ステップの基本設定 */
.career-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 年数テキストのスタイル */
.career-step .year {
    font-size: 1.5vw;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.career-step .year span {
    font-size: 3vw;
    color: #00e5ff; /* 水色の数字 */
    margin-right: 5px;
}

/* 役職ボックスの共通スタイル */
.rank-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2vw;
    padding: 15px 0;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

/* 階段の高さと色の個別設定 */
.step1 .rank-box { height: 60px;  background-color: #4dd0e1; }
.step2 .rank-box { height: 110px; background-color: #26c6da; }
.step3 .rank-box { height: 160px; background-color: #00bcd4; }
.step4 .rank-box { height: 210px; background-color: #00acc1; }

/* 役職ラベル（少し透けた水色のバー） */
.rank-box::before {
    content: "";
    position: absolute;
    width: 80%;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: 0;
}

/* 文字をバーより前面に出す */
.rank-box {
    position: relative;
    z-index: 1;
}
/* レスポンシブ対応（スマホ表示） */
@media screen and (max-width: 768px) {
    /*メインコンテンツ共通部分*/
    .main-contents h2 {
        font-size: 6vw;
    }

    /* 「業務内容」の部分 */
    .main-contents .group01 article {
        width: 100%;
        padding-bottom: 4vw;
    }

    .main-contents .group01 article div h3 {
        font-size: 3vw;
        padding: 2vw;
    }

    .main-contents .group01 article div p {
        font-size: 1.9vw;
        margin: 3vw 2vw;
    }

    /* 「働く人を知る」の部分 */
    .main-contents .group02 {
        margin-bottom: 13vw;
    }

    .main-contents .group02 article {
        width: 100%;
        float: none;
        margin: 3vw 0;
        display: flex;
        flex-direction: row;
    }

    .main-contents .group02 article div h3 {
        font-size: 5vw;
    }

    .main-contents .group02 article div p {
        font-size: 3vw;
    }

    /* 「募集要項」の部分 */
    .group03 dl {
        width: 100%;
        margin: 0 auto;
        float: none;
    }

    .group03 dt {
        width: 40%;
        font-size: 3.5vw;
    }

    .group03 dd {
        width: 60%;
        font-size: 3vw;
    }

    /* 「エントリーはこちらから」の部分 */
    .main-contents .group04 {
        position: relative;
        width: 100%;
    }

    .main-contents .group04 h2 {
        font-size: 3.5vw;
    }

    .main-contents .group04 figure {
        position: absolute;
        top: 4vw;
        right: 4vw;
        width: 30vw;
        margin: 0;
    }

    .main-contents .group04 p {
        width: 100%;
        display: block;
        font-size: 2.7vw;
    }
    /* 選考スケジュール：スマホ用レイアウト */
    .schedule-container {
        width: 95%;
        margin: 0 auto;
        flex-direction: column;
        align-items: center;
        padding-top: 20px;
    }

    /* PC用の長い棒は消す */
    .arrow-line {
        display: none;
    }

    .schedule-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        /* 工程ごとの間隔 */
        margin-bottom: 60px; 
    }

    /* グレーの背景（柱）：メインの箱より少し大きく設定 */
    .schedule-item::before {
        content: "";
        position: absolute;
        top: -10px;
        /* メインの箱より左右に広げるため幅を大きく */
        width: 95%; 
        height: calc(100% + 20px);
        background-color: #f2f2f2;
        border-radius: 10px;
        z-index: 1;
    }

    /* 最後の工程（入社）だけ下の余白を消す */
    .schedule-item:last-child {
        margin-bottom: 20px;
    }

    /* 工程間の「▼」：最後（入社）の後には表示しない */
    .schedule-item:not(:last-child)::after {
        content: "";
        position: absolute;
        bottom: -45px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 15px solid transparent;
        border-right: 15px solid transparent;
        border-top: 20px solid #0066ff;
        z-index: 10;
    }

    /* メインの箱（応募・面接など） */
    .step-box {
        writing-mode: horizontal-tb; /* 確実に横書き */
        position: relative;
        z-index: 10;

        /* 幅の指定：全ての箱を同じ幅（画面の60%など）で統一 */
        width: 65vw; 
        /* 高さをキャリアパスの「新入社員」等に合わせる */
        height: 60px; 

        /* 文字サイズをキャリアパスに合わせる */
        font-size: 4vw; 
        font-weight: bold;

        /* 中央配置の設定 */
        display: flex;
        align-items: center;
        justify-content: center;

        /* 装飾と余白 */
        margin-top: 15px;
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    }

    /* 説明テキスト */
    .step-desc {
        writing-mode: horizontal-tb;
        position: relative;
        z-index: 10;
        margin-top: 10px;
        padding-bottom: 15px;
        font-size: 1.5rem;
    }

    /* キャリアプラン */
    .career-container {
        width: 100%;
        margin-right: 0;
        height: auto;
        flex-direction: column;
        align-items: stretch;
    }
    .career-step { margin-bottom: 20px; }
    .career-step .year span { font-size: 8vw; }
    .career-step .year { font-size: 4vw; }
    .rank-box { height: 60px !important; font-size: 4vw; }
    
    /* ① 入社ボックス自体の下の矢印（疑似要素）を消す */
    .schedule-item:last-of-type::after {
        display: none !important;
    }

    /* ② HTMLの最後にある独立した青い線（arrow-line）をスマホで消す */
    .schedule-container > .arrow-line:last-child {
        display: none !important;
    }
}