/* ====================
   ベーススタイル
   ==================== */
.examples {
  background-color: #f3f8fd;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0; /* 基準となるz-indexを設定 */
}

/* ▼ カードクリックを可能にするために追加 */
.example-card {
  position: relative; /* 内部のリンクを絶対配置するために必要 */
  display: flex;
  flex-direction: column;
  padding: 40px;
  background: #fff;
  border-radius: 28px;
  min-width: 250px;
  gap: 10px;
  flex: 1 0 0;
}

.example-card-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 背景や余白は不要 */
  z-index: 2; /* カード内の他要素の上にくるように */
  text-indent: -9999px; /* テキストがあれば視覚的に隠す場合 */
  overflow: hidden;
}

/* ▼ 「カードホバー」アニメーションは従来通り: 上に少し浮く */
.example-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.example-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.example-card:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ▼ 「一覧を見る」ボタンのみ、ホバー時に右へ動く */
.view-all-button {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.view-all-button:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.view-all-button:active {
  transform: translateX(0);
  box-shadow: none;
}

/* クリック時（active時）に少し押し込むような演出 */
.example-card:active,
.view-all-button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* コンテンツを前面に配置 */
.examples-content,
.examples-logo-grid,
.examples-cards-grid,
.view-all-button-container {
  position: relative;
  z-index: 2; /* shapesより前面に配置 */
}

.examples-container {
  width: 100%;
  padding-top: 90px;
}

.examples-content {
  display: flex;
  align-items: center;
  padding: 0 100px 0 90px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* タイポグラフィー */
.examples-title {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 8px;
  white-space: nowrap;
}

.examples-subtitle {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
}

.examples-description {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 3px;
}

/* レイアウト要素 */
.examples-grid-line {
  margin: 0 28px;
  flex-shrink: 0;
  width: 4px;
  height: 100px;
}

.examples-text-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ロゴグリッド */
.examples-logo-grid {
  display: grid;
  margin: 30px auto 0;
  width: calc(100% - 40px);
  max-width: 1300px;
  gap: clamp(20px, 3vw, 55px) clamp(20px, 2vw, 37px);
  justify-content: center;
}

.logo-item {
  width: 100%;
  aspect-ratio: 223/89;
  background: #d9d9d9;
}

/* カードグリッド */
.examples-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 60px 90px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

/* カードコンポーネント */
.example-card {
  display: flex;
  flex-direction: column;
  padding: 40px;
  background: #fff;
  border-radius: 28px;
  min-width: 250px;
  gap: 10px;
  flex: 1 0 0;
}

.card-divider {
  display: flex;
  padding-bottom: 4px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-bottom: 2px solid #333;
}

.example-card-tag {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 3.2px;
}

.tag-icon {
  width: 26px;
  height: 26px;
}

.example-card-title {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 19px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 4px;
}

/* カテゴリー */
.example-card-categories,
.example-card-services {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-label {
  color: #333;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 3.2px;
}

.category-tags {
  display: flex;
  flex-wrap: wrap; /* 追加: コンテンツが溢れる場合は折り返す */
  gap: 8px;
  margin-bottom: 8px; /* 追加: 行が折り返された時の下部スペース確保 */
}

.category-tag {
  display: inline-flex;
  padding: 2px 12px;
  justify-content: center;
  align-items: center;
  border-radius: 100px;
  background: #28a7e1;
  color: #fff;
  font-family: "BIZ UDGothic";
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 2.4px;
  white-space: nowrap; /* 追加: タグ内のテキストは折り返さない */
}

/* すべてを見るボタン */
.examples .view-all-button-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-bottom: 210px;
}

.examples .view-all-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 51px;
  background: #333;
  text-decoration: none;
  height: 50px;
  min-width: 295px;
  padding: 0 20px;
  position: relative;
}

.view-all-button span {
  color: #fff;
  text-align: center;
  font-family: "BIZ UDGothic";
  font-size: 16px;
  font-weight: 700;
  line-height: 28.9px;
  letter-spacing: 3.2px;
}

.examples .arrow-icon {
  width: 20.4px;
  height: 20.4px;
}

/* 4枚目のカードはデフォルトでは非表示にする */
.example-card.extra-card {
  display: none;
}

/* ====================
   メディアクエリ
   ==================== */

/* 大画面デスクトップ (1401px以上) */
@media screen and (min-width: 1401px) {
  .examples-logo-grid {
    grid-template-columns: repeat(5, minmax(180px, 223px));
  }

  .example-card.extra-card {
    display: none;
  }
}

/* デスクトップ (1400px以下) */
@media screen and (max-width: 1400px) {
  .examples-logo-grid {
    grid-template-columns: repeat(4, minmax(180px, 223px));
  }

  .example-card.extra-card {
    display: flex;
  }

  .examples-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-tag {
    padding: 5px 12px;
  }
}

/* 小型デスクトップ (1200px以下) */
@media screen and (max-width: 1200px) {
  .examples-logo-grid {
    grid-template-columns: repeat(3, minmax(180px, 223px));
  }

  .examples-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 40px 60px;
  }
}

/* タブレット (1004px以下) */
@media screen and (max-width: 1004px) {
  .examples-container {
    padding-top: 40px;
    padding-bottom: 70px;
  }

  .examples-content {
    position: relative;
    padding: 82px 20px 0 106px;
    flex-direction: column;
    align-items: flex-start;
  }

  .examples-grid-line {
    position: absolute;
    left: 80px;
    top: 40px;
    margin: 0;
    height: 100%;
  }

  .examples-title {
    font-size: 16px;
    letter-spacing: 6px;
    white-space: normal;
    margin: 0 0 13px 0;
  }

  .examples-text-container {
    width: 100%;
    gap: 0;
  }

  .examples-subtitle {
    font-size: 12px;
    letter-spacing: 2px;
    line-height: 1.5;
    margin-bottom: 4px;
  }

  .examples-description {
    font-size: 10px;
    line-height: 24px;
    letter-spacing: 2px;
  }
}

