/**
 * フォームページ（request / contact）共通スタイル.
 *
 * page-request.php / page-contact.php、および single-resources.php（サンクスページ下部のフォームセクション）向け。
 * クラス命名は form-page-* に統一。要素タグ依存を避け、見出し等は専用クラスを指定する。
 *
 * レイアウト仕様:
 * - PC（881px 以上）: 2カラム。左列にタイトル・資料・おすすめを縦に並べ、右列にフォームを配置する。
 * - SP（880px 以下）: 1カラム。タイトル → 資料 → フォーム → おすすめ の順に縦積みする。
 *   資料（.form-page__resources）は SP では非表示にする。
 * - HTML の記述順は SP の縦積み順に合わせ、PC は grid-template-areas で2カラムに配置する。
 *
 * 依存:
 * - style.css（リセット・1rem = 10px）
 * - general.css（送信ボタン .blu_button_line）
 * - form-hubspot.css（HubSpot フォームの基本スタイル）
 * - single-resources.css・lucide-icon.css（request のおすすめ欄に出す追加情報ブロック .resources-add-info-block）
 *
 * 制限事項:
 * - HubSpot フォームは外部スクリプトで描画されるため、フォーム内部は HubSpot 側のクラス（.hbspt-form 等）で指定する。
 * - contact 固有のフォーム調整は .form-page--contact 配下に限定する。
 * - resources サンクスページ固有の見た目は .form-page--resources-thanks 配下に限定する（ファイル末尾）。
 *   修飾クラス付きのセレクタは基本スタイルより詳細度が高いため、メディアクエリ内の基本スタイルより常に優先される。
 *   修飾クラス側で指定したプロパティを画面幅で変える場合は、修飾クラス側のメディアクエリで指定し直すこと。
 */

/* Header（ロゴ） */
.form-page-header {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 1.4rem;
    margin-bottom: 80px;
}

.form-page-header__inner {
    display: flex;
    align-items: center;
    width: calc(100% - 3.2rem);
    max-width: 123.2rem;
    height: 38px;
}

.form-page-header__logo {
    display: flex;
    width: 100%;
    max-width: 141px;
}

.form-page-header__logo-image {
    display: block;
    width: 100%;
    max-width: 12rem;
    height: auto;
}

/* Layout */
.form-page {
    --form-page-column-gap: 80px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.form-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 680fr) minmax(0, 424fr);
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
        "title form"
        "resources form"
        "recommend form";
    column-gap: var(--form-page-column-gap);
    width: 95%;
    max-width: calc(680px + 424px + var(--form-page-column-gap));
}

/* Title */
.form-page__title {
    grid-area: title;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
}

