/* ============================================================
   HARE — カテゴリー（テーマ）記事一覧ページ 専用
   既存トークン（styles.css）・コンポーネント（layout.css）を踏襲
   ※ ヘッダー「記事を探す」展開UI（メガ／アコーディオン）は
      assets/header-nav.css に共通化（全ページ共通）
============================================================ */

/* ---------- パンくず ---------- */
.crumbs {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12.5px; color: var(--muted); letter-spacing: .02em;
}
.crumbs a { color: var(--ink-soft); transition: color .2s; }
.crumbs a:hover { color: var(--blue); }
.crumbs .sep { color: var(--border-2); font-size: 11px; }
.crumbs .crumbs__current { color: var(--ink); font-weight: 500; }

/* ---------- カテゴリーヒーロー ---------- */
.cat-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f1f8fe 52%, #e4f1fb 100%);
}
.cat-hero__bg {
  position: absolute; top: 0; bottom: 0;
  right: max(0px, calc((100% - var(--maxw)) / 2));
  width: min(66%, 920px);
  background: url("../img/cat-hero-themes.webp") no-repeat;
  background-size: contain;
  background-position: right center;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 16%, #000 34%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.6) 16%, #000 34%, #000 100%);
}
.cat-hero__inner { position: relative; z-index: 2; padding-block: 28px 52px; min-height: 372px; }
.cat-hero__text { padding-top: 46px; max-width: 42%; }
.cat-hero__title {
  font-family: var(--font-round);
  font-size: clamp(30px, 4vw, 44px); font-weight: 800;
  letter-spacing: .02em; line-height: 1.2; margin-bottom: 18px;
}
.cat-hero__desc {
  font-size: 14.5px; line-height: 1.95; color: var(--ink-soft);
}

/* ---------- 一覧ヘッダ（記事一覧 + 件数 + 並び替え） ---------- */
.list-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 28px;
}
.list-head__title { display: flex; align-items: baseline; gap: 14px; }
.list-head__title h2 {
  font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: .02em;
}
.list-head__count { font-size: 13px; color: var(--muted); }

/* 並び替えセレクト */
.sortbox { position: relative; }
.sortbox select {
  appearance: none; -webkit-appearance: none;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink);
  background: #fff; border: 1px solid var(--border-2); border-radius: 9px;
  padding: 11px 40px 11px 16px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.sortbox select:hover { border-color: var(--blue); }
.sortbox select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,147,220,.14); }
.sortbox__caret {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px; color: var(--blue); pointer-events: none;
}

/* ---------- 記事グリッド（行間を広めに） ---------- */
.cards--archive { row-gap: clamp(34px, 4vw, 48px); }

/* ---------- ページネーション ---------- */
.pager {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px; margin-top: clamp(40px, 5vw, 58px);
}
.pager__link {
  min-width: 44px; height: 44px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--border-2); border-radius: 9px;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.pager__link:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.pager__link.is-current {
  background: var(--blue); border-color: var(--blue); color: #fff; cursor: default;
}
.pager__link.is-current:hover { transform: none; }
.pager__ellipsis {
  min-width: 28px; text-align: center; color: var(--muted); font-weight: 700;
  letter-spacing: .1em; align-self: flex-end; padding-bottom: 6px;
}
.pager__nav {
  gap: 8px; padding-inline: 16px; min-width: auto;
  display: inline-flex; align-items: center;
}
.pager__nav.is-disabled {
  opacity: .4; pointer-events: none;
}
.pager__nav svg { transition: transform .2s ease; }
.pager__nav--next:hover svg { transform: translateX(3px); }
.pager__nav--prev:hover svg { transform: translateX(-3px); }

/* ============================================================
   レスポンシブ
============================================================ */
@media (max-width: 1000px) {
  .cat-hero__bg { width: min(60%, 720px); }
  .cat-hero__text { max-width: 46%; }
}

@media (max-width: 700px) {
  /* ヒーロー：上にテキスト → 下にイラスト（縦積み） */
  .cat-hero { display: flex; flex-direction: column; }
  .cat-hero__inner { order: 1; min-height: 0; padding-block: 16px 2px; }
  .crumbs { font-size: 11px; }
  .cat-hero__text { padding-top: 34px; max-width: none; }
  .cat-hero__title { font-size: 28px; margin-bottom: 12px; }
  .cat-hero__desc { font-size: 14px; line-height: 1.9; max-width: none; }
  .cat-hero__bg {
    order: 2; position: static; inset: auto; right: auto;
    width: auto; margin: 4px var(--pad) 10px;
    aspect-ratio: 1717 / 916;
    background-size: contain;
    background-position: center bottom;
    -webkit-mask-image: none;
            mask-image: none;
  }

  /* 一覧ヘッダ */
  .list-head { margin-bottom: 18px; }
  .list-head__title { gap: 10px; }
  .sortbox select { padding: 9px 36px 9px 13px; font-size: 13px; }

  /* ページネーション */
  .pager { gap: 6px; margin-top: 34px; }
  .pager__link { min-width: 40px; height: 40px; font-size: 13.5px; }
  .pager__link--wide { display: none; }
  .pager__nav { padding-inline: 12px; }
}
