/*
 * こまめWeb — サイトトップ専用CSS
 * 対応テンプレート: front-page.php
 */

/* ================================================================
   ヒーロー（トップページ）
   ================================================================ */
.kmw-hero {
  width: 100%;
  padding: 64px 48px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.kmw-hero > * { min-width: 0; }

.kmw-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.kmw-hero-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--accent);
}

.kmw-hero-text h1 {
  font-family: 'Kaisei Decol', serif;
  font-size: 46px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: var(--text);
}

.kmw-hero-text h1 .highlight { color: var(--accent); }

.kmw-hero-text p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.9;
  margin-bottom: 32px;
}

/* 検索バー */
.kmw-search-bar {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.kmw-search-bar:focus-within { border-color: var(--accent); }

.kmw-search-bar input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  border-radius: 8px 0 0 8px;
}

.kmw-search-bar input::placeholder { color: var(--text-sub); }

.kmw-search-bar button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0 20px;
  min-width: 72px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 0 6px 6px 0;
}

.kmw-search-bar button:hover { opacity: 0.88; }

/* 注目ゲームパネル */
.kmw-hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  animation: kmwFadeUp 0.55s 0.1s ease both;
}

.kmw-panel-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kmw-panel-header span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-sub);
  text-transform: uppercase;
}

.kmw-panel-header a { font-size: 11px; color: var(--accent); text-decoration: none; font-weight: 500; }

.kmw-featured-game {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s;
}

.kmw-featured-game:last-child { border-bottom: none; }
.kmw-featured-game:hover { background: var(--surface2); }

.kmw-g-icon {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.kmw-g-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.kmw-g-info h3 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.kmw-g-info p  { font-size: 11px; color: var(--text-sub); }

.kmw-g-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.kmw-badge-hot { background: var(--accent2-light); color: var(--accent2); }
.kmw-badge-new { background: var(--accent-light);  color: var(--accent); }

/* ================================================================
   ゲームカードグリッド（ゲーム一覧）
   ================================================================ */
.kmw-games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.kmw-game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 14px;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: kmwFadeUp 0.4s ease both;
}

.kmw-game-card:nth-child(2) { animation-delay: 0.06s; }
.kmw-game-card:nth-child(3) { animation-delay: 0.12s; }

.kmw-game-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.kmw-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.kmw-card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.kmw-card-info { flex: 1; min-width: 0; }
.kmw-card-info h3 { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.kmw-card-info .genre { font-size: 11px; color: var(--text-sub); }

.kmw-game-card .kmw-card-tags { flex-basis: 100%; margin-top: 12px; }
.kmw-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.kmw-ctag {
  font-size: 11px;
  background: var(--bg);
  color: var(--text-sub);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
  border: 1px solid var(--border);
}

/* ================================================================
   最新記事カード（トップページ）
   ================================================================ */
.kmw-articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kmw-article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  text-decoration: none;
  display: grid;
  grid-template-columns: 46px 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: 14px;
  row-gap: 3px;
  transition: background 0.15s, box-shadow 0.15s;
}

.kmw-article-card:hover { background: var(--surface2); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

.kmw-art-icon {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}
.kmw-art-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.kmw-art-tag {
  grid-column: 2;
  grid-row: 1;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  display: inline-block;
  align-self: end;
}

.kmw-article-card h4 { grid-column: 2; grid-row: 2; font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.55; }
.kmw-article-card time { grid-column: 2; grid-row: 3; font-size: 11px; color: var(--text-sub); align-self: start; }

/* ================================================================
   レスポンシブ：サイトトップ（タブレット 641〜768px）
   ================================================================ */
@media (max-width: 768px) and (min-width: 641px) {
  .kmw-hero { grid-template-columns: 1fr; padding: 48px 32px 0; }
  .kmw-hero-text h1 { font-size: 36px; }
  .kmw-section { padding: 0 32px; }
  .kmw-games-grid { grid-template-columns: repeat(2, 1fr); }
  .kmw-articles-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   レスポンシブ：サイトトップ（スマホ 〜640px）
   ================================================================ */
@media (max-width: 640px) {
  .kmw-hero { grid-template-columns: 1fr; gap: 24px; padding: 40px 0 0; }
  .kmw-hero-text { padding: 0 16px; }
  .kmw-hero-panel { margin: 0 16px; }
  .kmw-hero-text h1 { font-size: 32px; }
  .kmw-section { padding: 0 16px; margin-top: 48px; }
  .kmw-games-grid { grid-template-columns: 1fr; }
  .kmw-articles-grid { grid-template-columns: 1fr; }
}
