/* Contact Section */
.mv-contact {
    background: linear-gradient(90deg, #0a1f44 0%, #1e4f91 50%, #6a9eff 100%);
    text-align: center;
    position: relative;
    z-index: 0;
    height: 102vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mv-contact h1 {
    font-family: 'Noto Serif JP', sans-serif;
    font-size: 100px;
    font-weight: 900;
    color: #eeeff2;
    letter-spacing: 5px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    will-change: transform;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    transform: translateY(5%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    opacity: 0.7;
}

.scroll-indicator p {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #ffffff;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.scroll-indicator .line {
    width: 2px;
    height: 60px;
    background-color: #ffffff;
    position: relative;
}

.scroll-indicator .line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
}

/* Contact Form Section */
.contact-form-section {
    padding: 500px 0 0;
    background-color: #f2f1ee;
    position: relative;
    z-index: 3;
    margin-top: -75px;
}

.contact-form-section .container {
    max-width: 1100px;
    margin: 0 auto;
}

.form-intro {
    margin-bottom: 50px;
    font-size: 16px;
    line-height: 2.8;
    text-align: left;
    font-weight: bold;
    margin-top: -240px;
}

.contact-form .form-group {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #ababab;
    display: flex;
    align-items: center;
}

.contact-form .form-group:first-of-type {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #ababab;
}

.contact-form .form-group:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.contact-form .form-group label {
    flex: 0 0 500px;
    font-size: 15px;
    font-weight: bold;
}

.contact-form .form-group label[for="inquiry_content"] {
    flex: initial;
}

.contact-form .form-group .required {
    color: #e74c3c;
    margin-left: 5px;
}


/* エラーメッセージ */
.error-message {
    color: #e74c3c;
    font-size: 14px;
    font-weight: bold;
    margin-top: 8px;
    display: none;
    /* 初期は非表示 */
    line-height: 1.6;
}

.error-message.show {
    display: block;
    /* JavaScriptで .show を追加して表示 */
}

.error-border {
    border: 2px solid #e74c3c !important;
    background-color: #fff8f8;
}

.input-with-error {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.contact-form .form-group input[type="text"],
.contact-form .form-group input[type="email"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ababab;
    border-radius: 5px;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.3s ease;
}

.contact-form .form-group input[type="text"]::placeholder,
.contact-form .form-group input[type="email"]::placeholder {
    color: #aaa;
}

.contact-form .form-group input[type="text"]:focus,
.contact-form .form-group input[type="email"]:focus,
.phone-inputs input[type="tel"]:focus {
    border-color: #a08c7c;
    outline: none;
    box-shadow: 0 0 5px rgba(160, 140, 124, 0.3);
}

.phone-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    /* 入力欄-ハイフン-入力欄-ハイフン-入力欄 */
    align-items: center;
    gap: 0 10px;
    flex-grow: 1;
}

.phone-inputs input[type="tel"] {
    width: 100%;
    padding: 12px 0;
    text-align: center;
    border: 1px solid #ababab;
    border-radius: 5px;
    font-size: 15px;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.phone-inputs span {
    margin: 0;
    font-size: 18px;
    color: #555;
}

.contact-form .radio-group {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 15px;
}

.contact-form .radio-group label {
    margin-bottom: 0;
}

.contact-form .radio-options {
    flex-grow: 1;
}

.contact-form .radio-options .instruction {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 30px;
}

.contact-form .radio-options .option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 0;
    margin-bottom: 15px;
    flex-direction: row;
}

.contact-form .radio-options .option-row:last-child {
    margin-bottom: 0;
}

.contact-form .radio-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    color: #333;
    cursor: pointer;
}

.contact-form .radio-options input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    top: -1px;
    flex-shrink: 0;
}

.contact-form .radio-options input[type="checkbox"]:checked {
    background-color: #a08c7c;
    border-color: #363636;
}

.contact-form .radio-options input[type="checkbox"]:checked::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* お問い合わせ内容 */
.label-and-instruction-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    margin-right: 60px;
}

.contact-form .textarea-wrapper {
    flex-grow: 1;
    display: block;
    flex-direction: column;
}

.contact-form textarea {
    flex-grow: 1;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ababab;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.3s ease;
    resize: vertical;
    font-family: 'Noto Sans JP', sans-serif;

}

.contact-form textarea::placeholder {
    color: #aaa;
}

.contact-form textarea:focus {
    border-color: #363636;
    outline: none;
    box-shadow: 0 0 5px rgba(160, 140, 124, 0.3);
}

