/* ==========================================
   projects.css
   実績・製品紹介一覧ページ固有スタイル
   ========================================== */

body {
  padding-top: 80px;
}

@media (max-width: 560px) {
  body {
    padding-top: 64px;
  }
}

/* ──────────────────────────────────────
   リードテキスト
────────────────────────────────────── */
.projects-lead {
  background-color: #fff;
  padding: 48px 0 72px;
}

.projects-lead__text {
  font-family: "Shippori Mincho", serif;
  font-size: 34px;
  font-weight: 600;
  color: #1d2e45;
  letter-spacing: 1px;
  line-height: 1.75;
  /* テキストブロックを画面中央に置き、行頭は左揃え（デザインどおり） */
  width: fit-content;
  max-width: calc(100% - 64px);
  padding: 0;
  margin: 0 auto;
  text-align: left;
}

.projects-lead__break--sp {
  display: none;
}

@media (max-width: 560px) {
  .projects-lead {
    padding-bottom: 30px;
  }

  .projects-lead__text {
    font-size: 24px;
    letter-spacing: normal;
    line-height: 36px;
    width: auto;
    max-width: none;
    padding: 0 22px;
    margin: 0;
  }

  .projects-lead__break--pc {
    display: none;
  }

  .projects-lead__break--sp {
    display: inline;
  }
}

/* ──────────────────────────────────────
   グレー背景エリア
────────────────────────────────────── */
.projects-bg {
  background-color: #f1f3f4;
  padding: 80px 0 100px;
}

.projects-inner {
  max-width: 1073px;
  margin: 0 auto;
}

/* ──────────────────────────────────────
   フィルタータブ
────────────────────────────────────── */
.projects-filter {
  /* アンカー移動時、固定ヘッダーに隠れないよう余白を確保 */
  scroll-margin-top: 100px;
}

@media (max-width: 560px) {
  .projects-filter {
    scroll-margin-top: 80px;
  }
}

.projects-filter__tabs {
  display: flex;
  gap: 12px;
}

.projects-filter__tab {
  flex: 1;
  height: 72px;
  background-color: #fff;
  border: none;
  cursor: pointer;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1d2e45;
  letter-spacing: 0.54px;
  line-height: 1.5;
  text-align: center;
  padding: 0 8px;
  position: relative;
  transition: opacity 0.2s;
}

.projects-filter__tab-break--sp {
  display: none;
}

@media (max-width: 560px) {
  .projects-filter__tabs {
    flex-wrap: wrap;
    gap: 11px 10px;
    padding-bottom: 15px;
  }

  .projects-filter__tab {
    flex: 0 1 auto;
    height: auto;
    min-height: 52px;
    box-sizing: border-box;
    padding: 5px 15px;
    font-feature-settings: normal;
    font-size: 14px;
    letter-spacing: 0.42px;
  }

  .projects-filter__line {
    margin-top: 15px;
    background-color: #07344d;
  }

  .projects-grid {
    margin-top: 50px;
  }

  .projects-inner {
    padding: 0 22px;
  }

  .projects-filter__tab-break--sp {
    display: inline;
  }
}

.projects-filter__tab:hover {
  opacity: 0.75;
}

.projects-filter__tab--active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #1d2e45;
}

.projects-filter__line {
  height: 1px;
  background-color: rgba(29, 46, 69, 0.2);
  margin-top: 0;
}

/* ──────────────────────────────────────
   カードグリッド
────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 331px));
  column-gap: 40px;
  row-gap: 50px;
  margin-top: 50px;
  justify-content: center;
}

/* ──────────────────────────────────────
   プロジェクトカード
────────────────────────────────────── */
.project-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 331px;
  box-sizing: border-box;
  text-decoration: none;
  border: 2px solid #f1f3f4;
  background-color: #fff;
  transition: box-shadow 0.3s;
}

.project-card:hover {
}

.project-card__img-wrap {
  width: 100%;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}

