/* ===== Contact page ===== */

.contact-page-hero {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.contact-page-hero-image {
  position: absolute;
  inset: 0;
  background: url("/images/contact-hero.jpg?v=4") center center / cover no-repeat;
}

.contact-page-hero-title {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.contact-page-hero-title h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.3;
  font-weight: bold;
}

.contact-page-hero-title p {
  margin: 7px 0 0;
  font-size: 14px;
}

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

.contact-form-section {
  padding: 78px 20px 75px;
}

.contact-form-inner {
  width: 920px;
  max-width: 100%;
  margin: 0 auto;
}

.contact-form-lead {
  margin: 0 0 24px;
  text-align: center;
  font-size: 14px;
}

#contact-form {
  width: 100%;
  font-size: 14px;
}

.form-field {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.form-field label,
.form-field legend {
  display: block;
  margin: 0 0 4px;
  padding: 0;
  font-size: 14px;
  font-weight: bold;
}

.required-mark {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  background: #0c5980;
  color: #fff;
  font-size: 11px;
  line-height: 1.3;
  vertical-align: 1px;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #f7f7f7;
  color: #05161a;
  font-family: inherit;
  font-size: 16px;
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"] {
  height: 42px;
  padding: 8px 10px;
}

.form-field input::placeholder {
  color: #aaa;
  opacity: 1;
}

.form-field select {
  height: 38px;
  padding: 5px 8px;
  background: #fff;
}

.form-field textarea {
  height: 88px;
  padding: 8px 10px;
  resize: vertical;
}

fieldset.contact-method {
  margin-bottom: 18px;
}

.contact-method legend {
  margin-bottom: 3px;
}

.form-choice {
  display: inline-flex !important;
  align-items: center;
  margin: 0 12px 0 0 !important;
  font-weight: normal !important;
  gap: 6px;
}

.form-choice input {
  margin: 0;
}

#contact-captcha {
  width: 304px;
  height: 78px;
  margin: 12px 0 22px;
}

.form-submit {
  text-align: center;
}

.form-submit button {
  width: 270px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #123e70;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .contact-page-hero {
    height: 180px;
  }

  .contact-page-hero-title h1 {
    font-size: 28px;
  }

  .contact-form-section {
    padding: 45px 20px 55px;
  }

  .contact-form-lead {
    margin-bottom: 25px;
  }
}

/* Turnstile */
#contact-captcha {
  width: 100%;
  height: auto;
  margin: 30px 0 26px;
  display: flex;
  justify-content: center;
}

/* Turnstile vertical layout */
#contact-captcha {
  display: block;
  width: 100%;
  height: auto;
  margin: 30px 0 26px;
  text-align: center;
}

#contact-captcha .cf-turnstile {
  display: inline-block;
}

.form-submit {
  display: block;
  width: 100%;
  text-align: center;
  clear: both;
}

#contact-captcha {
  margin: 30px 0 0;
}

.form-submit {
  margin-top: 30px;
}

/* 送信完了画面 */
.contact-complete {
  text-align: center;
  padding: 20px 0 80px;
}

.contact-complete h2 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 700;
}

.contact-complete p {
  margin: 0 0 38px;
  font-size: 16px;
}

.complete-back-button {
  display: inline-block;
  min-width: 160px;
  padding: 14px 40px;
  background: #000;
  color: #fff;
  text-decoration: none;
  text-align: center;
}

/* 送信完了画面調整 */
.contact-complete {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  text-align: center;
  padding: 55px 0 95px;
}

.contact-complete h2 {
  position: relative;
  margin: 0 0 45px;
  font-size: 26px;
  font-weight: 400;
  text-align: center;
}

.contact-complete h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 120px;
  height: 1px;
  background: #22b8cf;
  transform: translateX(-50%);
}

.contact-complete p {
  margin: 0 0 28px;
  font-size: 14px;
  text-align: center;
}

.contact-complete .form-submit {
  margin-top: 28px;
  text-align: center;
}

.contact-complete .complete-back-button {
  display: inline-block;
  min-width: 80px;
  padding: 9px 20px;
  box-sizing: border-box;
  border-radius: 9px;
  background: #20b8cf;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  text-decoration: none;
}

/* 入力エラー */
.form-error {
  margin: 4px 0 0;
  color: #ff3333;
  font-size: 14px;
  line-height: 1.4;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: #ffb3b3;
}

.form-error {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: red !important;
  background: #fff0f0 !important;
  min-height: 20px;
  margin: 5px 0 10px !important;
  font-size: 14px !important;
}

/* 入力エラー 最終表示 */
.form-error {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  min-height: 0;
  background: transparent !important;
  color: #ff3333 !important;
  font-size: 14px !important;
  line-height: 1.4;
}

/* お問い合わせヘッダー文字の視認性 */
.contact-page-hero-title h1,
.contact-page-hero-title p {
  text-shadow:
    0 0 4px rgba(255,255,255,.95),
    0 0 8px rgba(255,255,255,.85);
}
