.case {
  padding: 13px 0 96px;
}

.case_hamburger {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  color: #000;
  a {
    text-decoration: underline;
  }
}

.case_hamburger_list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.case_hamburger_item {
  display: flex;
  gap: 6px;
  align-items: center;
}

@media screen and (max-width: 769px) {
  .case_hamburger {
    font-size: 12px;
    line-height: 24px;
    text-align: left;
    color: #000;
  }

  .case_hamburger_item {
    img {
      width: 12px;
      height: 12px;
    }
  }
}

.case_fv {
  margin-top: 11px;
}

.case_fv-hgroup {
  width: 100%;
  height: 140px;
  background: #f4f4f5;
  display: grid;
  place-content: center;
}

.case_fv-heading {
  font-weight: bold;
  font-size: 30px;
  line-height: 33px;
  text-align: center;
  color: #000;
}

.case_fv-sub-heading {
  margin-top: 14px;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #000;
}

@media screen and (max-width: 769px) {
  .case_fv {
    margin-top: 24px;
  }

  .case_fv-hgroup {
    padding: 15px 0 10px;
    height: 76px;
    display: block;
    height: auto;
  }

  .case_fv-heading {
    font-size: 24px;
  }

  .case_fv-sub-heading {
    margin-top: 4px;
    font-size: 16px;
  }
}

.case_tags {
  margin-top: 50px;
}

.case_accordion {
  border-radius: 26px;
  background: #f4f4f5;
  border: 10px solid #f4f4f5;
  overflow: hidden;
}

.case_summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  font-size: 26px;
  line-height: 26px;
  padding: 25px;
  text-align: left;
  color: #000;

  &::-webkit-details-marker {
    display: none;
  }

  &::after {
    content: "";
    aspect-ratio: 1/1;
    height: 25px;
    background-image: url("../img/case/icon/arrow-bottom.svg");
    background-repeat: no-repeat;
  }
}

.case_accordion {
  &[open] {
    .case_summary {
      &::after {
        transform: scaleY(-1);
      }
    }
  }
}

.case_accordion-container {
  display: grid;
  gap: 9px;
  background-color: #ffffff;
  border-bottom-right-radius: 10px;
  border-bottom-left-radius: 10px;
  padding: 10px 54px;
}

.case_details-container {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 48px;
}

.case_tag-parent-name {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  text-align: left;
  color: #000;
}

.case_tag-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(auto, 180px));
  gap: 30px;
  align-items: center;
}

.case_tag-item {
  border-radius: 5px;
  background-color: #fff;
  border: 2px solid #f4f4f5;
  font-weight: normal;
  font-size: 16px;
  line-height: 26px;
  text-align: center;
  color: #000;

  &:has(input[type="checkbox"]:checked) {
    background: #000;
    border: 2px solid #000;
    color: #fff;
  }

  &:has(input[type="checkbox"]:disabled) {
    background: #f4f4f5;
    border: 1px solid #cccccc;
    color: #aaaaaa;
    opacity: 0.4;
    .case_tag-label {
      cursor: not-allowed;
    }
  }
}

.case_tag-label {
  display: block;
  width: 100%;
}

.case_tag-input {
  display: none;
}

@media screen and (max-width: 769px) {
  .case_tags {
    margin-top: 40px;
  }

  .case_accordion {
    border: 4px solid #f4f4f5;
  }

  .case_summary {
    padding: 15px 20px;
    font-size: 20px;
  }

  .case_accordion-container {
    padding: 20px 10px 27px;
  }

  .case_details-container {
    display: block;
  }

  .case_tag-list {
    margin-top: 14px;
    grid-template-columns: repeat(auto-fit, minmax(auto, 150px));
    gap: 12px;
  }

  .case_tag-item {
    padding: 5px 0;
  }
}

.case_other {
  margin: 90px calc(50% - 50vw);
  padding: 0 calc(50vw - 50%);
}

.case_other-heading {
  font-weight: bold;
  font-size: 30px;
  line-height: 33px;
  text-align: center;
  color: #000;
}

.case_other-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  row-gap: 48px;
}

.case_other-item {
  display: grid;
  grid-template-rows: auto auto 1fr;
  background: #fff;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
  height: 100%;
  overflow: hidden;
  transition: transform 280ms cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 280ms;
  will-change: transform, box-shadow;
}

.case_other-item > a {
  display: block;
  color: inherit;
  text-decoration: none;
  /* 高さを100%にすることで li の高さをカバー（li が高さを持っている場合） */
  height: 100%;
}

.case_other-item:hover,
.case_other-item:focus-within {
  transform: translateY(-6px); /* 浮き上がり（控えめ） */
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.1);
  outline: none;
}