.project-card__img {
  display: block;
  width: 100%;
  height: 160px !important;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card__img {
  transform: scale(1.04);
}

.project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 30px 10px;
  background-color: #fff;
  min-height: 158px;
}

.project-card__title {
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  font-weight: 700;
  color: #222a68;
  letter-spacing: 0.72px;
  line-height: 1.6;
  margin: 0 0 8px;
}

.project-card__desc {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #191e2e;
  letter-spacing: 0.45px;
  line-height: 1.5;
  margin: 0;
}

.project-card__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Shippori Mincho", serif;
  font-size: 14px;
  font-weight: 600;
  color: #07344d;
  letter-spacing: 0.42px;
  line-height: 1.6;
  margin-top: auto;
  padding-top: 12px;
  align-self: flex-end;
  text-decoration: none;
}

@media (max-width: 560px) {
  .project-card__link {
    margin-top: 0;
    padding-top: 17px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project-card__body {
    padding-bottom: 10px;
  }

  .project-card {
    width: 100%;
    max-width: none;
  }
}

.project-card__arrow {
  width: 16px;
  height: 7px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

/* スマホ用の矢印（Figma: 20×8 の塗り矢印）。PCでは非表示 */
.project-card__arrow--sp {
  display: none;
}

@media (max-width: 560px) {
  .project-card__link {
    gap: 15px;
  }

  .project-card .project-card__arrow {
    display: none;
  }

  .project-card .project-card__arrow--sp {
    display: block;
    width: 20px;
    height: 8px;
  }
}

.project-card:hover .project-card__arrow {
  transform: translateX(5px);
}

/* ──────────────────────────────────────
   ページネーション
────────────────────────────────────── */
.projects-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 80px;
}

.projects-pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid #07344d;
  cursor: pointer;
  color: #1d2e45;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.projects-pagination__btn:hover {
  background-color: #1d2e45;
  color: #fff;
}

.projects-pagination__btn img {
  width: 16px;
  height: 14px;
  display: block;
  transition: filter 0.2s;
}

.projects-pagination__btn:hover img {
  filter: brightness(0) invert(1);
}

.projects-pagination__page,
.projects-pagination__ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #0e212f;
  background-color: transparent;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.projects-pagination__page:hover {
  background-color: #e8ecf0;
}

.projects-pagination__page--active {
  background-color: #1d2e45;
  color: #fff;
  cursor: default;
}

.projects-pagination__page--active:hover {
  background-color: #1d2e45;
}

.projects-pagination__ellipsis {
  cursor: default;
  background-color: transparent;
  font-size: 16px;
  letter-spacing: 2px;
}

.projects-pagination__ellipsis:hover {
  background-color: transparent;
}

@media (max-width: 560px) {
  .projects-bg {
    padding-top: 30px;
    padding-bottom: 50px;
  }

  .projects-pagination {
    margin-top: 50px;
  }
}


/* ──────────────────────────────────────
   WordPress化に伴う補足
   （タブ・ページ送りを <button> → <a> にしたための調整）
────────────────────────────────────── */
a.projects-filter__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
a.projects-pagination__btn,
a.projects-pagination__page {
  text-decoration: none;
}
.projects-pagination__btn--disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}
.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 15px;
  color: #1d2e45;
  padding: 40px 0;
}
@media (max-width: 560px) {
  a.projects-filter__tab {
    display: inline-flex;
  }
}


/* ──────────────────────────────────────
   タブレット幅（561px〜）のはみ出し防止
   PC（1121px以上）の見た目は変更なし
────────────────────────────────────── */
@media (min-width: 561px) and (max-width: 1120px) {
  .projects-inner {
    padding: 0 20px;
    box-sizing: border-box;
  }
}
@media (min-width: 561px) and (max-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 331px));
  }
}

/* カード説明文の改行指定（[sp]＝スマホだけ改行／[pc]＝PCだけ改行） */
.project-card__break--sp {
  display: none;
}

@media (max-width: 560px) {
  .project-card__break--sp {
    display: inline;
  }

  .project-card__break--pc {
    display: none;
  }
}
