/* 既存CSSとの競合を解決するための追加スタイル */
section {
  height: auto !important; /* 既存の height: 100vh を上書き */
  min-height: 100vh;
  z-index: 9;
}

/* フッターの固定を一時的に解除（お問い合わせページのみ） */
body.contact-page .footer {
  position: relative !important;
}

form {
  width: initial !important;
}

#contact_form {
    margin-left: 0 !important;
}


/* モダンデザインのスタイル */
section {
  font-family: 'Hiragino Sans', 'ヒラギノ角ゴシック', 'Yu Gothic', '游ゴシック', 'Meiryo', 'メイリオ', sans-serif;
  line-height: 1.6;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 40px 0;
}

section .w-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  background: none;
  height: auto;
}

section header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 40px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

section h2 {
  color: white !important;
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  text-align: center !important;
  line-height: 1.3 !important;
}

.form {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  overflow: hidden;
}

.content {
  background: none !important;
}

/* 必須バッジのスタイル */
.required-badge {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-form {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: #333 !important;
  font-size: 1rem !important;
}

.content-form th {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white !important;
  padding: 16px 20px !important;
  font-weight: 600 !important;
  text-align: left !important;
  border: none !important;
  text-shadow: none !important;
  font-size: 0.95rem !important;
  width: auto !important;
  border-radius: 8px 8px 0 0;
}

.content-form td {
  padding: 20px !important;
  background: white;
  border: none !important;
  text-shadow: none !important;
  font-size: 0.95rem !important;
  border-radius: 0 0 8px 8px;
  box-sizing: border-box;
}

.content-form tr {
  margin-bottom: 25px;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.content-form th,
.content-form td {
  display: block;
  width: 100%;
}

/* フォーム要素のスタイリング */
.content-form input[type="text"],
.content-form input[type="email"],
.content-form input[type="tel"],
.content-form select,
.content-form textarea {
  width: calc(100% - 4px); /* ボーダー分を差し引く */
  max-width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
  background: white;
  box-sizing: border-box;
  margin: 0;
}

.content-form input[type="text"]:focus,
.content-form input[type="email"]:focus,
.content-form input[type="tel"]:focus,
.content-form select:focus,
.content-form textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.content-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* ボタンのスタイリング */
.form input[type="submit"],
.form input[type="reset"] {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px 5px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.form input[type="reset"] {
  background: #6b7280;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.form input[type="submit"]:hover,
.form input[type="reset"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.form input[type="reset"]:hover {
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
}

.form div[style*="text-align:center"] {
  text-align: center !important;
  width: 100% !important;
  margin-top: 30px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  section {
    padding: 20px 0;
  }

  section .w-container {
    padding: 0 15px;
  }

  section header {
    padding: 20px;
    margin-bottom: 30px;
  }

  section h2 {
    font-size: 2rem !important;
  }

  .form {
    padding: 25px;
    border-radius: 12px;
  }

  .content-form th,
  .content-form td {
    padding: 15px !important;
  }

  .content-form input[type="text"],
  .content-form input[type="email"],
  .content-form input[type="tel"],
  .content-form select,
  .content-form textarea {
    padding: 10px 14px;
    font-size: 0.95rem;
    width: calc(100% - 4px);
    max-width: 100%;
  }

  .form input[type="submit"],
  .form input[type="reset"] {
    padding: 10px 25px;
    font-size: 0.95rem;
    margin: 8px 3px;
  }
}

@media (max-width: 480px) {
  section h2 {
    font-size: 1.8rem !important;
  }

  .form {
    padding: 20px;
  }

  .content-form th,
  .content-form td {
    padding: 12px !important;
  }
}

/* アニメーション */
.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

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

/* フォームのアニメーション */
.form {
  animation: slideInUp 0.8s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
}

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