.form-page__heading {
    margin: 0;
    color: var(--blue-0, #0974E8);
    font-family: "Noto Sans JP";
    font-size: 40px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.form-page__lead {
    margin: 0;
    color: var(--black-0, #252729);
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    line-height: 200%; /* 32px */
}

.form-page__heading br,
.form-page__lead br {
    display: none;
}

/* Form */
.form-page__form {
    grid-area: form;
    align-self: start;
    display: flex;
    justify-content: center;
    width: 100%;
    height: max-content;
    padding-top: 32px;
    padding-bottom: 32px;
    border-radius: 6px;
    background: var(--white, #FFF);
    filter: drop-shadow(0px 0px 16px rgba(0, 0, 0, 0.10));
}

.form-page__form-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.form-page__form-inner .hbspt-form {
    display: flex;
    justify-content: center;
    width: 100%;
}

.form-page__form-inner .hbspt-form form {
    gap: 24px;
}

.form-page__form-inner .hbspt-form form ul,
.form-page__form-inner .hbspt-form form .hs_privacypolicy .input ul .hs-form-booleancheckbox label {
    margin-top: 0;
}

.form-page__submit {
    display: flex;
    justify-content: center;
    width: 95%;
    max-width: 360px;
    margin-top: 24px;
}

.form-page__submit .blu_button_line {
    max-width: unset;
}

.form-page .hs-error-msgs {
    color: var(--red-0, #FF595E);
}

.form-page .hbspt-form form .multi-container {
    margin-top: 0.8rem !important;
}

/* Resources */
.form-page__resources {
    grid-area: resources;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 56px;
    margin-bottom: 56px;
}

.form-page__resource-item {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 320px;
}

.form-page__resource-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Recommend */
.form-page__recommend {
    grid-area: recommend;
}

.form-page__recommend-inner {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 24px;
}

.form-page__recommend-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 140px;
}

.form-page__recommend-icon-image {
    display: block;
    width: 100%;
    height: auto;
}

.form-page__recommend-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    gap: 16px;
}

.form-page__recommend-heading {
    margin: 0;
    color: var(--black, #252729);
    font-family: "Noto Sans JP";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.form-page__recommend-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding-left: 24px;
    list-style: disc;
    list-style-position: outside;
}

.form-page__recommend-item {
    color: var(--black-0, #252729);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 200%; /* 32px */
}

/* Footer（コピーライト） */
.form-page-footer {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 32px 0;
    overflow-x: visible;
}

.form-page-footer__copyright {
    font-family: "Noto Sans JP";
    font-style: normal;
    font-weight: 700;
}

/* contact 固有のフォーム調整（HubSpot フォーム ac11b939-7767-4123-b3e2-11569ff55d83） */
.form-page--contact .hbspt-form form {
    display: unset;
    flex-direction: unset;
}

.form-page--contact .hbspt-form form .form-columns-0 .body2 {
    display: none;
}

.form-page--contact .hbspt-form fieldset {
    max-width: unset !important;
}

.form-page--contact .hbspt-form form fieldset.form-columns-1 .input {
    margin-right: 0;
}

.form-page--contact .hbspt-form form fieldset.form-columns-1 .hs-input {
    margin-right: 0;
}

.form-page--contact .hbspt-form form fieldset.form-columns-1 .hs-input:not([type="radio"]):not([type="checkbox"]) {
    width: 100%;
}

.form-page--contact .hbspt-form form .form-columns-2 .hs_firstname .input {
    margin-right: 0;
}

.form-page--contact .hbspt-form input:not([type="radio"]):not([type="checkbox"]) {
    width: 100% !important;
}

.form-page--contact .hbspt-form input[type="checkbox"] {
    cursor: pointer;
}

.form-page--contact .hbspt-form form fieldset > div {
    margin-bottom: 1.2rem;
}

.form-page--contact .hbspt-form fieldset > div:not(.hs_utm_term):not(.hs_utm_source):not(.hs_utm_medium):not(.hs-richtext) {
    margin-bottom: 1.6rem;
}

.form-page--contact .hbspt-form fieldset > div.hs_privacypolicy {
    margin-bottom: 2rem !important;
}

.form-page--contact .hbspt-form fieldset div label:not(.hs-form-radio-display):not(.hs-form-booleancheckbox-display) span:not(.hs-form-required) {
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 600 !important;
}

.form-page--contact .hbspt-form form .hs-form-radio-display {
    gap: 0.4rem;
}

.form-page--contact .hbspt-form form .hs-fieldtype-textarea .input textarea {
    margin-top: 0.4rem;
}

.form-page--contact .hs-fieldtype-textarea .hs-error-msgs {
    margin-top: 0.8rem;
}

.form-page--contact .hbspt-form form .hs_contact_detail span::after {
    display: unset !important;
}

.form-page--contact #label-contact_detail-ac11b939-7767-4123-b3e2-11569ff55d83 span::after {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 24px;
    height: 16px;
    border-radius: 3px;
    background: var(--red-0, #FF595E);
    color: var(--white, #FFF);
    text-align: center;
    font-size: 10px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    content: "必須";
}

.form-page--contact #label-firstname-ac11b939-7767-4123-b3e2-11569ff55d83 {
    display: none;
}

/* Responsive */
@media (min-width: 1060px) {
    .form-page-header__inner {
        padding: 1.6rem 2.4rem;
    }

    .form-page-header__logo-image {
        width: 141px;
        min-width: 141px;
        height: 100%;
    }
}

@media screen and (max-width: 1200px) {
    .form-page {
        --form-page-column-gap: 40px;
    }
}

@media screen and (max-width: 1059px) {
    .form-page-header {
        margin-top: 10px;
    }
}

@media screen and (max-width: 1023px) {
    .form-page__recommend-inner {
        flex-direction: column;
        align-items: center;
    }
}

@media screen and (max-width: 880px) {
    .form-page-header {
        margin-bottom: 64px;
    }

    .form-page-header__logo {
        max-width: 120px;
    }

    .form-page__layout {
        grid-template-columns: 100%;
        grid-template-rows: none;
        grid-template-areas:
            "title"
            "resources"
            "form"
            "recommend";
        column-gap: 0;
        width: 100%;
        max-width: none;
    }

    .form-page__title {
        justify-self: center;
        width: 87.201%;
        text-align: center;
    }

    .form-page__form {
        margin-top: 40px;
        padding-bottom: 64px;
        background: var(--blue-45, #D9EAFE);
        filter: unset;
    }

    .form-page__form-inner .hbspt-form form,
    .form-page__submit {
        width: 87.201%;
    }

    .form-page__resources {
        justify-self: center;
        width: 87.201%;
        display: none;
    }

    .form-page__recommend {
        justify-self: stretch;
        max-width: none;
        padding: 0 24px;
    }

    .form-page__recommend-text {
        align-items: center;
        gap: 8px;
    }

    .form-page__recommend-icon {
        max-width: 240px;
    }

    .form-page__recommend-heading {
        font-size: 20px;
    }
}

@media screen and (max-width: 780px) {
    .form-page__heading {
        text-align: center;
    }

    .form-page__heading br {
        display: block;
    }

    .form-page__title {
        gap: 24px;
    }
}

@media screen and (max-width: 600px) {
    .form-page__heading {
        font-size: 24px;
    }

    .form-page__lead {
        font-size: 14px;
    }
}

@media screen and (max-width: 374px) {
    .form-page__heading {
        font-size: 22px;
    }
}

/* resources サンクスページ下部のフォームセクション（single-resources.php） */
.form-page--resources-thanks .form-page__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 424px);
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "title form"
        "recommend form";
    column-gap: 64px;
    max-width: 1200px;
    padding-top: 80px;
    padding-bottom: 80px;
}

.form-page--resources-thanks .form-page__title {
    gap: 32px;
    text-align: center;
}

.form-page--resources-thanks .form-page__heading {
    color: #0974E8;
    font-size: 36px;
    line-height: 140%; /* 50.4px */
    letter-spacing: 1.08px;
}

.form-page--resources-thanks .form-page__lead {
    color: #252729;
    font-size: 16px;
    line-height: 140%; /* 22.4px */
}

.form-page--resources-thanks .form-page__lead br {
    display: inline;
}

.form-page--resources-thanks .form-page__form {
    filter: none;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.08);
}

/* 基本スタイルの .multi-container（!important）を打ち消し、ラジオボタン一覧の上余白をなくす */
.form-page--resources-thanks .hbspt-form form .multi-container {
    margin-top: 0 !important;
}

.form-page--resources-thanks .form-page__submit .blu_button_line span {
    color: #0974E8;
}

.form-page--resources-thanks .form-page__recommend {
    justify-self: stretch;
    max-width: none;
    margin-top: 54px;
    padding: 32px 0;
    background: none;
}

.form-page--resources-thanks .form-page__recommend-inner {
    flex-direction: row;
    width: 95%;
}

.form-page--resources-thanks .form-page__recommend-icon {
    max-width: 320px;
}

.form-page--resources-thanks .form-page__recommend-text {
    align-items: stretch;
    gap: 16px;
    max-width: 328px;
}

.form-page--resources-thanks .form-page__recommend-heading {
    font-size: 24px;
}

@media screen and (max-width: 1100px) {
    .form-page--resources-thanks .form-page__layout {
        column-gap: 24px;
    }
}

@media screen and (max-width: 880px) {
    .form-page--resources-thanks .form-page__layout {
        grid-template-columns: 100%;
        grid-template-rows: none;
        grid-template-areas:
            "title"
            "form"
            "recommend";
        column-gap: 0;
        width: 100%;
        max-width: none;
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .form-page--resources-thanks .form-page__title {
        width: 87.204%;
    }

    .form-page--resources-thanks .form-page__heading {
        font-size: 22px;
        line-height: 140%; /* 30.8px */
        letter-spacing: 0.66px;
    }

    .form-page--resources-thanks .form-page__heading br {
        display: block;
    }

    .form-page--resources-thanks .form-page__form {
        justify-self: center;
        width: 87.204%;
        margin-top: 40px;
        padding-bottom: 32px;
        background: var(--white, #FFF);
        box-shadow: none;
    }

    .form-page--resources-thanks .form-page__form-inner .hbspt-form form,
    .form-page--resources-thanks .form-page__submit {
        width: 85.324%;
    }

    .form-page--resources-thanks .form-page__recommend {
        justify-self: center;
        width: 87.204%;
        margin-top: 24px;
        padding: 32px 0;
    }
}

@media screen and (max-width: 680px) {
    .form-page--resources-thanks .form-page__recommend-inner {
        flex-direction: column;
        align-items: center;
        width: 90.675%;
    }

    .form-page--resources-thanks .form-page__recommend-heading {
        font-size: 20px;
        line-height: 133%;
        text-align: center;
    }

    .form-page--resources-thanks .form-page__lead {
        text-align: left;
    }

    .form-page--resources-thanks .form-page__lead br {
        display: none;
    }
}
