/* ============================================================
   WorkReview - 検索型企業口コミサイト CSS
   OpenWork/Indeed風 データベース型UI
   ============================================================ */

:root {
  --primary: #1a56db;
  --primary-dark: #1e40af;
  --primary-light: #eff6ff;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-ex: #7f1d1d;
  --caution: #d97706;
  --caution-bg: #fffbeb;
  --safe: #16a34a;
  --safe-bg: #f0fdf4;
  --text: #111827;
  --text-sub: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --bg: #f9fafb;
  --white: #ffffff;
  --star: #f59e0b;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow: 0 2px 8px rgba(0,0,0,.10);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 15px; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-logo {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.5px;
}
.site-logo span { color: var(--danger); }

/* ヘッダー内検索 */
.header-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0 14px;
  gap: 8px;
  transition: border-color .2s;
}
.header-search:focus-within { border-color: var(--primary); background: var(--white); }
.header-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: .9rem;
  padding: 8px 0;
  outline: none;
  font-family: inherit;
}
.header-search button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-sub);
  font-size: 1rem;
  padding: 4px;
  display: flex;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  font-size: .85rem;
  color: var(--text-sub);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav-link:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--primary); font-weight: 700; }

.btn-post {
  background: var(--primary);
  color: var(--white) !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
}
.btn-post:hover { background: var(--primary-dark); text-decoration: none; }

.btn-line {
  background: #06c755;
  color: var(--white) !important;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.btn-line:hover { background: #05a847; text-decoration: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* ============================================================
   HERO（検索型トップ）
   ============================================================ */
.hero-search {
  background: linear-gradient(135deg, #1e3a5f 0%, #1a56db 60%, #2563eb 100%);
  padding: 48px 16px 40px;
  text-align: center;
}
.hero-search h1 {
  color: var(--white);
  font-size: 1.7rem;
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.4;
}
.hero-search h1 em {
  font-style: normal;
  color: #fbbf24;
}
.hero-search p {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  margin-bottom: 24px;
}

/* メイン検索ボックス */
.main-search-box {
  max-width: 640px;
  margin: 0 auto 20px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  overflow: hidden;
}
.main-search-row {
  display: flex;
  align-items: center;
  padding: 4px 4px 4px 16px;
  gap: 8px;
}
.main-search-row input {
  flex: 1;
  border: none;
  font-size: 1.05rem;
  padding: 14px 0;
  outline: none;
  font-family: inherit;
  color: var(--text);
}
.main-search-row input::placeholder { color: var(--text-light); }
.main-search-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: background .2s;
}
.main-search-btn:hover { background: var(--primary-dark); }

/* サジェスト */
.search-suggest {
  position: relative;
}
.suggest-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  display: none;
}
.suggest-list.show { display: block; }
.suggest-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
}
.suggest-item:hover { background: var(--primary-light); }
.suggest-item .suggest-icon { color: var(--text-sub); font-size: .85rem; }

/* 検索サジェストタグ */
.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 640px;
  margin: 0 auto;
}
.search-tag {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .82rem;
  cursor: pointer;
  transition: background .2s;
}
.search-tag:hover { background: rgba(255,255,255,.28); }

/* 統計バー */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; color: var(--white); }
.hero-stat .num {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fbbf24;
  display: block;
  line-height: 1;
}
.hero-stat .lbl { font-size: .78rem; opacity: .85; margin-top: 4px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.page-body { display: grid; grid-template-columns: 1fr 300px; gap: 24px; padding: 28px 0 48px; }
.page-main { min-width: 0; }
.page-side { min-width: 0; }

/* ============================================================
   SECTION
   ============================================================ */
.section { margin-bottom: 32px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}
.section-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title .icon { font-size: 1.1rem; }
.section-more { font-size: .82rem; color: var(--primary); }
.section-more:hover { text-decoration: underline; }

/* ============================================================
   COMPANY CARD（一覧）
   ============================================================ */
.company-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.company-card {
  background: var(--white);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: background .15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.company-card:hover { background: var(--primary-light); text-decoration: none; }

.company-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--primary);
  flex-shrink: 0;
}

