/* research.php用のスタイル */

/* 基本フォント設定 - かわいいフォント */
body {
  font-family: 'M PLUS Rounded 1c', 'Kosugi Maru', sans-serif;
  color: #333;
  line-height: 1.8;
}

/* 全体コンテナ */
.research-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;  /* 左右のパディングを増やしてスペースを確保 */
}

/* フッター調整 */
.footer {
  background-color: #f5f5f5;
  padding: 20px 0;
  margin-top: 40px;
  border-top: 1px solid #e5e5e5;
  text-align: center;
}

/* ヘッダーセクション */
.research-header {
  margin-bottom: 40px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.research-header h1 {
  font-size: 28px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #333;
  line-height: 1.5;
}

.research-header p {
  font-size: 16px;
  line-height: 1.8;
  color: #666;
  margin-bottom: 10px;
  max-width: 100%;
}

/* 検索部分 - シンプルスタイル */
.research-search {
  display: flex;
  margin-bottom: 25px;
  gap: 10px;
}

#research-search-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
}

#research-search-button {
  padding: 10px 20px;
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  font-family: inherit;
  transition: background-color 0.2s ease;
}

#research-search-button:hover {
  background-color: #e8e8e8;
}

#research-search-button i {
  margin-right: 5px;
}

/* カテゴリーフィルター - シンプルスタイル */
.research-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.research-category-btn {
  padding: 8px 15px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.research-category-btn:hover {
  border-color: #999;
}

.research-category-btn.active {
  background: none;
  color: #333;
  border-color: #333;
  font-weight: 500;
}

/* モバイル用ドロップダウン */
.mobile-category-select {
  display: none;
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  margin-bottom: 25px;
}

/* 研究セクション */
.research-section {
  margin-bottom: 50px;
  background: #fff;
}

.research-section:last-child {
  margin-bottom: 0;
}

.research-section-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.flag {
  font-size: 24px;
  margin-right: 10px;
}

.research-section h2 {
  font-size: 22px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

/* 研究機関テーブル - シンプルスタイル */
.research-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background: #fff;
  border: 1px solid #e5e5e5;
}

.research-table th,
.research-table td {
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

/* 最初のセルに追加の左パディング */
.research-table th:first-child,
.research-table td:first-child {
  padding-left: 30px;
}

/* 最後のセルに追加の右パディング */
.research-table th:last-child,
.research-table td:last-child {
  padding-right: 30px;
}

.research-table th {
  font-weight: 500;
  color: #666;
  font-size: 14px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #e5e5e5;
}

.research-table tr:hover {
  background-color: #fcfcfc;
  transition: background-color 0.2s ease;
}

/* 最後の行のボーダーを削除 */
.research-table tr:last-child td {
  border-bottom: none;
}

.research-name {
  width: 30%;
  font-weight: 600;
}

.research-name a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
  border-bottom: 1px dotted #999;
}

.research-name a:hover {
  color: #000;
  border-bottom-style: solid;
}

.research-desc {
  width: 70%;
  color: #555;
  line-height: 1.5;
}

/* 更新日表示 */
.updated-date {
  font-size: 14px;
  color: #777;
  text-align: right;
  margin-top: 30px;
  font-style: italic;
}

/* 検索結果なしの表示 */
.no-results {
  text-align: center;
  padding: 30px;
  font-size: 16px;
  color: #666;
  background-color: #f9f9f9;
  border-radius: 5px;
  margin-top: 20px;
}

/* コンテンツエリアの背景 */
.research-content {
  background-color: #fafafa;
  padding: 20px;
  border-radius: 8px;
}

/* 広告エリア */
.advertisement-area {
  margin: 40px auto;
  padding: 20px 0;
  max-width: 1200px;
}

.ad-container {
  text-align: center;
  margin: 20px 0;
}

/* レスポンシブ対応 - タブレット */
@media (max-width: 768px) {
  .research-container {
    padding: 15px;
  }
  
  .research-header h1 {
    font-size: 24px;
  }
  
  .research-header p {
    font-size: 14px;
  }
  
  /* 検索ボックスを縦並びに */
  .research-search {
    flex-direction: column;
    gap: 10px;
  }
  
  #research-search-input {
    border-radius: 4px;
    width: 100%;
  }
  
  #research-search-button {
    border-radius: 4px;
    width: 100%;
    justify-content: center;
  }
  
  /* PC用カテゴリーボタンを非表示 */
  .research-categories {
    display: none;
  }
  
  /* モバイル用ドロップダウンを表示 */
  .mobile-category-select {
    display: block;
  }
  
  /* カテゴリボタンを小さく */
  .research-categories {
    gap: 8px;
    justify-content: center;
  }
  
  .research-category-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  /* テーブルをシンプルなリスト形式に変更 */
  .research-table {
    display: block;
  }
  
  .research-table thead {
    display: none;
  }
  
  .research-table tbody {
    display: block;
  }
  
  .research-table tr {
    display: block;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
  }
  
  .research-table tr:last-child {
    border-bottom: none;
  }
  
  .research-table td {
    display: block;
    width: 100%;
    padding: 5px 0;
    border-bottom: none;
  }
  
  .research-name {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .research-name a {
    font-size: 16px;
  }
  
  .research-desc {
    width: 100%;
    font-size: 14px;
  }
}

/* レスポンシブ対応 - モバイル */
@media (max-width: 480px) {
  .research-container {
    padding: 0;
  }
  
  .research-header h1 {
    font-size: 22px;
    padding: 20px 15px 10px;
  }
  
  .research-header p {
    font-size: 14px;
    padding: 0 15px;
    margin-bottom: 20px;
  }
  
  /* フラグアイコンを小さく */
  .flag {
    font-size: 20px;
  }
  
  .research-section h2 {
    font-size: 18px;
  }
  
  /* カテゴリボタンをさらに小さく */
  .research-category-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
  
  /* 検索ボタンのテキストを非表示 */
  #research-search-button span {
    display: none;
  }
  
  #research-search-button i {
    margin-right: 0;
  }
  
  /* リスト内のパディングを調整 */
  .research-table tr {
    padding: 0;
  }
  
  .research-name a {
    font-size: 15px;
  }
  
  .research-desc {
    font-size: 13px;
    line-height: 1.4;
  }
}

/* 小さいモバイル用の追加調整 */
@media (max-width: 360px) {
  /* カテゴリボタンを2行に */
  .research-categories {
    max-width: 100%;
  }
  
  .research-category-btn {
    flex: 0 0 auto;
    min-width: 0;
  }
  
  /* ヘッダーのフォントサイズ調整 */
  .research-header h1 {
    font-size: 18px;
  }
}