.contact-form .textarea-instruction {
    font-size: 15px;
    font-weight: bold;
    margin-top: 30px;
    text-align: left;
}

/* Privacy Policy and Submit Button */
.privacy-policy-section {
    background-color: #dddddd;
    text-align: center;
    padding: 80px 20px 0;
    margin-top: 200px;
}

.privacy-checkbox {
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.privacy-checkbox input[type="checkbox"] {
    margin-right: 11px;
    width: 18px;
    height: 18px;
    vertical-align: middle;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #ababab;
    background-color: #fff;
    cursor: pointer;
    position: relative;
    top: 2px;
}

.privacy-checkbox input[type="checkbox"]:checked {
    background-color: #6b6b6b;
    border-color: #6b6b6b;
}

.privacy-checkbox input[type="checkbox"]:checked::before {
    content: '✔';
    display: block;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.privacy-link {
    text-decoration: underline;
    color: #333333;
    transition: color 0.1s ease, transform 0.1s ease;
    display: inline-block;
}

.privacy-link:hover {
    color: #111111;
    transform: scale(1.01);
    text-decoration: underline;
}

.privacy-link:active {
    transform: scale(0.97);
    opacity: 0.8;
}

.form-submit {
    text-align: center;
    padding: 50px 0 40px;
    background-color: #dddddd;
}

.form-submit button {
    color: #333333;
    background-color: #f8f5f1;
    border: 1px solid #ababab;
    padding: 20px 90px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-shadow: 4px 5px 4px rgba(0, 0, 0, 0.2);
}

.form-submit button:hover {
    background-color: #8b8b8b;
    color: #fff;
    border-color: #464646;
}

.form-submit button.sending {
    background: #ababab;
    color: #fff;
    border-color: #a08c7c;
    cursor: not-allowed;
    pointer-events: none;
}

.message-box {
    text-align: center;
    margin-top: 30px;
    min-height: 1.5em;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-box.show {
    visibility: visible;
    opacity: 1;
}

.message-text {
    font-weight: bold;
    font-size: 1rem;
}




@media (max-width: 1024px) {
    .mv-contact {
        height: 700px;
    }

    /* Contact Form Section */
    .contact-form-section {
        padding: 200px 0 0;
    }

    .contact-form-section .container {
        padding: 0 20px;
        max-width: 700px;
    }

    .form-intro {
        margin-top: 0;
    }

    .contact-form .form-group label {
        flex: 0 0 200px;
    }

    .phone-inputs input[type="tel"] {
        padding: 12px 30px;
    }

    /* ラジオボタン／チェックボックス */
    .contact-form .radio-options .option-row {
        gap: 15px 20px;
    }

    .label-and-instruction-wrapper {
        margin-right: 60px;
        width: 200px;
    }

    /* プライバシーポリシーセクション */
    .privacy-policy-section {
        padding: 80px 20px 10px;
        margin-top: 115px;
    }

    /* 送信ボタン */
    .form-submit button {
        padding: 18px 88px;
        font-size: 17px;
    }
}

@media (max-width: 900px) {
    .contact-form-section {
        margin-top: 0;
    }

    .contact-form-section {
        padding: 150px 0 0;
    }
}



@media (max-width: 768px) {

    /* Contact Section */
    .mv-contact {
        padding: 150px 0;
        height: 60vh;
    }

    .mv-contact h1 {
        font-size: 70px;
        margin-bottom: 40px;
    }

    .scroll-indicator {
        bottom: 30px;
    }

    /* Contact Form Section */
    .contact-form-section {
        padding: 100px 0 0;
        margin-top: 0;
    }

    .contact-form-section .container {
        padding: 0 150px;
        max-width: none;
        width: 100%;
        box-sizing: border-box;
    }

    .form-intro {
        margin-bottom: 40px;
        line-height: 1.8;
        text-align: left;
    }

    .contact-form .form-group {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 30px;
        padding-bottom: 30px;
    }

    .contact-form .form-group:first-of-type {
        margin-top: 30px;
        padding-top: 30px;
    }

    .contact-form .form-group label {
        flex: auto;
        width: 100%;
        margin-bottom: 8px;
    }

    /* お問い合わせ内容 */
    .contact-form .form-group label[for="inquiry_content"] {
        flex: auto;
        width: 100%;
        margin-bottom: 8px;
    }

    .contact-form .form-group input[type="text"],
    .contact-form .form-group input[type="email"],
    .contact-form textarea,
    .phone-inputs {
        width: 100%;
        box-sizing: border-box;
    }

    /* 電話番号入力フィールド */
    .phone-inputs input[type="tel"] {
        flex: 1 1 calc(33.33% - 10px);
        min-width: 80px;
        padding: 10px 10px;
        font-size: 15px;
        box-sizing: border-box;
    }

    .phone-inputs span {
        margin: 0 2px;
        font-size: 16px;
        flex-shrink: 0;
    }

    /* ラジオボタン／チェックボックス */
    .contact-form .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .contact-form .radio-group>label {
        margin-bottom: 10px;
    }

    .contact-form .radio-options .instruction {
        margin-bottom: 20px;
        font-size: 14px;
    }

    .contact-form .radio-options .option-row {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 0;
    }

    /* テキストエリアと説明文 */
    .label-and-instruction-wrapper {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-form .textarea-wrapper {
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        width: 100%;
    }

    .contact-form .textarea-instruction {
        text-align: left;
        margin-top: 5px;
        font-size: 14px;
    }

    /* Privacy Policy and Submit Button */
    .privacy-policy-section {
        padding: 50px 15px 0;
        margin-top: 100px;
    }

    .privacy-checkbox {
        font-size: 15px;
    }

    .privacy-checkbox input[type="checkbox"] {
        margin-right: 8px;
    }

    .form-submit {
        padding: 40px 0 10px;
    }

    .form-submit button {
        padding: 15px 84px;
        font-size: 16px;
    }
}



@media (max-width: 480px) {

    /* Contact Section */
    .mv-contact {
        height: 50vh;
    }

    .mv-contact h1 {
        font-size: 40px;
        letter-spacing: 2px;
        margin-bottom: 20px;
    }

    .scroll-indicator {
        bottom: 20px;
    }

    .scroll-indicator p {
        font-size: 10px;
    }

    .scroll-indicator .line {
        height: 40px;
    }


    /* Contact Form Section */
    .contact-form-section .container {
        padding: 0 60px;
    }

    .form-intro {
        font-size: 13px;
        margin-bottom: 20px;
        line-height: 1.6;
    }

    .contact-form .form-group {
        margin-bottom: 20px;
        padding-bottom: 30px;
        gap: 0;
    }

    .contact-form .form-group:first-of-type {
        margin-top: 20px;
        padding-top: 20px;
    }

    .contact-form .form-group label {
        font-size: 13px;
    }

    .contact-form .form-group input[type="text"],
    .contact-form .form-group input[type="email"],
    .contact-form textarea {
        font-size: 13px;
        padding: 8px 10px;
    }

    /* 電話番号入力フィールド */
    .phone-inputs {
        gap: 3px;
    }

    .phone-inputs input[type="tel"] {
        flex: 1 1 calc(33.33% - 6px);
        min-width: 50px;
        padding: 6px 5px;
        font-size: 13px;
    }

    .phone-inputs span {
        margin: 0 1px;
        font-size: 14px;
    }

    /* ラジオボタン／チェックボックス */
    .contact-form .radio-options .instruction,
    .contact-form .textarea-instruction {
        font-size: 12px;
    }

    .contact-form .radio-options .option-row {
        gap: 5px;
    }

    .contact-form .radio-options label {
        font-size: 13px;
    }

    /* Privacy Policy and Submit Button */

    /* チェックボックス共通設定 */
    .privacy-checkbox input[type="checkbox"],
    .contact-form .radio-options input[type="checkbox"] {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        width: 18px;
        height: 18px;
        background-color: #ffffff !important;
        border: 1px solid #ababab !important;
        border-radius: 0;
        cursor: pointer;
        position: relative;
        vertical-align: middle;
    }

    /* チェックが入った時の背景とマーク */
    .privacy-checkbox input[type="checkbox"]:checked,
    .contact-form .radio-options input[type="checkbox"]:checked {
        background-color: #464646 !important;
        border-color: #464646 !important;
    }

    /* チェックマーク（✔）の設定 */
    .privacy-checkbox input[type="checkbox"]:checked::before,
    .contact-form .radio-options input[type="checkbox"]:checked::before {
        content: '✔';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #ffffff;
        font-size: 12px;
        font-weight: bold;
        line-height: 1;
        display: block !important;
        visibility: visible !important;
    }

    .privacy-policy-section {
        padding: 60px 10px 0;
        margin-top: 60px;
    }

    .privacy-checkbox {
        font-size: 13px;
    }

    .privacy-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
        top: 0;
    }

    .privacy-checkbox input[type="checkbox"]:checked::before {
        font-size: 10px;
    }

    .form-submit {
        padding: 25px 0 1px;
    }

    .form-submit button {
        padding: 15px 0;
        width: 60%;
        font-size: 15px;
    }
}