.contact-section {
    padding: 60px 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative; 
    overflow: hidden;
    min-height: 100vh;
    box-sizing: border-box;
}

/* 波線（トップ）のスタイル (ヘッダー色に合わせ赤色に変更) */
.contact-section::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 50px; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 5 Q 25 0, 50 5 T 100 5 L 100 0 L 0 0 Z' fill='%23D92828'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%; 
    z-index: 2; /* VANTAより手前に表示 */
}

/* 波線（ボトム）のスタイル (フッター色に合わせ赤色に変更) */
.contact-section::after {
    content: '';
    position: absolute;
    bottom: -1px; 
    left: 0;
    width: 100%;
    height: 50px; /* 波線の高さ */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 5 Q 25 0, 50 5 T 100 5 L 100 10 L 0 10 Z' fill='%23D92828'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    z-index: 3;
}

/* フォームを囲うカードデザイン */
.form-container {
    width: 100%;
    max-width: 700px; /* フォームの最大幅 */
    margin: 40px auto; /* 上下に余白・左右中央寄せ */
    padding: 40px;
    /* Vanta.jsの上でも読みやすいよう、半透明の白背景に */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* 既存の影と合わせる */
    box-sizing: border-box;
    text-align: left; /* フォーム要素は左揃えに */
}

.form-container h2 {
    text-align: center;
    font-size: 2.0rem;
    font-weight: 700;
    color: #D92828; /* アクセントカラー (赤) */
    margin-bottom: 20px;
}

.form-container p {
    text-align: center;
    font-size: 1rem;
    color: #555;
    margin-bottom: 30px;
    line-height: 1.8;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

/* フォーム入力欄のスタイル */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"], /* tel (電話番号) を追加 */
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* paddingを含めてwidth 100%にする */
    font-size: 1rem;
    font-family: inherit; /* ページ全体のフォントを継承 */
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus, /* tel (電話番号) を追加 */
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b; /* フォーカス時に赤系色に */
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

.form-button-container {
    text-align: center;
    margin-top: 30px;
}

/* 送信ボタンのスタイル */
.submit-button {
    background: #ff6b6b;
    position: relative;
    display: inline-block;
    margin: 0 auto;
    padding: 15px 40px; /* ボタンサイズを調整 */
    color: #FFF;
    transition: 0.3s ease-in-out;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 8px;
    border: none; /* buttonタグのためリセット */
    border-bottom: solid 5px #de1d1d;
    cursor: pointer;
}

.submit-button:hover {
    border-bottom: solid 2px #de1d1d; /* ホバー時の沈み込みを調整 */
    transform: translateY(3px);
    background: #ff8585; /* 少し明るく */
}


/* --- 9.1 お問い合わせフォーム (横並び・追加項目対応) --- */
/* ▼▼▼ 不足していた横並び用スタイルを追加 ▼▼▼ */

/* フォームグループを横並びにするためのラッパー */
.form-group-inline {
    display: flex;
    gap: 15px; /* PCでの横並び時の隙間 */
    width: 100%;
}

/* 横並び時の各要素 */
.form-field-group {
    flex: 1; /* 均等に幅を分ける */
}

/* 横並び用のラベル */
.form-field-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

/* 横並び用の入力欄 */
.form-field-group input[type="text"],
.form-field-group input[type="tel"],
.form-field-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
}

.form-field-group input[type="text"]:focus,
.form-field-group input[type="tel"]:focus,
.form-field-group input[type="email"]:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}

/* ファイル入力欄のスタイル (ES添削ページ用) */
.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    line-height: 1.4;
    cursor: pointer;
}

.form-group input[type="file"]:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
}


/* --- 10. お問い合わせページ (レスポンシブ) --- */

@media (max-width: 768px) {
    /* contact.html 用の .contact-section の調整 */
    .contact-section {
        padding: 40px 0 80px 0;
        min-height: auto;
    }

    .form-container {
        padding: 30px 20px; /* モバイルでの余白を調整 */
        margin-top: 20px;
    }

    .form-container h2 {
        font-size: 1.6rem;
    }

    .form-container p {
        font-size: 0.7rem;
    }
    
    .submit-button {
        width: 100%; /* ボタン幅を広げる */
        padding: 15px 20px;
    }

    /* ▼▼▼ 不足していたレスポンシブスタイルを追加 ▼▼▼ */
    /* お問い合わせフォーム横並び解除 */
    .form-group-inline {
        flex-direction: column; /* 縦積みに変更 */
        gap: 25px; /* 縦に並んだときの要素間のマージン */
    }
}