/* 小型タブレット (900px以下) */
@media screen and (max-width: 900px) {
  .examples .view-all-button {
    justify-content: flex-start;
    gap: 11px;
    background: #333;
    text-decoration: none;
    height: 42px;
    min-width: 237px;
    padding: 0 20px;
    padding-left: 60px;
  }
  .examples-logo-grid {
    grid-template-columns: repeat(2, minmax(160px, 180px));
  }
}

/* 大型モバイル (768px以下) */
@media screen and (max-width: 768px) {
  .examples .view-all-button {
    justify-content: flex-start;
    gap: 11px;
    background: #333;
    text-decoration: none;
    height: 40px;
    min-width: 221px;
    padding: 0 20px;
    padding-left: 60px;
  }

  .category-tag {
    display: inline-flex;
    padding: 0px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 100px;
    background: #28a7e1;
    color: #fff;
    text-align: center;
    font-family: "BIZ UDGothic";
    font-size: 8px;
    font-style: normal;
    font-weight: 700;
    line-height: 19px; /* 350% */
    letter-spacing: 1.6px;
  }
  .category-label {
    color: #333;

    font-family: "BIZ UDGothic";
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 28px; /* 280% */
    letter-spacing: 2px;
  }
  .tag-icon {
    width: 20px;
    height: 20px;
  }
  .example-card-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333;
    font-family: "BIZ UDGothic";
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 21px; /* 210% */
    letter-spacing: 2px;
  }
  .example-card-title br {
    display: none;
  }
  .example-card-title {
    color: #333;
    font-family: "BIZ UDGothic";
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 22px; /* 183.333% */
    letter-spacing: 2.4px;
  }
  .view-all-button span {
    color: #fff;
    text-align: center;
    font-family: "BIZ UDGothic";
    font-size: 12px;
    font-weight: 700;
    line-height: 21.675px;
    letter-spacing: 2.4px;
  }
  .examples-cards-grid {
    grid-template-columns: 1fr;
    padding: 30px 35px;
  }

  .example-card {
    padding: 27px;
  }

  .card-divider {
    padding-bottom: 15px;
  }

  .view-all-button-container {
    margin-top: 50px;
    padding-bottom: 60px;
  }

  .view-all-button {
    min-width: 230px;
  }

  .arrow-icon {
    margin-right: 32px;
  }
}

/* モバイル (600px以下) */
@media screen and (max-width: 600px) {
  .examples-logo-grid {
    grid-template-columns: repeat(2, minmax(140px, 160px));
    gap: 20px 15px;
  }
}

/* 小型モバイル (490px以下) */
@media screen and (max-width: 490px) {
  .category-tags {
    display: flex;
    gap: 12px;
  }
  .example-card-categories,
  .example-card-services {
    gap: 0px;
  }
  .examples-cards-grid {
    gap: 10px;
  }
  .examples .arrow-icon {
    width: 18.4px;
    height: 18.4px;
  }
  .arrow-icon {
    margin-right: 8px;
  }
  .examples {
    min-height: auto;
  }

  .examples-container {
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .examples-content {
    padding: 30px 56px 20px 70px;
  }

  .examples-grid-line {
    left: 35px;
    top: -13px;
    height: 195px;
    width: 5px;
  }

  .examples-title {
    font-size: 20px;
    letter-spacing: 4px;
    margin-bottom: 14px;
  }

  .examples-subtitle {
    font-size: 12px;
    letter-spacing: 1.5px;
  }

  .examples-description {
    font-size: 10px;
    line-height: 20px;
    letter-spacing: 1.3px;
  }

  .examples-text-container {
    gap: 10px;
  }

  .view-all-button-container {
    margin-top: 40px;
    padding-bottom: 40px;
  }

  .view-all-button {
    min-width: 230px;
    height: 38px;
  }
}

/* Top works cards: keep tags visually secondary to the card title. */
body.home .example-card-tag {
  gap: 8px;
  color: #555;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 1.4px;
}

body.home .example-card-tag .tag-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

@media (max-width: 768px) {
  body.home .example-card-tag {
    gap: 7px;
    font-size: 9px;
    line-height: 1.6;
    letter-spacing: 1.1px;
  }

  body.home .example-card-tag .tag-icon {
    width: 16px;
    height: 16px;
  }
}

/* Top works cards: redesign lower metadata area. */
body.home .example-card-categories,
body.home .example-card-services {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body.home .category-label {
  color: #333;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 1.2px;
}

body.home .category-tags {
  gap: 8px 10px;
  margin-bottom: 4px;
}

body.home .category-tag {
  min-height: 28px;
  padding: 3px 13px;
  background: #fff;
  border: 1px solid #006aff;
  color: #006aff;
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.8px;
}

body.home .example-card-categories .category-tag {
  background: #4d9bff;
  border-color: #4d9bff;
  color: #fff;
}

body.home .example-card-detail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  color: #ff1f2d;
  font-family: "BIZ UDGothic";
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.2px;
}

body.home .detail-cta-arrow {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid #ff1f2d;
  border-radius: 50%;
  color: #ff1f2d;
  font-size: 17px;
  letter-spacing: 0;
}

@media (max-width: 768px) {
  body.home .category-label {
    font-size: 12px;
    letter-spacing: 0.8px;
  }

  body.home .category-tag {
    min-height: 26px;
    padding: 3px 11px;
    font-size: 11px;
  }

  body.home .example-card-detail-cta {
    font-size: 13px;
  }

  body.home .detail-cta-arrow {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
}
