/* ==========================================================================
   アーカイブ・検索結果 共通スタイル
   ========================================================================== */

/* --------------------------------------------------------------------------
   ページヒーロー（Blog / Archive）
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  height: clamp(200px, 28vw, 340px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.page-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.58) 100%
  );
}

.page-hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(28px, 4.5vw, 52px);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.page-hero__en {
  font-family: var(--font-serif-en);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.page-hero__title {
  font-family: var(--font-serif-en);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 400;
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin: 0;
}

.page-hero__sub {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.1em;
  margin-top: 0.2rem;
}


/* --------------------------------------------------------------------------
   アーカイブヘッダー（検索・フィルターエリア）
   -------------------------------------------------------------------------- */

.archive-hero {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding-top: clamp(36px, 5vw, 56px);
  padding-bottom: clamp(32px, 4vw, 48px);
}

.archive-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.archive-hero__label {
  display: block;
  font-family: var(--font-serif-en);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
}

.archive-hero__title {
  font-family: var(--font-serif-ja);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.06em;
  line-height: 1.4;
  margin: 0;
}

.archive-hero__desc {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.9;
  margin: 0;
}


/* --------------------------------------------------------------------------
   レイアウト
   -------------------------------------------------------------------------- */

.archive-layout {
  background-color: var(--bg-primary);
  padding: clamp(48px, 6vw, 80px) 0 clamp(60px, 8vw, 100px);
}


/* --------------------------------------------------------------------------
   投稿グリッド
   -------------------------------------------------------------------------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}


/* --------------------------------------------------------------------------
   投稿カード
   -------------------------------------------------------------------------- */

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  list-style: none;
  transition: border-color 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.4s ease-out;
}

.post-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.post-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.post-card__link:hover {
  color: inherit;
}

/* サムネイル */
.post-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--bg-secondary);
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease-out;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.04);
}

/* No Image プレースホルダー */
.post-card__no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
}

.post-card__no-image span {
  font-family: var(--font-serif-en);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  opacity: 0.5;
}

/* カテゴリーバッジ */
.post-card__cat {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: var(--text-primary);
  color: var(--text-inverse);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  line-height: 1.6;
  white-space: nowrap;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* その他カスタム投稿タイプ */
.post-card__cat--custom {
  background-color: var(--accent);
}

/* 本文エリア */
.post-card__body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.post-card__date {
  font-family: var(--font-serif-en);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

.post-card__title {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.03em;
  margin: 0;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 640px) {
  .post-card__title {
    font-size: 0.82rem;
  }

  .post-card__body {
    padding: 0.75rem 0.875rem 1rem;
  }
}


/* --------------------------------------------------------------------------
   ページネーション
   -------------------------------------------------------------------------- */

.archive-pagination {
  margin-top: 3.5rem;
  display: flex;
  justify-content: center;
}

.archive-pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}

.archive-pagination .page-numbers li {
  display: flex;
}

.archive-pagination .page-numbers a,
.archive-pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  font-family: var(--font-serif-en);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: border-color 0.3s ease-out, color 0.3s ease-out, background 0.3s ease-out;
}

.archive-pagination .page-numbers a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: transparent;
}

.archive-pagination .page-numbers .current {
  border-color: var(--accent);
  background-color: var(--accent);
  color: #fff;
}

.archive-pagination .page-numbers .dots {
  border: none;
  background: none;
  color: var(--border);
}


/* --------------------------------------------------------------------------
   記事なし
   -------------------------------------------------------------------------- */

.archive-no-posts {
  text-align: center;
  padding: 4rem 0;
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.9;
}
