/* 資料ダウンロードページ専用CSS */

/* サイドバーを非表示 */
.download .l-sidebar,
#sidebar {
  display: none !important;
}

/* メインコンテンツを全幅に */
.download .l-mainContent {
  max-width: 100% !important;
  width: 100% !important;
}

/* #contentの左右マージンを削除し、横幅いっぱいに */
#content {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* ページ全体のラッパー */
.download-page-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* 全体コンテナ */
#container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* メインコンテナ - 2カラムレイアウト */
.download-container {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  width: 100%;
}

/* 資料説明セクション（左側） */
.document-section {
  flex: 6;
  background-color: #f5f5f5;
  padding: 40px 30px;
  border-radius: 0;
}

.document-title {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
  text-align: left;
}

.document-description {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 30px;
  color: #555;
  white-space: pre-line;
}

/* メイン資料画像 */
.document-main-image {
  margin-bottom: 20px;
  text-align: center;
}

.document-main-image img {
  width: 100%;
  height: auto;
  border: 1px solid #ddd;
}

/* 資料サムネイル一覧 */
.document-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.thumbnail-item figure {
  margin: 0;
  overflow: hidden;
}

.thumbnail-item img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #ddd;
}

/* 資料詳細 */
.document-subtitle {
  font-size: 18px;
  font-weight: bold;
  margin: 20px 0 10px;
  color: #333;
}

.document-detail {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

/* フォームセクション（右側） */
.form-section {
  flex: 4;
  background-color: #fff;
  padding: 0;
}

.form-notice {
  font-size: 14px;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

.required {
  background-color: #e74c3c;
  color: #fff;
  padding: 3px 10px;
  border-radius: 3px;
  font-size: 11px;
  margin-left: 5px;
  font-weight: normal;
}

/* Contact Form 7 フォームスタイル */
.download-form {
  background-color: #fff;
  padding: 0;
}

/* フォームのラベルとフィールド */
.download-form p {
  margin-bottom: 20px;
}

.download-form label {
  display: block;
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 8px;
  color: #333;
}

.download-form input[type="text"],
.download-form input[type="email"],
.download-form input[type="tel"],
.download-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 0;
  font-size: 14px;
  box-sizing: border-box;
  background-color: #fff;
}

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

.download-form input::placeholder,
.download-form textarea::placeholder {
  color: #999;
}

/* チェックボックス */
.download-form input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.download-form .wpcf7-list-item {
  margin: 0;
}

.download-form .wpcf7-list-item-label {
  font-size: 14px;
  color: #333;
}

/* 送信ボタン */
.download-form input[type="submit"],
.download-form .wpcf7-submit,
input.wpcf7-form-control.wpcf7-submit {
  padding: 18px 60px !important;
  font-size: 16px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  margin-top: 20px !important;
  width: 100% !important;
  max-width: 100% !important;
  background-color: #ffffff !important;
  background-image: none !important;
  background: #ffffff !important;
  color: #1976d2 !important;
  border: 2px solid #1976d2 !important;
  outline: none !important;
  box-shadow: none !important;
  transition: all 0.3s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.download-form input[type="submit"]:hover,
.download-form .wpcf7-submit:hover {
  background-color: #1976d2 !important;
  background-image: none !important;
  background: #1976d2 !important;
  color: #fff !important;
  border: 2px solid #1976d2 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Contact Form 7 エラーメッセージ */
.download-form .wpcf7-not-valid-tip {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
}

.download-form .wpcf7-validation-errors {
  border: 2px solid #e74c3c;
  padding: 15px;
  margin-top: 20px;
  background-color: #ffeaea;
  color: #e74c3c;
}

.download-form .wpcf7-response-output {
  margin-top: 20px;
  padding: 15px;
  border: 2px solid #27ae60;
  background-color: #e8f8f5;
  color: #27ae60;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .download-container {
    flex-direction: column;
    gap: 30px;
  }

  .form-section {
    flex: 1 1 auto;
    width: 100%;
  }

  .document-section {
    width: 100%;
  }
}

@media (max-width: 768px) {
  #container {
    padding: 30px 15px;
  }

  .document-section {
    padding: 30px 20px;
  }

  .form-section {
    padding: 0;
  }

  .document-thumbnails {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .document-title {
    font-size: 20px;
  }

  .form-notice {
    text-align: left;
  }
}

@media (max-width: 480px) {
  #container {
    padding: 20px 10px;
  }

  .document-section {
    padding: 20px 15px;
  }

  .document-title {
    font-size: 18px;
  }

  .document-thumbnails {
    grid-template-columns: 1fr;
  }

  .download-form input[type="submit"],
  .download-form .wpcf7-submit {
    padding: 15px 30px;
  }
}