/* キーエンススタイルのダウンロードフォーム */

/* リセット */
.download-form-container * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 全体のコンテナ */
.download-form-container {
  min-height: 100vh;
  background-color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ヘッダー */
.keyence-header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
}

/* .logo img {
  height: 30px;
} */

/* メインコンテンツ */
.download-form-main {
  padding: 40px 20px;
}

.form-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
}

/* フォームレイアウト */
.form-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* 左側：ホワイトペーパー情報 */
.whitepaper-info {
  flex: 0 0 350px;
}

.whitepaper-card {
  background: #e8e8e8;
  padding: 20px;
  border-radius: 4px;
}

.whitepaper-image {
  margin-bottom: 15px;
  text-align: center;
}

.whitepaper-image img {
  max-width: 200px;
  height: auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.whitepaper-details h3 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.file-info {
  font-size: 12px;
  color: #666;
}

.file-info span {
  display: block;
  margin-bottom: 5px;
}

/* 右側：フォーム */
.form-content {
  flex: 1;
  background: #fff;
  padding: 30px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-header {
  margin-bottom: 30px;
  border-bottom: 2px solid #e60012;
  padding-bottom: 20px;
}

.form-header h3 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

/* プログレスバー */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 15px;
}

.step-text {
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #e60012;
  transition: width 0.3s ease;
}

/* フォームステップ */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.step-description {
  margin-bottom: 30px;
  line-height: 1.8;
}

.step-description p {
  margin-bottom: 10px;
}

/* フォームグループ */
.form-group {
  margin-bottom: 25px;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.form-group.half {
  flex: 1;
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group label.required::before {
  content: '必須';
  display: inline-block;
  background: #e60012;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  margin-right: 8px;
  border-radius: 2px;
  font-weight: normal;
}

.form-group label .note {
  font-weight: normal;
  color: #666;
  font-size: 12px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #e60012;
}

.form-group input.error {
  border-color: #d32f2f;
}

/* セレクトボックスのスタイル */
.form-group select {
  appearance: none;
  background-image: url('data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2712%27%20height%3D%277%27%20viewBox%3D%270%200%2012%207%27%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%3E%3Cpath%20d%3D%27M1%201l5%205%205-5%27%20stroke%3D%27%23333%27%20stroke-width%3D%271.5%27%20fill%3D%27none%27%20fill-rule%3D%27evenodd%27%2F%3E%3C%2Fsvg%3E');
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

/* ノートボックス */
.note-box {
  background: #f5f5f5;
  padding: 15px;
  margin-bottom: 25px;
  border-radius: 4px;
  font-size: 13px;
  color: #666;
}

/* フォームアクション */
.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 30px;
}

.form-actions button {
  min-width: 120px;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-next,
.btn-confirm,
.btn-submit {
  background: #e60012;
  color: #fff;
}

.btn-next:hover,
.btn-confirm:hover,
.btn-submit:hover {
  background: #cc0010;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-prev {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

.btn-prev:hover {
  background: #f5f5f5;
}

/* フォームフッター */
.form-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.privacy-link {
  margin-top: 10px;
}

.text-link {
  color: #e60012;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* チェックボックス */
.form-checkbox {
  margin-bottom: 25px;
}

.form-checkbox label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  cursor: pointer;
}

.checkbox-note {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  margin-left: 28px;
}

/* フォームノート */
.form-note {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* プライバシー展開リンク */
.privacy-expand {
  margin-bottom: 25px;
}

.expand-link {
  color: #e60012;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

.expand-link::before {
  content: '▶';
  margin-right: 8px;
  font-size: 12px;
}

.expand-link:hover {
  text-decoration: underline;
}

/* 会社名サジェスト */
.company-suggest {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 2px;
}

.suggest-list {
  list-style: none;
}

.suggest-list li {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.suggest-list li:hover {
  background: #f5f5f5;
}

.suggest-list li:last-child {
  border-bottom: none;
}

/* Web会員専用のサービス */
.member-benefits {
  margin-top: 40px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 4px;
}

.member-benefits h4 {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
}

.member-benefits ul {
  list-style: none;
}

.member-benefits li {
  padding-left: 20px;
  margin-bottom: 8px;
  position: relative;
}

.member-benefits li::before {
  content: '✓';
  color: #e60012;
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* フッター */
.keyence-footer {
  background: #333;
  color: #fff;
  padding: 40px 20px 20px;
  margin-top: 60px;
  position: relative;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  height: 30px;
  filter: brightness(0) invert(1);
}

.footer-nav {
  margin-bottom: 20px;
}

.footer-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

.footer-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.copyright {
  font-size: 12px;
  color: #999;
  margin-top: 20px;
}

/* トップへ戻るボタン */
.back-to-top {
  position: absolute;
  right: 40px;
  bottom: 40px;
  width: 60px;
  height: 60px;
  background: #666;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s;
}

.back-to-top:hover {
  background: #888;
  transform: translateY(-2px);
}

/* レスポンシブ */
@media (max-width: 768px) {
  /* メインコンテンツ */
  .download-form-main {
    padding: 20px 10px;
  }

  /* ページタイトル */
  .page-title {
    font-size: 20px;
    margin-bottom: 20px;
  }

  /* フォームレイアウト */
  .form-layout {
    flex-direction: column;
    gap: 20px;
  }

  .whitepaper-info {
    flex: none;
    width: 100%;
  }

  /* フォームコンテンツ */
  .form-content {
    padding: 20px 10px;
  }

  /* フォームヘッダー */
  .form-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }

  .form-header h3 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  /* プログレスバー */
  .progress-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .progress-track {
    width: 100%;
  }

  /* フォームグループ */
  .form-group {
    margin-bottom: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  /* フォームアクション */
  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions button {
    width: 100%;
  }

  /* ノートボックス */
  .note-box {
    padding: 12px;
    font-size: 12px;
  }

  /* フォームフッター */
  .form-footer {
    font-size: 11px;
  }

  /* 会員特典 */
  .member-benefits {
    padding: 15px;
  }

  .member-benefits h4 {
    font-size: 14px;
  }

  /* フッターナビ */
  .footer-nav ul {
    flex-direction: column;
    gap: 10px;
  }

  /* トップへ戻るボタン */
  .back-to-top {
    right: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
  }

  /* ホワイトペーパーカード */
  .whitepaper-card {
    padding: 15px;
  }

  .whitepaper-image img {
    max-width: 150px;
  }

  .whitepaper-details h3 {
    font-size: 14px;
  }
}