
/* ==================================
   NandO planning 2.0
   お問い合わせフォーム
================================== */

.contact-page {
  background-color: #f5f9fd;
  color: #102c50;
  min-height: 100vh;
}

.contact-form-section {
  padding: 80px 20px 100px;
}

.contact-form-inner {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

#contact-title {
  margin: 0 0 24px;
  font-size: 32px;
  font-weight: 700;
  text-align: center;
}

.contact-form-lead {
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
}

.contact-required-note {
  margin-bottom: 24px;
  font-size: 14px;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.contact-form .form-group label {
  font-size: 15px;
  font-weight: 700;
}

.contact-form .required {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  background-color: #b64050;
  color: #fff;
  font-size: 12px;
}

.contact-form input:not([type="checkbox"]),
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #b8c9d9;
  border-radius: 8px;
  background-color: #fff;
  color: #102c50;
  font: inherit;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible,
.contact-form button:focus-visible,
.contact-form a:focus-visible {
  outline: 3px solid #3478bd;
  outline-offset: 3px;
}

.contact-form .form-privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 32px 0;
  line-height: 1.7;
}

.contact-form .form-privacy input {
  margin-top: 5px;
  flex-shrink: 0;
}

.contact-form .form-privacy a {
  color: #145a9b;
  text-decoration: underline;
}

.contact-form .form-actions {
  text-align: center;
}

.contact-form .form-confirm-button {
  width: 100%;
  max-width: 360px;
  min-height: 56px;
  padding: 14px 24px;
  border: 0;
  border-radius: 8px;
  background-color: #102c50;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form .form-confirm-button:hover {
  background-color: #205184;
}

/* スマートフォン */
@media (max-width: 767px) {
  .contact-form-section {
    padding: 56px 20px 72px;
  }

  #contact-title {
    font-size: 26px;
  }

  .contact-form-lead {
    font-size: 15px;
    text-align: left;
  }

  .contact-form .form-confirm-button {
    max-width: none;
  }
}


/* お問い合わせページの基本設定 */
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
}

/* フォームの横幅調整 */
.contact-form-inner {
  min-width: 0;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  max-width: 100%;
}

/* 同意欄のレイアウト */
.contact-form .form-privacy {
  align-items: flex-start;
}

.contact-form .form-privacy label {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 案内文の不自然な改行を防ぐ */
.contact-lead-nowrap {
  white-space: nowrap;
}

/* 320px専用の改行 */
.contact-form-lead .sp-320 {
  display: none;
}

@media (max-width: 320px) {
  .contact-form-lead .sp-320 {
    display: inline;
  }
}


/* ========================================
   お問い合わせ確認画面
======================================== */

/* hidden属性を確実に反映 */
.contact-form[hidden],
.contact-confirm[hidden] {
  display: none !important;
}

.contact-confirm {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  color: #102c50;
}

.contact-confirm h2 {
  margin: 0 0 24px;
  font-size: 28px;
  text-align: center;
}

.confirm-lead {
  margin-bottom: 32px;
  text-align: center;
  line-height: 1.8;
}

.confirm-list {
  margin: 0;
  border-top: 1px solid #c8d8e8;
}

.confirm-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 16px;
  border-bottom: 1px solid #c8d8e8;
}

.confirm-item dt {
  font-weight: 700;
}

.confirm-item dd {
  min-width: 0;
  margin: 0;
  line-height: 1.8;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.confirm-back-button,
.confirm-send-button {
  min-width: 180px;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.confirm-back-button {
  border: 1px solid #102c50;
  color: #102c50;
  background: #fff;
}

.confirm-send-button {
  border: 1px solid #102c50;
  color: #fff;
  background: #102c50;
}

.confirm-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 767px) {
  .contact-confirm h2 {
    font-size: 24px;
  }

  .confirm-item {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 16px 8px;
  }

  .confirm-actions {
    flex-direction: column;
    gap: 12px;
  }

  .confirm-back-button,
  .confirm-send-button {
    width: 100%;
  }
}

/* 送信完了画面 */
.contact-success {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 20px;
  text-align: center;
}

.contact-success h1 {
  margin-bottom: 32px;
  font-size: clamp(24px, 5vw, 32px);
  color: #102e55;
}

.contact-success p {
  margin-bottom: 40px;
  line-height: 2;
}

.contact-success-button {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 8px;
  background: #102e55;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.contact-success-button:hover {
  background: #24558c;
}


/* 送信完了画面：スマートフォン */
@media (max-width: 600px) {

  .contact-success h1 {
    font-size: clamp(20px, 5.5vw, 24px);
    line-height: 1.5;
    text-align: center;
  }

  .contact-success-message {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.9;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .contact-success-button {
    max-width: 100%;
  }
}

.contact-success-message {
  text-align: center;
  line-height: 1.9;
}