@charset "UTF-8";

.ac-box {
  background-color: #f5f9f5;
  padding: 20px;
  border-radius: 8px;
  margin: 30px auto;
  max-width: 1000px;
}

/* 画像グリッド */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.img-grid div img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.img-grid div p {
  font-size: 14px;
  text-align: left;
  margin-top: 8px;
  color: #333;
}

/* アコーディオン開閉 */
.ac-small {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
}

.ac-small.open {
  opacity: 1;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

input[type="checkbox"]:checked ~ .ac-small {
  max-height: 1000px; /* 必要に応じて調整 */
  opacity: 1;
  pointer-events: auto;
  margin-top: 20px;
}

/* ボタン */
.accordion-btn {
  display: block;
  text-align: center;
  margin: 20px auto 0;
  padding: 15px 30px;
  background-color: #eecd4e;
  color: #333;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  max-width: 200px;
  transition: all 0.3s ease;
}

.accordion-btn:hover {
  background-color: #fadd6f;
}

@media screen and (max-width: 1023px) {
  .img-grid {
    grid-template-columns: repeat(2, 1fr); /* ✅ 2列表示に切り替え */
  }
}


@media screen and (max-width: 540px) {
.img-grid {
    grid-template-columns: 1fr;
  }

  input[type="checkbox"]:checked ~ .ac-small {
    max-height: 2000px; /* 高さは十分に大きく設定してください */
  }
}