.case_other-item-header {
  padding: 12px 0;
  padding-right: 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.case_other-item-header-logo {
  position: relative;
  aspect-ratio: 130/29;
  width: 130px;
  img {
    object-fit: contain;
  }
}

.case_other-item-header-company {
  border: 2px solid #f4f4f5;
  padding: 4px 18px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 26px;
  text-align: center;
  color: #000;
}

/* ==========================
   既存スタイル（あなたから提示されたもの）
   ========================== */

.case_other-item {
  display: grid;
  grid-template-rows: auto auto 1fr;
  background: #fff;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.case_other-item-header {
  padding: 12px 0;
  padding-right: 35px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.case_other-item-header-logo {
  position: relative;
  aspect-ratio: 130/29;
  width: 130px;
}
.case_other-item-header-logo img {
  object-fit: contain;
  width: 100%;
  height: 100%;
  display: block;
}

.case_other-item-header-company {
  border: 2px solid #f4f4f5;
  padding: 4px 18px;
  border-radius: 5px;
  font-size: 9px;
  line-height: 26px;
  text-align: center;
  color: #000;
}

.case_other-item-img {
  position: relative;
  aspect-ratio: 360/208;
  width: 100%;
}

.case_other-item-content {
  display: grid;
  grid-template-rows: 69px auto;
  padding: 18px 19px 48px;
}

.case_other-item-content-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  align-self: baseline;
}

.case_other-item-content-tag {
  width: 100px;
  height: 30px;
  border-radius: 5px;
  border: 2px solid #f4f4f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  line-height: 26px;
  color: #000;
}

.case_other-item-content-box {
  align-self: flex-end;
}

.case_other-item-content-text {
  margin-top: 14px;
  font-size: 16px;
  line-height: 26px;
  text-align: center;
  color: #000;
}

/* ==========================
     ここから下がアニメーション追加部分（画像だけ拡大、影を強める）
     ========================== */

/* カード内の a をブロック化（カードを丸ごとクリック可能にする） */
.case_other-item > a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

/* 画像ラッパーの安全設定（はみ出し防止） */
.case_other-item-img,
.case_other-item .card-img-bg {
  position: relative;
  overflow: hidden;
}

/* img と 背景span（.card-img-bg > span） にトランジションを追加 */
.case_other-item-img img,
.case_other-item .card-img-bg > span {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* img にのみ有効 */
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform;
  transform: none; /* 初期状態は変化なし（見た目維持） */
}

/* カード本体は影だけ変更するためのトランジション（見た目は維持） */
.case_other-item {
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  will-change: box-shadow, transform;
  /* overflow:hidden は既に上で設定しているが、無ければここで確保（問題があれば削除可） */
  overflow: hidden;
}

/* デスクトップ：ホバー／フォーカスで画像を拡大、影を強める（参考サイトと同等のしきい値） */
@media (min-width: 48em) {
  .case_other-item:hover,
  .case_other-item:focus-within {
    /* 既存の box-shadow をホバー時に強化（色や数値は参照サイト風） */
    box-shadow: rgba(61, 99, 120, 0.25) 0 10px 20px 1px;
    /* テキスト類は動かさないので transform は使用しない（none） */
    transform: none;
    outline: none;
  }

  .case_other-item:hover .case_other-item-img img,
  .case_other-item:focus-within .case_other-item-img img,
  .case_other-item:hover .card-img-bg > span,
  .case_other-item:focus-within .card-img-bg > span {
    transform: scale(1.05);
  }
}

/* モバイル：拡大・影を控えめに */
@media (max-width: 47.99em) {
  .case_other-item:hover,
  .case_other-item:focus-within {
    box-shadow: rgba(61, 99, 120, 0.18) 0 6px 12px 1px;
  }

  .case_other-item:hover .case_other-item-img img,
  .case_other-item:focus-within .case_other-item-img img,
  .case_other-item:hover .card-img-bg > span,
  .case_other-item:focus-within .card-img-bg > span {
    transform: scale(1.02);
  }
}

/* 念のため：テキスト／タグなどはホバーで移動させない（他のアニメと干渉しないように） */
.case_other-item .case_other-item-content * {
  /* !important は最小限に使いたいが、既存スタイルとの競合が不安な場合は残してください */
  transform: none !important;
}

/* 動きを抑えたいユーザー向け */
@media (prefers-reduced-motion: reduce) {
  .case_other-item,
  .case_other-item-img img,
  .case_other-item .card-img-bg > span {
    transition: none !important;
    transform: none !important;
  }
}

@media screen and (max-width: 1024px) {
  .case_other-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    row-gap: 30px;
  }
}

@media screen and (max-width: 769px) {
  .case_other-heading {
    font-weight: bold;
    font-size: 24px;
    line-height: 33px;
  }

  .case_other-item-content {
    grid-template-rows: auto auto;
    padding: 18px 12px 32px;
  }
}
