/* how-to-use.css — Figmaデザインに基づき再構築 */

/* ----------------------------------------
   Banner
   ---------------------------------------- */
.how-to-use-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    height: 40vh;
}

/* common.css の .banner-text（中央寄せ）を上書き */
.how-to-use-banner .banner-text {
    position: absolute;
    left: 9%;
    top: 42%;
    bottom: auto;
    transform: none;
    text-align: left;
    color: #fff;
}

.how-to-use-banner .banner-text h2 {
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #fff;
}

.how-to-use-banner .banner-text p {
    font-size: 2.5rem;
    font-family: "Zen Kaku Gothic New", sans-serif;
    font-weight: 700;
    color: #fff;
}

/* ----------------------------------------
   Section Title エリア
   ---------------------------------------- */
.htu-title-wrap {
    padding: 60px 20px 20px;
    text-align: center;
}

/* ----------------------------------------
   HOW TO USE: 5 セクション共通
   ---------------------------------------- */
.htu-section {
    position: relative;
}

/* 背景カラーブロック（350px、下寄せ） */
.htu-section__bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 350px;
    z-index: 0;
}

.htu-section--green  .htu-section__bg { background-color: #EDF9E7; }
.htu-section--yellow .htu-section__bg { background-color: #FFFBE5; }

/* 内側コンテナ（max-width中央寄せ、下揃え flex） */
.htu-section__inner {
    position: relative;
    z-index: 1;
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 60px;
    display: flex;
    align-items: flex-end; /* 下揃え → 写真(400px)がブロック(350px)より50px上に出る */
    gap: 80px;
    height: 400px;
    box-sizing: border-box;
}

/* ----------------------------------------
   メディアグループ（アイコン + 写真）
   ---------------------------------------- */
.htu-section__media {
    display: flex;
    align-items: flex-start;
    gap: 50px;
    flex-shrink: 0;
}

/* プロパティアイコン */
.htu-section__icon {
    width: 120px;
    flex-shrink: 0;
    padding-top: 15px;
}

.htu-section__icon img {
    width: 100%;
    height: auto;
    display: block;
}

/* 写真フレーム（overflow:hidden で上はみ出し効果を実現） */
.htu-section__photo-frame {
    width: 280px;
    height: 400px; /* ブロック(350px)より50px大きい → 上に飛び出す */
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

/* 偶数セクション（転がす・投げる）は写真を横広に */
.htu-section--even .htu-section__photo-frame {
    width: 400px;
}

/* PC写真 */
.htu-section__photo--pc {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; /* 上部（手の部分）を優先表示 */
    display: block;
}

.htu-section--even .htu-section__photo--pc {
    object-position: center top;
}

/* 投げる：横長写真なので contain で全体表示 */
#sec-throw .htu-section__photo-frame {
    width: 520px;
}

#sec-throw .htu-section__photo--pc {
    object-fit: contain;
    object-position: center top;
}

/* SP写真はPCで非表示 */
.htu-section__photo--sp {
    display: none;
}

/* ----------------------------------------
   テキストコンテンツ
   ---------------------------------------- */
.htu-section__content {
    flex: 1;
    height: 350px; /* 背景ブロックと同じ高さ */
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    min-width: 0;
}

.htu-section__point-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* POINT バッジ */
.htu-point {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 25px;
    background-color: #4BC314;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
}

.htu-section__heading {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #323232;
    letter-spacing: 0.05em;
    line-height: 1.4;
    margin: 0;
}

.htu-section__body {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    color: #323232;
    letter-spacing: 0.05em;
    line-height: 1.85;
    margin: 0;
}

/* ----------------------------------------
   Scene セクション（下部：他の部位）
   ---------------------------------------- */
.scene-section {
    text-align: center;
    padding: 80px 20px 60px;
    background-color: #fff;
    margin-top: 0;
}

.scene-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4BC314;
    margin-bottom: 40px;
}

.scene-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.scene-icon {
    width: 150px;
    height: 150px;
    background-color: #EDF9E7;
    color: #4BC314;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}

.scene-image {
    width: 300px;
    height: auto;
    margin-bottom: 40px;
}

/* visually-hidden */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ----------------------------------------
   SP (〜768px)  ※ PC スタイルは一切変更しない
   ---------------------------------------- */
@media (max-width: 768px) {

    /* Banner */
    .how-to-use-banner { height: 30vh; }
    .how-to-use-banner .banner-text { top: 20%; }
    .how-to-use-banner .banner-text h2 { font-size: 0.85rem; }
    .how-to-use-banner .banner-text p  { font-size: 1.8rem; }

    /* セクション全体に背景色（メディア＋テキスト両方に適用） */
    .htu-section--green  { background-color: #EDF9E7; }
    .htu-section--yellow { background-color: #FFFBE5; }
    .htu-section__bg { display: none; }

    /* Inner：縦積み */
    .htu-section__inner {
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 0;
        gap: 0;
    }

    /* 偶数セクション：メディアをコンテンツより前に */
    .htu-section--even .htu-section__media { order: -1; }

    /* メディアグループ：横並び・高さ固定 */
    .htu-section__media {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
        height: 220px;
        overflow: hidden;
        gap: 0;
    }

    /* 偶数セクション（DOM: photo→icon）を row-reverse でアイコン左・写真右に */
    .htu-section--even .htu-section__media {
        order: -1;
        flex-direction: row-reverse;
    }

    /* アイコン：左列 38%、高さ220px に直接固定 */
    .htu-section__icon {
        display: block;
        width: 38%;
        flex-shrink: 0;
        height: 220px;
        padding: 0;
        overflow: hidden;
    }

    .htu-section__icon img {
        width: 100%;
        height: 220px;
        display: block;
        object-fit: contain;
        object-position: center center;
    }

    /* 写真フレーム：右列（残り幅）、高さ220px に直接固定 */
    .htu-section__photo-frame,
    .htu-section--even .htu-section__photo-frame {
        flex: 1;
        width: auto;
        height: 220px;
        overflow: hidden;
    }

    /* PC高解像度写真をSPでも表示
       position: absolute; inset: 0 は base CSS から引き継いで写真フレームを満たす */
    .htu-section__photo--pc {
        display: block;
    }

    /* SP合成写真は不使用 */
    .htu-section__photo--sp { display: none; }

    /* テキストブロック：セクション背景色を引き継ぐ */
    .htu-section__content {
        height: auto;
        padding: 24px 20px 40px;
        gap: 16px;
        background-color: transparent;
    }

    /* 投げる：PC用 520px をSPでリセット */
    #sec-throw .htu-section__photo-frame {
        flex: 1;
        width: auto;
    }

    /* タイポグラフィ */
    .htu-section__heading { font-size: 1.2rem; }
    .htu-section__body    { font-size: 0.875rem; line-height: 1.75; }

    /* Scene セクション */
    .scene-section  { padding: 50px 16px 40px; }
    .scene-title    { font-size: 1.1rem; margin-bottom: 24px; }
    .scene-icons    { gap: 20px; margin-bottom: 32px; }
    .scene-icon     { width: 100px; height: 100px; font-size: 0.9rem; }
    .scene-image    { width: 85%; }
}
