/* index.php用のスタイル */

/* AI技術の概要セクション */
.ai-overview-section {
  background-color: #f5f8ff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border-left: 4px solid #4285f4;
}

.overview-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #2c3e50;
}

.overview-text {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.overview-text .company {
  font-weight: 600;
  color: #4285f4;
}

.overview-text .highlight {
  background-color: rgba(66, 133, 244, 0.1);
  padding: 2px 5px;
  border-radius: 3px;
}

/* ページレイアウト */
.page-layout {
  display: flex;
  gap: 30px;
  width: 100%;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* 検索コンテナ（固定表示） */
.search-container {
  position: sticky;
  top: 10px;
  z-index: 100;
  background-color: transparent; /* 背景色を透明に */
  padding: 15px 0;
  margin-bottom: 20px;
  box-shadow: none; /* 影を削除 */
  border-radius: 8px;
  display: flex;
  justify-content: center; /* 中央配置 */
}

.news-search-bar {
  position: relative;
  max-width: 500px; /* 最大幅を設定（30文字程度に適した幅） */
  width: 100%;
  margin: 0;
}

#newsSearchInput {
  width: 100%;
  padding: 12px 40px 12px 15px;
  background-color: rgba(255, 255, 255, 0.2); /* 半透明の背景 */
  backdrop-filter: blur(8px); /* 背景ぼかし効果 */
  -webkit-backdrop-filter: blur(8px); /* Safari対応 */
  border: 1px solid rgba(255, 255, 255, 0.3); /* 半透明の境界線 */
  border-radius: 10px; /* より丸みのある角 */
  font-size: 16px;
  color: #333;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* 微妙な影 */
}

#newsSearchInput:focus {
  border-color: #4285f4;
  outline: none;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2); /* フォーカス時の影を強調 */
  transform: translateY(-2px); /* 微妙に浮き上がる効果 */
}

.news-search-bar i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #4285f4; /* アイコンの色を変更 */
  font-size: 18px; /* アイコンサイズを大きく */
  transition: color 0.3s;
}

/* 追加：ホバー効果 */
#newsSearchInput:hover {
  border-color: rgba(66, 133, 244, 0.5);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08); /* ホバー時の影を強調 */
}

/* 追加：プレースホルダーテキストのスタイル */
#newsSearchInput::placeholder {
  color: #888;
  opacity: 0.8;
}

/* ******************************************
 * カテゴリフィルタセクション（アコーディオン形式）
 * ****************************************** */
.category-filter-container {
  margin-bottom: 20px; /* 下マージンを縮小 */
  width: 100%; /* 幅を100%に設定 */
  margin-left: 0;
  margin-right: 0;
}

#category-filter-accordion {
  border-radius: 6px; /* 角丸を小さく */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* 影を揃え目に */
  overflow: hidden;
  font-size: 0.9em; /* 全体のフォントサイズを小さく */
}

/* メインカテゴリ（常に表示） */
.main-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px; /* 間隔を縮小 */
  padding: 10px 12px; /* パディングを縮小 */
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.main-categories button {
  padding: 5px 10px; /* ボタンのパディングを縮小 */
  background-color: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
}

.main-categories button:hover {
  background-color: #e8e8e8;
}

.main-categories button.active {
  background-color: #4285f4;
  color: white;
  border-color: #3367d6;
}

/* カテゴリグループ */
.category-group {
  border-bottom: 1px solid #eee;
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px; /* パディングを縮小 */
  background-color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.group-header:hover {
  background-color: #f5f5f5;
}

.group-header span {
  font-weight: 500;
  color: #333;
  font-size: 14px; /* 文字サイズを小さく */
}

.group-header i {
  display: none; /* ドロップダウンアイコンを非表示に */
}

.group-header.active i {
  display: none;
}

.group-content {
  display: none;
  padding: 8px 10px; /* パディングを縮小 */
  background-color: #f9f9f9;
  display: flex;
  flex-wrap: wrap;
  gap: 5px; /* ボタン間の間隔を縮小 */
}

.group-content.show {
  display: flex;
}

.group-content button {
  padding: 4px 8px; /* ボタンのパディングを縮小 */
  background-color: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 12px; /* 少し小さく */
  cursor: pointer;
  font-size: 12px; /* 文字サイズを小さく */
  transition: all 0.3s ease;
  min-width: auto; /* 最小幅を自動に */
  white-space: nowrap; /* テキストの折り返しを防止 */
}

.group-content button:hover {
  background-color: #e8e8e8;
}

.group-content button.active {
  background-color: #4285f4;
  color: white;
  border-color: #3367d6;
}

/* ニュース記事グリッド */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.pagination button {
  padding: 8px 15px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background-color: #e8e8e8;
}

.pagination button.active {
  background-color: #4285f4;
  color: white;
  border-color: #3367d6;
}

.pagination button:disabled {
  background-color: #f5f5f5;
  color: #bbb;
  cursor: not-allowed;
  border-color: #ddd;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .page-layout {
    flex-direction: column;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }

  .main-categories {
    padding: 10px;
  }

  .group-header {
    padding: 12px;
  }

  .group-content {
    padding: 8px 12px;
  }
  
  .news-search-bar {
    max-width: 90%; /* モバイルでは幅を広げる */
  }
}