/* =========================================
   Flow Section - 選考の流れ
   ========================================= */

.flow {
    background-color: var(--c-bg-pink);
    padding-top: 19.9rem;
    padding-bottom: 16.4rem;
    position: relative;
    overflow: hidden;
}

.flow__inner {
    max-width: var(--w-content);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

/* Background decorative text */
.flow__bg-text {
    font-family: var(--font-decorative);
    font-size: 16.4rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0;
    color: var(--c-bg-pink-text);
    position: absolute;
    top: 13rem;
    /* ▼ PC修正: 画面端ではなく中央基準に変更 */
    left: 45%;
    /* 1440px幅のときの「left: 130px」相当の位置に調整 (720px - 590px = 130px) */
    margin-left: -55rem;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* Section title */
.flow__title {
    font-family: var(--font-base);
    font-size: 4.8rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.1em;
    color: var(--c-text-main);
    margin-bottom: 8.1rem;
    position: relative;
    z-index: 1;
}

/* Flow list container */
.flow__list {
    display: flex;
    flex-direction: column;
    
    /* 【PC 三角形下の余白設定】
       三角形の高さ(32px) + 欲しい余白(30px) = 62px
       ここを調整することで、ステップ間の距離が変わります。
    */
    gap: 6.2rem; /* 元: 31px */
    
    position: relative;
    z-index: 1;
}

/* Step item wrapper */
.flow__item {
    position: relative;
}

/* Step card */
.flow__card {
    width: 100%;
    height: 10rem;
    background-color: var(--c-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    padding: 0 4rem;
    gap: 3rem;
}

/* Card top wrapper - only used visually in SP */
.flow__card-top {
    display: contents;
}

/* Step header (STEP + number) */
.flow__header {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-shrink: 0;
    width: 15rem;
}

.flow__step-label {
    font-family: var(--font-base);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 2.9rem;
    letter-spacing: 0.1em;
    color: var(--c-text-white);
}

.flow__step-number {
    font-family: var(--font-base);
    font-size: 4rem;
    font-weight: 700;
    line-height: 2.9rem;
    letter-spacing: 0.1em;
    color: var(--c-text-white);
}

/* Step title */
.flow__card-title {
    font-family: var(--font-base);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 2.9rem;
    letter-spacing: 0.1em;
    color: var(--c-text-white);
    flex-shrink: 0;
    width: 18rem;
}

/* Step description */
.flow__card-desc {
    font-family: var(--font-base);
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 2.1rem;
    letter-spacing: 0.1em;
    color: var(--c-text-white);
    flex: 1;
}

/* Triangle arrow (between steps) */
.flow__item::after {
    content: '';
    position: absolute;
    
    /* 【PC 三角形の位置調整】
       bottom: 下方向の位置。カードの下にぴったりつけるなら、高さ(32px)と同じマイナス値を設定。
    */
    bottom: -3.2rem; /* 元: -31px */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6rem solid transparent;
    border-right: 6rem solid transparent;
    border-top: 3.2rem solid var(--c-primary); /* 三角形の高さ 32px */
    z-index: 2;
}

/* Hide triangle on last item */
.flow__item:last-child::after {
    display: none;
}

/* Note section */
.flow__note {
    font-family: var(--font-base);
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 2.1rem;
    letter-spacing: 0.1em;
    color: var(--c-text-main);
    margin-top: 4.1rem;
    position: relative;
    z-index: 1;
    
    /* PC版 右寄せ設定 */
    text-align: right;
}


/* =========================================
   SP版スタイル（768px以下）
   ========================================= */
@media (max-width: 76.8rem) {
    .flow {
        padding-top: 7.4rem;
        padding-bottom: 3.8rem;
    }

    .flow__inner {
        padding: 0 1.5rem;
    }

    /* Background text - SP */
    .flow__bg-text {
        font-size: 7.7rem;
        top: 2.5rem;
        left: 1rem;
        /* ▼ SP修正: PC用のマージンをリセット */
        margin-left: 0;
    }

    /* Title - SP */
    .flow__title {
        font-size: 2.2rem;
        letter-spacing: 0.1em;
        margin-bottom: 2.6rem;
    }

    /* Flow list - SP */
    .flow__list {
        /* 【SP 三角形下の余白設定】
           三角形の高さ(13px) + 欲しい余白(15px) = 28px
        */
        gap: 2.8rem; /* 元: 15px */
    }

    /* Card - SP */
    .flow__card {
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.9rem 2.5rem 1.5rem;
        gap: 0;
        border-radius: 0.5rem;
    }

    /* Card top section (header + title) - SP */
    .flow__card-top {
        display: flex;
        align-items: baseline;
        gap: 1.5rem;
        width: 100%;
        
        /* 【SP STEPタイトルと下のテキストの間の余白】
           margin-bottom: 数値を小さくすると余白が狭まります
        */
        margin-bottom: 1.2rem; /* 元: 21px -> 狭める */
    }

    /* Header - SP */
    .flow__header {
        width: auto;
        gap: 0.5rem;
    }

    .flow__step-label {
        font-size: 1.3rem;
        line-height: 1;
    }

    .flow__step-number {
        font-size: 2.3rem;
        line-height: 1;
    }

    /* Title - SP */
    .flow__card-title {
        font-size: 1.8rem;
        line-height: 1;
        width: auto;
    }

    /* Description - SP */
    .flow__card-desc {
        font-size: 1.4rem;
        line-height: 1.6;
        letter-spacing: 0.1em;
        width: 100%;
    }

    /* Triangle - SP */
    .flow__item::after {
        /* 【SP 三角形の位置調整】
           bottom: 数値を調整して位置を上下させます（マイナス値が大きいほど下へ）
           カードにぴったりつけるため -13px (border-topと同じ高さ) に設定しています。
           もっと上に食い込ませたい場合は -10px などにしてください。
        */
        bottom: -1.3rem; /* 元: -15px -> 少し上にずらしてカードにくっつける */
        
        border-left: 2rem solid transparent;
        border-right: 2rem solid transparent;
        border-top: 1.3rem solid var(--c-primary); /* 三角形の高さ 13px */
    }

    /* Note - SP */
    .flow__note {
        font-size: 1.2rem;
        line-height: 1.6;
        margin-top: 1.5rem;
        
        /* SP版 右寄せ設定 */
        text-align: right;
    }
}

@media (max-width: 321px) {
    .flow__note {
        font-size: 1.0rem;
    }
}

/* =========================================
   Tablet/Small PC (819px - 1024px) Adjustments
   ========================================= */
@media screen and (min-width: 819px) and (max-width: 1024px) {

.flow {
    padding-left: 1rem;
    padding-right: 1rem;
}

    .flow__inner {
        padding-left: 2vw;
        padding-right: 2vw;
		padding-bottom: 2vw;
    }
	
    .flow__title {
        font-size: 4.8rem;
        margin-bottom: 8.1rem;
    }

    /* 背景「Flow」を少し上にずらし（topの数値を小さく）、PC表示用のサイズで配置 */
.flow__bg-text {
        font-size: 16.4rem;
        top: 7.5rem;            /* 13remから8remに変更して上に移動 */
        left: 50%;
        margin-left: -40rem;
    }
}