/* ==================================== */
/* 03. ページヘッダー (Page Header)     */
/* ==================================== */
/* HTMLに .page-title-overlay が追加されているため、それに合わせて調整 */
.page-header-image {
    position: relative;
    width: 96%;
    margin: auto;
    text-align: center;
    color: var(--base-color);
    overflow: hidden;
}

.header-image-wrapper {
    position: relative;
}

.header-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.7);
    /* 画像を少し暗くしてテキストを見やすくする */
    border-radius: 50px;
    max-height: 10rem;
}

/* ページタイトルをオーバーレイ */
.page-title-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    margin: 0;
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN W4", sans-serif;
    white-space: nowrap;
}

.page-title-overlay h1 {
    font-size: 3rem;
    font-weight: bold;
    margin: 0;
}


section {
    margin-right: 5%;
    margin-left: 5%;
}



/* ==================================== */
/* 06. 導入フローのスタイル (Flow Steps Refined) */
/* ==================================== */
/* 親コンテナのスタイル */
.flow-steps-refined {
    display: flex;
    flex-direction: column;
    /* 縦方向に並べる */
    align-items: center;
    /* 中央揃え */
    gap: 0;
    /* アイテム間の余白 */
    max-width: 900px;
    /* 全体の最大幅 */
    margin: 2rem auto;
    /* 上下に余白を追加して中央に配置 */
}

/* 各ステップのボックスのスタイル */
.flow-item {
    background-color: var(--base-color);
    border: 2px solid var(--accent-color);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    /* Flexboxでタイトルと説明を横並びにする */
    display: flex;
    align-items: center;
}

/* 矢印のスタイル */
.flow-arrow {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid var(--main-color);
    margin: -1rem;
    /* マージンでボックスに近づける */
    z-index: 1;
}

/* 左側の「タイトル」部分 */
.step-header {
    display: flex;
    align-items: center;
    /* 固定幅を持たせることで、右側の要素との位置を揃える */
    flex-basis: 15rem;
    /* タイトル部分の幅を固定 */
    flex-shrink: 0;
    position: relative;
    padding-left: 60px;
    /* 番号分のスペースを確保 */
    /* タイトルと説明の間の縦線 */
    border-right: 2px solid var(--accent-color);
}

/* 番号の擬似要素 */
.flow-item:first-of-type .flow-step-name::before {
    content: '01';
}

.flow-item:nth-of-type(2) .flow-step-name::before {
    content: '02';
}

.flow-item:nth-of-type(3) .flow-step-name::before {
    content: '03';
}

.flow-item:nth-of-type(4) .flow-step-name::before {
    content: '04';
}

.flow-item:nth-of-type(5) .flow-step-name::before {
    content: '05';
}

/* 5番目以降も追加可能 */

.flow-step-name::before {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-color);
    font-family: Arial, sans-serif;
}

/* 項目名（お問い合わせ・ご相談）のスタイル */
.flow-step-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
    margin: 0;
}

/* 右側の「期間」と「概要」部分 */
.step-details {
    display: grid;
    /* Gridで2列（期間と概要）を定義して、縦横を揃える */
    grid-template-columns: 150px 1fr;
    /* 期間の列を固定、概要は可変 */
    align-items: center;
    /* 垂直方向の中央揃え */
    flex-grow: 1;
    /* 残りのスペースを埋める */
    padding-left: 30px;
    /* 左側のパディング */
}

/* dd（期間と概要）のスタイル */
.flow-duration,
.flow-summary {
    font-size: 1rem;
    color: var(--dark-gray);
    margin: 0;
}

.flow-duration {
    text-align: center;
    /* 期間を中央揃え */
}

/* レスポンシブデザイン（スマートフォン向け） */
@media (max-width: 768px) {
    .flow-steps-refined {
        gap: 15px;
        margin: 30px auto;
        padding: 0 15px;
    }

    .flow-item {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px 25px;
        border-radius: 20px;
    }


    .step-header {
        flex-basis: auto;
        width: 100%;
        margin-bottom: 15px;
        border-right: none;
        /* 縦線を削除 */
        padding-right: 0;
    }

    .flow-step-name {
        font-size: 1.1rem;
        padding-left: 0.1rem;
    }

    .flow-step-name::before {
        font-size: 2rem;
        left: 10px;
    }

    .step-details {
        display: flex;
        /* Flexboxで縦並びに */
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0;
        width: 100%;
    }

    .flow-duration {
        text-align: left;
        /* 左寄せ */
        margin-bottom: 5px;
    }

    .flow-arrow {
        border-left-width: 12px;
        border-right-width: 12px;
        border-top-width: 12px;
    }

    .header-image-wrapper {
        height: 3rem;
        margin: 0;
        padding: 0;
    }
}