/* ===========================================================
   CRJ WEB — works.css
   制作サンプル一覧ページ専用
   =========================================================== */

/* ===========================================================
   架空サンプル注記バナー (目立たせる)
   =========================================================== */
.disclaimer-banner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 28px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--fg);
  line-height: 1.75;
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.disclaimer-banner strong {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.18em;
  font-size: 11px;
}

/* ===========================================================
   セクション共通
   =========================================================== */
.works-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}

/* ===========================================================
   フィルタバー (業種)
   =========================================================== */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 56px;
  align-items: center;
}

.filter-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-subtle);
  font-weight: 600;
  margin-right: 12px;
}

.filter-pill {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  color: var(--fg);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--fg-muted);
}

.filter-pill.is-active {
  background: var(--fg);
  color: #fff;
  border-color: var(--fg);
}

.filter-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ===========================================================
   Works Grid (4カラム、モバイル時 2→1 カラム)
   =========================================================== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
  align-items: stretch;
}

.work-card {
  color: var(--fg);
  cursor: pointer;
  transition: opacity 0.3s ease;
  /* カード内を縦並びflexにして、底辺(VIEW SAMPLE)を揃える */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.work-card.is-hidden {
  display: none;
}

.work-card-thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: 6px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s ease;
  background: var(--bg-alt);
}

.work-card:hover .work-card-thumb {
  transform: translateY(-6px);
}

/* 実サムネ画像: 常に 4:3 のカバーで統一 */
.work-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.5s ease;
}

.work-card:hover .work-card-img {
  transform: scale(1.03);
}

/* 画像の上に薄いオーバーレイ */
.work-card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.12) 100%);
  z-index: 1;
  pointer-events: none;
}

/* SAMPLE バッジ (右上) */
.work-card-sample-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--fg-muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  padding: 4px 9px;
  border-radius: 3px;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* プランバッジ (右上、SAMPLEバッジの下) */
.work-card-plan-badge {
  position: absolute;
  top: 40px;
  right: 12px;
  background: rgba(17, 17, 17, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.2em;
  padding: 5px 10px;
  border-radius: 3px;
  z-index: 3;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.work-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--fg-subtle);
  letter-spacing: 0.12em;
  font-weight: 500;
  margin-bottom: 10px;
}

.work-card-meta .work-card-industry {
  color: var(--fg);
}

.work-card-title {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 12px;
  transition: color 0.25s ease;
}

.work-card:hover .work-card-title {
  color: var(--accent);
}

.work-card-desc {
  font-size: 12.5px;
  color: var(--fg-muted);
  line-height: 1.85;
  margin-bottom: 16px;
  /* 4行分の高さを最低確保してカード間の底辺を揃える */
  min-height: calc(1.85em * 4);
}

.work-card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  /* タグ以下を下端に押し出して、VIEW SAMPLE を底辺で揃える */
  margin-top: auto;
}

.work-card-tag {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 4px 10px;
}

.work-card-more {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-subtle);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.25s ease;
}

.work-card-more::after {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--fg-subtle);
  transition: background 0.25s ease, width 0.25s ease;
}

.work-card:hover .work-card-more {
  color: var(--accent);
}

.work-card:hover .work-card-more::after {
  background: var(--accent);
  width: 24px;
}

/* 空結果表示 */
.works-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-subtle);
  font-size: 14px;
  letter-spacing: 0.05em;
  display: none;
}

.works-empty.is-visible {
  display: block;
}

/* 下部再掲注記 */
.works-note {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--fg-subtle);
  line-height: 1.8;
  text-align: center;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 900px) {
  .works-section {
    padding: 48px 24px 80px;
  }

  .disclaimer-banner {
    padding: 16px 20px;
    gap: 8px;
    margin-bottom: 8px;
  }

  .filter-bar {
    margin-bottom: 32px;
  }

  .filter-label {
    width: 100%;
    margin-bottom: 8px;
    margin-right: 0;
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 20px;
  }

  .work-card-title {
    font-size: 18px;
  }

  .works-note {
    margin-top: 48px;
  }
}

@media (max-width: 600px) {
  .works-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .work-card {
    /* 1カラム時は高さ自動(底辺揃えの必要なし) */
    height: auto;
  }

  .work-card-desc {
    font-size: 13px;
    /* 1カラム時は min-height 制約を解除 */
    min-height: 0;
  }

  .work-card-tags {
    /* 底辺押し出しは1カラム時不要 */
    margin-top: 0;
  }

  .work-card-title {
    font-size: 20px;
  }
}

/* ===========================================================
   スマホ(≤768px)の本文切れ防止(Bug1)
   PC表示には一切影響を与えない
   =========================================================== */
@media (max-width: 768px) {
  .work-card {
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
  }

  .work-card-desc,
  .work-card-title,
  .work-card-meta {
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: keep-all;
    line-break: strict;
  }

  .work-card-desc {
    padding-right: 4px;
  }

  /* 業種ラベル・プラン名が途中で切れないように */
  .work-card-industry,
  .work-card-meta span {
    white-space: nowrap;
  }
}
