/* --- body, header, footerの基本スタイル --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
}

a {
    color: #007bff;
    text-decoration: none;
}

header, footer {
    /* ここに共通ヘッダー・フッターのスタイルを追加 */
}

/* --- メインコンテンツとフォームのスタイル --- */
main#form {
    padding-top: 120px;
    min-height: 50vh;
}

.form__inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.form__inner_title {
    text-align: center;
    margin-bottom: 30px;
}

.form__inner_title .title {
    font-size: 28px;
    font-weight: bold;
    color: #1B2564;
    position: relative;
    padding-bottom: 10px;
}

.form__inner_title .title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: #1B2564;
    margin: 0 auto;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* --- フォームのdl, dt, ddのスタイル --- */
dl.form {
    margin-bottom: 30px;
}

dl.form dt {
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 5px;
    font-size: 16px;
    color: #1B2564;
}

dl.form dd {
    margin: 0;
    padding: 0;
}

/* --- input, textareaのスタイル --- */
input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* --- 個人情報の取り扱い部分のスタイル --- */
.form--flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
}

.form--check {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.form--check input[type="checkbox"] {
    margin-right: 5px;
}

/* --- エラー表示のスタイル --- */
#errors {
    color: #d9534f;
    margin-top: 20px;
}

#errors p {
    margin: 0;
    padding: 5px 0;
}

/* --- ボタンのスタイル --- */
.form__btn {
    text-align: center;
    margin-top: 40px;
}

input[type="submit"] {
    display: inline-block;
    padding: 15px 40px;
    background-color: #1B2564;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #007bff;
}

/* --- モバイル対応 --- */
@media (max-width: 639px) {
    .form__inner_title .title {
        font-size: 24px;
    }
    
    .form--flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .form--flex dd {
        margin-bottom: 10px;
    }
}

/* --- サンクスページの基本スタイル --- */
/* フォーム内コンテナのスタイル */
.contact-form__inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 完了画面タイトルのスタイル */
.form__inner_title {
    text-align: center;
    margin-bottom: 30px;
}

.form__inner_title .title {
    font-size: 28px;
    font-weight: bold;
    color: #1B2564;
    position: relative;
    padding-bottom: 10px;
}

/* 完了メッセージのスタイル */
.contact-form__inner p {
    text-align: center;
    font-size: 16px;
    line-height: 1.8;
    margin-top: 20px;
}

/* レスポンシブ対応 */
@media (max-width: 639px) {
    .form__inner_title .title {
        font-size: 24px;
    }
}

/* --- 確認画面の基本スタイル --- */

/* フォーム内コンテナのスタイル */
.form__inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 確認画面タイトルのスタイル */
.form__inner_title {
    text-align: center;
    margin-bottom: 30px;
}

/* .form__inner_title .title {
    font-size: 28px;
    font-weight: bold;
    color: #1B2564;
    position: relative;
    padding-bottom: 10px;
} */

/* 確認画面のフォームスタイル */
dl.form.confirm {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    background-color: #f9f9f9;
}

dl.form.confirm dt {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #1B2564;
    font-size: 16px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
}

dl.form.confirm dt:first-child {
    margin-top: 0;
}

dl.form.confirm dd {
    margin: 0;
    padding-left: 10px;
    white-space: pre-wrap; /* 改行を保持 */
}

/* 戻る/送信ボタンのスタイル */
.form__btn {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

input[type="button"],
input[type="submit"] {
    display: inline-block;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

input[type="button"] {
    background-color: #999;
    color: #fff;
}

input[type="submit"] {
    background-color: #1B2564;
    color: #fff;
}

input[type="submit"]:hover {
    background-color: #007bff;
}

/* エラー表示のスタイル */
div.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

div.error ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

div.error ul li {
    margin: 0;
    padding: 0;
}


/* --- モバイル対応 --- */
@media (max-width: 639px) {
    .form__inner_title .title {
        font-size: 24px;
    }

    .form__btn {
        flex-direction: column;
        gap: 10px;
    }
    
    input[type="button"],
    input[type="submit"] {
        width: 100%;
    }
}