/* =========================
   Contact Page
   ========================= */

.contact-page {
  padding: 80px 80px 80px; /* bottom 80px */
  background: #fff;
}

.contact-header {
  text-align: center;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
  max-width: 1094px;
  margin-left: auto;
  margin-right: auto;
}

.contact-title {
  font-size: 42px;
  font-weight: 600;
  color: #444;
  letter-spacing: 2.1px;
  text-align: center;
  padding: 4px;
}

.contact-lead {
  font-size: 16px;
  color: #444;
  line-height: 2;
  text-align: center;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* =========================
   Contact Form
   ========================= */

.contact-form {
  background: linear-gradient(-56.45deg, #246EE7 65.67%, #52E4DA 99.05%);
  border-radius: 20px;
  padding: 60px 166px;
  max-width: 1440px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form > * {
  position: relative;
  z-index: 1;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group-full {
  width: 100%;
}

/* =========================
   Labels & Badges
   ========================= */

.form-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* 必須: #FF6B80 */
.badge-required {
  background: #FF6B80;
  color: #fff;
}

/* 任意: #F4F5F9 グレー */
.badge-optional {
  background: #F4F5F9;
  color: #444;
}

/* =========================
   Inputs
   ========================= */

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: #fff;
  border: 1px solid #246EE7;
  border-radius: 12px;
  padding: 0 16px;
  height: 50px;
  font-size: 16px;
  font-family: inherit;
  color: #333;
  letter-spacing: 0.8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #888;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #246EE7;
  box-shadow: 0 0 0 3px rgba(36, 110, 231, 0.15);
}

.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
  border-color: #e53935;
}

.form-textarea {
  height: auto;
  min-height: 280px;
  padding: 16px;
  resize: vertical;
  line-height: 1.6;
}

/* =========================
   Select
   ========================= */

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23246EE7'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.form-select option[value=""] { color: #888; }

/* =========================
   Radio Group（ラジオボタン）
   ========================= */

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.8px;
  /* ホバー下線なし */
}

.radio-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.radio-label input[type="radio"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: transparent;
  transition: border-color 0.2s;
}

.radio-label input[type="radio"]:checked::before {
  border-color: #fff;
  background: #fff;
}

.radio-label input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #246EE7;
  border-radius: 50%;
}

.radio-label:hover { text-decoration: none; }
.radio-label:hover .radio-text { text-decoration: none; }

/* =========================
   Agreement（チェックボックス）
   ========================= */

.form-agreement {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.8px;
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

/* チェックボックスの四角 */
.checkbox-label input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: #fff;
  border: 2px solid #246EE7;
  border-radius: 2px;
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #246EE7;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}

/* 利用規約・プライバシーポリシーのリンク */
.checkbox-text a {
  color: #fff;
  text-decoration: underline;
  font-weight: 700;
}

/* ホバー下線なし */
.checkbox-text a:hover {
  text-decoration: none;
  opacity: 0.85;
}

/* =========================
   Submit Button
   ========================= */

.form-submit {
  display: flex;
  justify-content: center;
}

/* ボタン: テキスト中央、矢印右端24px */
.btn-submit {
  width: 485px;
  max-width: 100%;
  height: 100px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;     /* 右端24px */
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.2px;
  position: relative;
}

.btn-submit span:first-child {
  flex: 1;
  text-align: center;
}

/* =========================
   送信結果メッセージ
   ========================= */

.form-message {
  padding: 20px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.6;
}

.form-message.is-success {
  background: #e8f5e9;
  border: 1px solid #4caf50;
  color: #2e7d32;
}

.form-message.is-error {
  background: #ffebee;
  border: 1px solid #ef5350;
  color: #c62828;
}

/* =========================
   エラーメッセージ
   ========================= */

.form-error {
  display: block;
  color: #ffcdd2;
  font-size: 16px;
  font-weight: 500;
  min-height: 18px;
  letter-spacing: 0.5px;
}

/* =========================
   Disabled状態
   ========================= */

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* =========================
   Responsive ≤ 1020px (SP)
   ========================= */

@media (max-width: 1020px) {

  .container{
    width: 100%;
  }
  .contact-page {
    padding: 40px 20px 60px;
  }

  .contact-title { 
    font-size: 28px;
    line-height:1.4;
  }
  .contact-lead  {font-size: 14px;}
  br { display: none; }

  .contact-form {
    padding: 32px 20px;
    border-radius: 16px;
    gap: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .badge { font-size: 14px; padding: 2px 10px; }
  .form-label { font-size: 14px; }

  .form-input,
  .form-textarea,
  .form-select { font-size: 14px; }

  .radio-label  { font-size: 14px; }
  .checkbox-label { font-size: 14px; }

  .btn-submit {
    width: 100%;
    height: auto;
    padding: 16px 16px 16px 44px;
    font-size: 16px;
    letter-spacing: 0.8px;
    gap: 10px;
    justify-content: flex-start;
    border-radius: 999px;  }
  .btn-primary{
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    color: #123175;
    text-decoration: none;
    white-space: nowrap;
    height: 64px;
    max-width: 100%;
  }
  .btn-arrow{
    width: 24px;
    height: 24px;
    font-size: 16px;
    margin-left: auto;
    letter-spacing: 0.8px;
  }

  .btn-submit span:first-child { text-align: center; }
}
