/* ========== 洗練された問い合わせフォーム ========== */

/* コンタクトセクション全体 */
#top_contact {
  padding: 80px 40px;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  border-radius: 20px;
  margin: 40px auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

/* フォーム全体のコンテナ */
.wpcf7 {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  padding: 60px 50px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
}

/* フォーム要素の共通スタイル */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  padding: 16px 20px;
  margin: 8px 0 20px 0;
  border: 2px solid #404040;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  background: #2d2d2d;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-sizing: border-box;
}

/* フォーカス時のスタイル */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  outline: none;
  border-color: #B22222;
  background: #3a3a3a;
  box-shadow: 0 0 0 4px rgba(178, 34, 34, 0.2);
  transform: translateY(-2px);
}

/* テキストエリア */
.wpcf7 textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* ラベル・項目名 */
.wpcf7 label {
  display: block;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  font-size: 15px;
  letter-spacing: 0.5px;
}

/* 必須マーク */
.wpcf7 .required::after {
  content: "*";
  color: #e74c3c;
  margin-left: 4px;
  font-weight: bold;
}

/* 送信ボタン */
.wpcf7 input[type="submit"] {
  background: linear-gradient(135deg, #8B0000 0%, #B22222 100%);
  color: white;
  border: none;
  padding: 18px 60px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 25px rgba(139, 0, 0, 0.3);
  text-transform: uppercase;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

/* 送信ボタンのホバーエフェクト */
.wpcf7 input[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(139, 0, 0, 0.4);
  background: linear-gradient(135deg, #A0001a 0%, #C53030 100%);
}

/* 送信ボタンのアクティブ時 */
.wpcf7 input[type="submit"]:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139, 0, 0, 0.3);
}

/* エラーメッセージ */
.wpcf7-not-valid-tip {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
  display: block;
  font-weight: 500;
}

/* 成功メッセージ */
.wpcf7-mail-sent-ok {
  background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

/* エラーメッセージ全体 */
.wpcf7-mail-sent-ng,
.wpcf7-aborted {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  color: white;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

/* プレースホルダーのスタイル */
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: #888888;
  opacity: 1;
  font-style: italic;
}

/* フォーム項目のグループ化 */
.wpcf7 p {
  margin-bottom: 25px;
}

/* 2列レイアウト（名前とメールなど） */
.wpcf7 .form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.wpcf7 .form-row > p {
  flex: 1;
  margin-bottom: 0;
}

/* モバイル対応 */
@media screen and (max-width: 768px) {
  #top_contact {
    padding: 60px 20px;
    margin: 20px 0;
  }
  
  .wpcf7 {
    padding: 40px 25px;
    margin: 0;
    max-width: 100%;
  }
  
  .wpcf7 .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .wpcf7 input[type="submit"] {
    width: 100%;
    padding: 16px;
  }
}

/* ローディング時のアニメーション */
.wpcf7 .ajax-loader {
  visibility: hidden;
}

.wpcf7.submitting .ajax-loader {
  visibility: visible;
}

/* フォームのフェードイン効果 */
.wpcf7 {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}