.company-info { flex: 1; min-width: 0; }
.company-name {
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.company-meta {
  font-size: .78rem;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.company-industry-tag {
  background: var(--border-light);
  padding: 1px 7px;
  border-radius: 3px;
  font-size: .74rem;
}

.company-score-block {
  text-align: center;
  flex-shrink: 0;
  min-width: 80px;
}
.score-num {
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}
.score-stars { font-size: .8rem; color: var(--star); letter-spacing: -1px; }
.score-count { font-size: .72rem; color: var(--text-sub); margin-top: 2px; }

.black-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: .74rem;
  font-weight: 700;
  text-align: center;
  min-width: 64px;
}
.black-badge.danger-ex { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.black-badge.danger    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.black-badge.caution   { background: var(--caution-bg); color: var(--caution); border: 1px solid #fde68a; }
.black-badge.safe      { background: var(--safe-bg); color: var(--safe); border: 1px solid #bbf7d0; }

/* ============================================================
   ランキングリスト
   ============================================================ */
.ranking-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.ranking-item {
  background: var(--white);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.ranking-item:hover { background: var(--primary-light); }

.rank-num {
  font-size: 1.2rem;
  font-weight: 900;
  min-width: 32px;
  text-align: center;
  color: var(--text-sub);
}
.rank-num.gold   { color: #d97706; }
.rank-num.silver { color: #6b7280; }
.rank-num.bronze { color: #92400e; }

.rank-info { flex: 1; min-width: 0; }
.rank-name { font-size: .92rem; font-weight: 700; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub  { font-size: .76rem; color: var(--text-sub); }

.rank-score {
  font-size: 1.1rem;
  font-weight: 900;
  text-align: right;
  flex-shrink: 0;
}

/* ============================================================
   口コミカード
   ============================================================ */
.review-list { display: flex; flex-direction: column; gap: 12px; }

.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.review-company-name { font-size: .82rem; color: var(--primary); font-weight: 700; }
.review-rating { font-size: .85rem; color: var(--star); font-weight: 700; }
.review-title { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.review-body { font-size: .85rem; color: var(--text-sub); line-height: 1.7; margin-bottom: 10px; }
.review-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .76rem;
  color: var(--text-light);
  flex-wrap: wrap;
}
.review-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.review-tag {
  background: var(--border-light);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: .74rem;
  color: var(--text-sub);
}
.verified-badge {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 700;
}
.helpful-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: .76rem;
  cursor: pointer;
  color: var(--text-sub);
  font-family: inherit;
}
.helpful-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   LINE CTA ブロック
   ============================================================ */
.line-cta {
  background: linear-gradient(135deg, #06c755 0%, #04a844 100%);
  border-radius: var(--radius-lg);
  padding: 20px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.line-cta-icon { font-size: 2.2rem; flex-shrink: 0; }
.line-cta-text { flex: 1; }
.line-cta-text h3 { color: var(--white); font-size: 1rem; font-weight: 900; margin-bottom: 4px; }
.line-cta-text p  { color: rgba(255,255,255,.85); font-size: .82rem; line-height: 1.5; }
.line-cta-btn {
  background: var(--white);
  color: #06c755;
  font-weight: 900;
  font-size: .88rem;
  padding: 10px 18px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  display: block;
}
.line-cta-btn:hover { text-decoration: none; opacity: .9; }

/* 口コミ下LINE */
.review-line-cta {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.review-line-cta p { font-size: .84rem; color: #166534; flex: 1; font-weight: 700; }
.review-line-cta a {
  background: #06c755;
  color: var(--white);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.review-line-cta a:hover { text-decoration: none; background: #04a844; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.sidebar-card-header {
  padding: 12px 14px;
  background: var(--primary);
  color: var(--white);
  font-size: .88rem;
  font-weight: 700;
}
.sidebar-card-header.danger-bg { background: var(--danger); }
.sidebar-card-body { padding: 14px; }

.sidebar-ranking-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  text-decoration: none;
  color: var(--text);
}
.sidebar-ranking-item:last-child { border-bottom: none; }
.sidebar-ranking-item:hover { color: var(--primary); }
.sidebar-rank-num { font-size: .85rem; font-weight: 900; min-width: 20px; color: var(--text-sub); }
.sidebar-rank-num.gold { color: #d97706; }
.sidebar-rank-num.silver { color: #6b7280; }
.sidebar-rank-num.bronze { color: #92400e; }
.sidebar-rank-name { font-size: .84rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-rank-score { font-size: .82rem; font-weight: 700; color: var(--danger); flex-shrink: 0; }

/* 投稿促進 */
.post-cta {
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}
.post-cta h3 { font-size: .95rem; font-weight: 900; color: var(--primary-dark); margin-bottom: 6px; }
.post-cta p  { font-size: .8rem; color: var(--text-sub); margin-bottom: 12px; line-height: 1.6; }
.post-cta .badges { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.post-badge {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .75rem;
  color: var(--text-sub);
  font-weight: 700;
}
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 6px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  width: 100%;
  text-align: center;
}
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }

/* ============================================================
   TABS
   ============================================================ */
.tab-nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text-sub);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  font-family: inherit;
  transition: color .2s;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   COMPANY DETAIL PAGE
   ============================================================ */
.company-detail-header {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.company-detail-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.company-detail-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  background: var(--primary-light);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  flex-shrink: 0;
}
.company-detail-title h1 { font-size: 1.3rem; font-weight: 900; margin-bottom: 6px; }
.company-detail-title .meta { font-size: .82rem; color: var(--text-sub); display: flex; gap: 10px; flex-wrap: wrap; }
.company-detail-title .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.company-tag {
  background: var(--border-light);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .76rem;
  color: var(--text-sub);
}

/* スコアサマリー */
.score-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.score-big { text-align: center; }
.score-big .num { font-size: 3rem; font-weight: 900; line-height: 1; color: var(--primary); }
.score-big .stars { font-size: 1.1rem; color: var(--star); letter-spacing: -1px; margin: 4px 0; }
.score-big .cnt { font-size: .8rem; color: var(--text-sub); }

/* 9項目スコアグリッド */
.score-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  flex: 1;
}
.score-item { text-align: center; }
.score-label { font-size: .74rem; color: var(--text-sub); margin-bottom: 4px; }
.score-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3px;
}
.score-bar-fill { height: 100%; border-radius: 3px; transition: width .6s; }
.score-val { font-size: .82rem; font-weight: 700; }

/* ブラック危険度メーター */
.black-meter-card {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.black-meter-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--danger);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.black-meter-bar-wrap {
  height: 12px;
  background: #fee2e2;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.black-meter-bar {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #fbbf24, #f97316, #dc2626);
  transition: width .8s;
}
.black-meter-footer {
  display: flex;
  justify-content: space-between;
  font-size: .76rem;
  color: var(--text-sub);
}

/* ============================================================
   フォーム（口コミ投稿）
   ============================================================ */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.form-step-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 24px;
}
.form-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-light);
  flex: 1;
  justify-content: center;
}
.form-step.active { color: var(--primary); font-weight: 700; }
.form-step.done   { color: var(--safe); }
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.form-step.active .step-num { background: var(--primary); color: var(--white); }
.form-step.done   .step-num { background: var(--safe);    color: var(--white); }
.step-line { flex: 1; height: 2px; background: var(--border); max-width: 40px; }

.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.form-label .required { color: var(--danger); margin-left: 4px; font-size: .78rem; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

/* 星評価 */
.star-rating { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.star-rating input { display: none; }
.star-rating label {
  font-size: 1.8rem;
  color: var(--border);
  cursor: pointer;
  transition: color .15s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: var(--star); }

/* 匿名トグル */
.anon-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle-switch {
  width: 44px; height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--white);
  border-radius: 50%;
  transition: left .2s;
  box-shadow: var(--shadow-sm);
}
input[type=checkbox]:checked + .toggle-switch { background: var(--primary); }
input[type=checkbox]:checked + .toggle-switch::after { left: 22px; }
input[type=checkbox] { display: none; }

/* ============================================================
   フィルター（検索ページ）
   ============================================================ */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: .76rem; color: var(--text-sub); font-weight: 700; }
.filter-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: .85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); }

.filter-check { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .84rem; color: var(--text-sub); padding-top: 20px; }
.filter-check input { accent-color: var(--danger); width: 15px; height: 15px; }
.filter-check span { font-weight: 700; color: var(--danger); }

.sort-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.sort-label { font-size: .8rem; color: var(--text-sub); white-space: nowrap; }
.sort-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .8rem;
  cursor: pointer;
  background: var(--white);
  color: var(--text-sub);
  font-family: inherit;
  transition: all .15s;
}
.sort-btn:hover { border-color: var(--primary); color: var(--primary); }
.sort-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ============================================================
   ブログ
   ============================================================ */
.blog-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.blog-item {
  background: var(--white);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--text);
}
.blog-item:hover { background: var(--primary-light); }
.blog-cat {
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 3px;
  padding: 2px 8px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 2px;
}
.blog-cat.cat-danger { background: var(--danger-bg); color: var(--danger); }
.blog-cat.cat-legal  { background: #faf5ff; color: #7c3aed; }
.blog-cat.cat-leave  { background: #f0fdf4; color: var(--safe); }
.blog-title { font-size: .9rem; font-weight: 700; margin-bottom: 4px; line-height: 1.5; }
.blog-desc  { font-size: .78rem; color: var(--text-sub); line-height: 1.5; }
.blog-meta  { font-size: .72rem; color: var(--text-light); margin-top: 4px; display: flex; gap: 10px; }

/* ============================================================
   SUCCESS CASES
   ============================================================ */
.case-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.case-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.case-badge {
  background: var(--safe-bg);
  color: var(--safe);
  border: 1px solid #bbf7d0;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 8px;
  display: inline-block;
  margin-bottom: 8px;
}
.case-title { font-size: .88rem; font-weight: 700; margin-bottom: 6px; line-height: 1.5; }
.case-body  { font-size: .78rem; color: var(--text-sub); line-height: 1.6; margin-bottom: 8px; }
.case-meta  { font-size: .74rem; color: var(--text-light); }

/* ============================================================
   パンくずリスト
   ============================================================ */
.breadcrumb {
  padding: 10px 0 16px;
  font-size: .78rem;
  color: var(--text-sub);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-light); }

/* ============================================================
   ページネーション
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 20px 0;
  flex-wrap: wrap;
}
.page-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  cursor: pointer;
  background: var(--white);
  color: var(--text-sub);
  text-decoration: none;
  font-family: inherit;
  transition: all .15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #1f2937;
  color: #9ca3af;
  padding: 32px 0 20px;
  margin-top: 48px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #374151;
  margin-bottom: 20px;
}
.footer-brand .logo { font-size: 1.1rem; font-weight: 900; color: var(--white); margin-bottom: 8px; }
.footer-brand p { font-size: .8rem; line-height: 1.7; }
.footer-nav-title { font-size: .82rem; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.footer-nav-list li + li { margin-top: 6px; }
.footer-nav-list a { font-size: .8rem; color: #9ca3af; }
.footer-nav-list a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .76rem;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom-links { display: flex; gap: 12px; }
.footer-bottom-links a { color: #6b7280; }
.footer-bottom-links a:hover { color: var(--white); text-decoration: none; }

/* ============================================================
   UTILITY
   ============================================================ */
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-sub    { color: var(--text-sub); }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-sub);
  font-size: .9rem;
}

/* TOP専用: カテゴリグリッド */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.category-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: all .15s;
}
.category-item:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; box-shadow: var(--shadow-sm); }
.category-item .cat-icon { font-size: 1.5rem; margin-bottom: 6px; display: block; }
.category-item .cat-name { font-size: .78rem; font-weight: 700; display: block; }
.category-item .cat-count { font-size: .7rem; color: var(--text-sub); display: block; margin-top: 2px; }

/* 検索結果件数 */
.result-count {
  font-size: .85rem;
  color: var(--text-sub);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.result-count strong { color: var(--primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .page-body { grid-template-columns: 1fr; }
  .page-side { order: -1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .score-grid { grid-template-columns: repeat(3, 1fr); }
  .case-list { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  .header-search { display: none; }
  .hamburger { display: flex; }
  .header-nav { display: none; position: fixed; top: 56px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); flex-direction: column; padding: 12px 16px; gap: 4px; box-shadow: var(--shadow-md); }
  .header-nav.open { display: flex; }
  .hero-search h1 { font-size: 1.3rem; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 1.3rem; }
  .company-card { flex-wrap: wrap; }
  .black-badge { display: none; }
  .filter-bar { gap: 8px; }
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .company-detail-top { flex-direction: column; }
  .score-summary { flex-direction: column; align-items: flex-start; }
  .score-grid { width: 100%; }
  .case-list { grid-template-columns: 1fr; }
  .line-cta { flex-direction: column; text-align: center; }
  .main-search-btn { padding: 12px 16px; font-size: .9rem; }
}

@media (max-width: 400px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
