/* ============================================
   CONTACT.CSS - contact.html専用BEMスタイル
   Block prefix: ct- (Contact)
   ============================================ */

/* ---------- Section ---------- */
.ct-section {
  padding: 120px 0 240px 0;
  background: var(--color-bg-white);
  border-radius: clamp(80px, calc(80px + (100vw - 320px) / 10), 400px) 0 0 0;
}

/* ---------- Phone Button ---------- */
.ct__phone {
  display: block;
  width: 100%;
  margin: 0 auto 24px;
  padding: 24px 40px;
  background: var(--color-primary);
  color: var(--color-bg-white);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.1rem;
  text-align: center;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.ct__phone:hover {
  background: var(--color-primary);
  box-shadow: 0 8px 24px rgba(25, 192, 215, 1)
}

/* ---------- Fax ---------- */
.ct__fax {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.1rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

/* ---------- Phone Note ---------- */
.ct__note {
  text-align: center;
  font-size: clamp(0.85rem, calc(0.23vw + 0.80rem), 1.00rem);
  font-weight: 500;
  letter-spacing: 0.1rem;
  color: var(--color-primary);
  margin-bottom: 120px;
}

.ct__note .note-br {
  display: none;  /* ← 1280px以上では改行を非表示 */
}

/* ---------- Content Wrap ---------- */
.ct__content {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

/* ---------- Form ---------- */
.ct__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ---------- Form Row ---------- */
.ct__row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

/* ---------- Form Label ---------- */
.ct__label {
  flex-shrink: 0;
  width: 180px;
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  padding-top: 12px;
}

/* ---------- Required Badge ---------- */
.ct__required {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #e74c3c;
  background: #fdeaea;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* ---------- Form Input ---------- */
.ct__input {
  flex: 1;
  padding: 20px 16px;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: clamp(0.85rem, calc(0.23vw + 0.80rem), 1.00rem);
  letter-spacing: 0.1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ct__input:focus {
  outline: none;
  border-color: #19c0d7;
  box-shadow: 0 0 0 3px rgba(25, 192, 215, 0.1);
}

.ct__input::placeholder {
  color: #999;
}

/* ---------- Form Textarea ---------- */
.ct__textarea {
  flex: 1;
  padding: 20px 16px;
  background: #f5f5f5;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: clamp(0.85rem, calc(0.23vw + 0.80rem), 1.00rem);
  min-height: 120px;
  letter-spacing: 0.1rem;
  resize: vertical;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ct__textarea:focus {
  outline: none;
  border-color: #19c0d7;
  box-shadow: 0 0 0 3px rgba(25, 192, 215, 0.1);
}

.ct__textarea::placeholder {
  color: #999;
}

/* ---------- Privacy Box ---------- */
.ct__privacy {
  margin: 40px 0 24px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

/* ---------- Privacy Title ---------- */
.ct__privacy-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  padding: 16px 24px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

/* ---------- Privacy Content ---------- */
.ct__privacy-content {
  padding: 24px;
  font-size: clamp(0.85rem, calc(0.08vw + 0.83rem), 0.90rem);
  line-height: 1.7;
  color: #555;
  max-height: 200px;
  overflow-y: auto;
}

.ct__privacy-content p:not(.ct__privacy-section-title) {
  margin-bottom: 20px;
}

.ct__privacy-content > p:first-of-type {
  padding-bottom: 24px;
  margin-bottom: 0;
}

/* ---------- Privacy Section ---------- */
.ct__privacy-section {
  margin-bottom: 20px;
}

/* ---------- Privacy Section Title ---------- */
.ct__privacy-section-title {
  font-size: clamp(0.90rem, calc(0.30vw + 0.83rem), 1.10rem);
  font-weight: 600;
  color: #222;
  margin-bottom: 16px;
}

/* ---------- Agree Checkbox ---------- */
.ct__agree {
  text-align: center;
  margin-bottom: 32px;
}

/* ---------- Checkbox Label ---------- */
.ct__checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #222;
  cursor: pointer;
}

/* ---------- Checkbox Input ---------- */
.ct__checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* ---------- Submit Button ---------- */
.ct__submit {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 24px 48px;
  background: linear-gradient(
    90deg,
    #ff6fa3 0%,
    #f78acb 8%,
    #c7a6ff 16%,
    #8bb8ff 26%,
    #7fd4d8 58%,
    #36c1d6 70%,
    #2fa7e0 85%,
    #5fa3d4 100%
  );
  background-size: 0% 100%;
  background-position: left center;
  background-color: #C0C0C0;
  background-repeat: no-repeat;
  color: var(--color-bg-white);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: background-size 0.4s ease-in-out;
}

.ct__submit:hover {
  background-size: 100% 100%;
}

/* ============================================
   RESPONSIVE
   ============================================ */
/* 1280px以下で縦積み・改行表示 */
@media (max-width: 1280px) {
  .ct__note {
    margin-bottom: 80px;  /* ← 120pxから80pxに縮小 */
  }

  .ct__note .note-br {
    display: inline;
  }

  .ct__content {
    flex-direction: column;
    gap: 24px;
  }

  .ct__row {
    flex-direction: column;
    gap: 8px;
  }

  .ct__error {
    margin-left: 0;    /* ← 縦積み時はmargin-left不要 */
    margin-top: -28px; /* ← .ct__formのgap(32px)を4pxに調整 */
  }

  .ct__label {
    width: 100%;
    padding-top: 0;
  }

  .ct__input,
  .ct__textarea {
    width: 100%;
  }
}

/* ---------- Form Validation Error Messages ---------- */
.ct__error {
  color: #e74c3c;
  font-size: 0.8rem;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: -28px;   /* ← .ct__formのgap(32px)を4pxに調整（32-28=4px） */
}

/* 1280px以上：エラーメッセージを入力欄と左端揃え */
@media (min-width: 1281px) {
  .ct__error {
    margin-left: 220px;  /* ← .ct__label幅(180px) + gap(40px) */
    width: calc(100% - 220px);
  }
}

/* チェックボックスのエラー：中央揃え */
.ct__agree + .ct__error {
  text-align: center;
  justify-content: center;
  align-self: center;
  margin-left: 0;
  margin-top: -64px;  /* ← .ct__agreeのmargin-bottom(32px) + .ct__formのgap(32px) - 4px = 60px打ち消し */
  width: auto;
  max-width: 100%;
}

/* ============================================
   RESPONSIVE: 768px以下でセクション余白調整
   ============================================ */
@media (max-width: 768px) {
  .ct-section {
    padding: 120px 0;
  }

  .ct__submit {
    background: linear-gradient(
      135deg,
      #ff6fa3 0%,
      #f78acb 8%,
      #c7a6ff 16%,
      #8bb8ff 26%,
      #d9d9d9 36%,
      #bfc7cc 46%,
      #7fd4d8 58%,
      #36c1d6 70%,
      #2fa7e0 85%,
      #5fa3d4 100%
    );
    background-size: 100% 100%;
    background-color: transparent;
    transition: none;
  }

  .ct__submit:hover {
    background-size: 100% 100%;
  }
}

/* ============================================
   SP-BR: スマホサイズでの改行制御
   ============================================ */
/* 821px以上：改行を非表示 */
@media (min-width: 821px) {
  .sp-br {
    display: none;
  }
}

/* 820px以下：改行を表示 */
@media (max-width: 820px) {
  .sp-br {
    display: inline;
  }
}
