@charset "utf-8";
@import url(common.css);

/*ページタイトルおよびセクションタイトルはcommonに定義*/
.page-title {
    background-image: url(images/case/bg_title.jpg);
    background-size: cover;
    background-position-y: center;
    height:  350px;
    margin-bottom: 0;
}

.page-title ul {
  width: 80%;
  max-width: 1280px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr)); /* PC: 4列 */
  gap: 0.5rem; /* 好みで */
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
  place-items: center;
}

.page-title ul li {
  font-size: 1.2rem;
  width: 240px;
  height: 4rem;
  min-height: auto;
  padding: auto;
  max-width: 100%;
  text-align: center;
  margin: 0.5rem auto;
  display: grid;
  place-items: center;
}

@media screen and (max-width: 768px) {
  .page-title {
    height: 400px;
  }

  .page-title ul {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .page-title ul li {
    font-size: 1.1rem;
  }

  .page-title ul li:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: 240px;
    max-width: 50%;
  }
}

#case-background {
  background-image: url(images/case/bg_case.png);
  background-size: 100vw auto;
  background-repeat: repeat-y;
  padding: 1rem;
}

#case h2 {
  width: 300px;
  margin: 1rem 2rem;
}

#case .case__list ul {
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* PCは3列 */
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
  box-sizing: border-box;
}

#case .case__list ul li {
  border: 4px solid #000;
  border-radius: 2rem;
  padding: 0.5rem;
  box-sizing: border-box;
  background: #fff;
  cursor: pointer;
}

#case .case__list ul li h3 {
    font-size: 1.2rem;
}

#case .case__list ul li img {
    width: 95%;
    margin: 0.5rem;
}

#case .case__list ul li figcaption {
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/*モーダル*/
#case_detail #mask {
    display: none;
}

#case_detail.open #mask {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 150%;
    overflow-y: scroll;
    background: #000;
    opacity: .8;
    z-index: 10;
    cursor: pointer;
}

#case_detail #case_detail_popup {
    display: none;
    position: relative;
    margin: 0 auto;
}

#case_detail h3 {
    font-size: 1.2rem;
}

.case__detail__image ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* 間隔調整 */
  padding: 0;
  margin: 0;
  list-style: none;
  box-sizing: border-box;
}

#case_detail.open #case_detail_popup {
    display: block;
    position: fixed;
    width: 960px;
    height: 100vh;
    top: 5rem;
    background-color: #fff;
    cursor: pointer;
    z-index: 20;
    margin: auto;
    inset: 0;
}

.case__detail__ba {
    display: inline-block;
    border: 1px solid #000;
    border-radius: 2px;
}

.case__detail__voice {
    display: flex;
    justify-content: center;
}

.case__detail__voice__original {
    width: 50%;
}

.case__detail__voice__reason {
    width: 45%;
}

.case__detail__voice__reason h3 {
    background-color: green;
    text-align: center;
    margin: 1rem;
}

.case__detail__voice__reason p {
    font-size: 0.9rem;
    border: 1px solid #000;
    margin-bottom: 3rem;
}


@media screen and (max-width: 768px) {
    #case h2 {
        text-align: center;
    }

    #case .case__list ul {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

  #case .case__list ul {
    grid-template-columns: repeat(2, 1fr);
  }

    #case .case__list ul li h3 {
        font-size: 0.8rem;
    }

    #case .case__list ul li figcaption {
        font-size: 0.6rem;
        margin-left: 0rem;
    }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  overflow-y: auto;
}

#modal-title {
  font-size: 1.6rem;
  font-weight: bold;
}

.modal-title-img {
  width: 240px;
}

.modal-date {
  font-size: 1.2rem;
}

.modal-content {
  background: #fff;
  background-image: url(images/case/bg_profile.png);
  background-size: cover;
  margin: 5% auto;
  padding: 10px 30px;
  width: 90%;
  max-width: 1080px;
  border-radius: 8px;
  position: relative;
}

@media screen and (max-width: 768px) {
  .modal-content {
    background-image: url(images/case/bg_profile_sp.png);
  }
}

.modal .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  color: #000;
  cursor: pointer;
}

.modal-bottom-wrap {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 50px;
}

.modal-left,
.modal-right {
  flex: 1;
  min-width: 300px;
}

.modal-right {
  margin-top: 30px;
  max-width: 55%;
  margin: 1.5rem auto 0 auto;
}

.modal-right h3 {
  background-color: green;
  margin: 1px;
  text-align: center;
  font-size: 1.4rem;
  color: #fff;
}

.modal-right p {
  background-color: #fff;
}

.modal-left img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.modal-ba {
  display: inline-block;
  margin: 30px 2px 5px 2px;
  font-size: 18px;
  font-weight: bold;
  background-color: #fff;
  border-radius: 4px;
  border: 2px solid #333;
  padding: 1px 10px 5px 10px;
  color: #333;
  width: 8rem;
  text-align: center;
}

#modal-reason {
  padding: 1rem;
}

.image-gallery {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.image-gallery img {
  width: calc(33.33% - 10px);
  height: auto;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 横並び：アンケートと理由 */
.modal-bottom-wrap {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 30px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}


/* スマホ対応 */
@media screen and (max-width: 768px) {
  .modal-content {
    padding: 5px;
  }
  .modal-bottom-wrap {
    flex-direction: column;
  }

  .image-gallery {
    gap: 5px;
  }

  .image-gallery img {
      width: calc(50% - 10px);
  }

  .modal-bottom-wrap {
    width: 100%;
  }

  .modal-right {
    max-width: 94vw;
    width: 88vw;
  }

  #modal-reason {
    width: 100%;
  }
}

/* 補助 */
[hidden]{ display:none !important; }
.case-menu button[aria-pressed="true"]{ outline: 2px solid var(--color-accent,#10b981); }

.category-title {
  position: relative;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 700;
  color: #fff;
  min-height: 90px;
  margin-bottom: 40px;
  margin-left: 1rem;
}

.category-card {
  width: 25rem;
  height: 90px;
  position: absolute;
}

.category-card p {
  text-align: center;
  font-size: 1.5rem;
  line-height: 90px;
  color: #fff;
  white-space: nowrap;
  font-weight: 700;
}

.icon {
  display: inline-block;
  width: 2.7em;
  height: 2.7em;            /* 文字サイズに追従させるなら 1em もおすすめ */
  vertical-align: middle;
  background-color: currentColor; /* ← ここが色になる */
  -webkit-mask: no-repeat center / contain;
          mask: no-repeat center / contain;
  margin: 0;
}

/* 個別のアイコンパスを指定（相対パスはあなたの構成に合わせて） */
.icon.-icon1 { 
  -webkit-mask-image: url("images/sample/icon1.svg");
          mask-image: url("images/sample/icon1.svg");
}

.icon.-icon2 { 
  -webkit-mask-image: url("images/sample/icon2.svg");
          mask-image: url("images/sample/icon2.svg");
}

.category-title .category-card:nth-of-type(1) {
  background-color: #98c337;
  outline: 2px solid #fff;
  outline-offset: -4px;
  z-index: 20;
}

.category-title .category-card:nth-of-type(2) {
  background-color: white;
  outline: 3px solid #98c337;
  box-shadow: 5px 5px 5px #333;
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10;
}

@media screen and (max-width: 768px) {
  .category-title {
    transform: scale(0.6) translateX(-6rem);
    left: 0;
    margin-left: 0;
  }

  .category-card {
    left: 0;
    margin-left: 0;
  }
}