/* 画像モーダルのスタイル */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.image-modal.show {
  display: flex;
}

/* 拡大画像 */
.image-modal__content {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: zoomIn 0.3s ease;
}

/* 閉じるボタン */
.image-modal__close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.image-modal__close:hover {
  color: #bbb;
}

/* 前後ボタン */
.image-modal__prev,
.image-modal__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  border: none;
  font-size: 30px;
  padding: 15px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border-radius: 5px;
}

.image-modal__prev:hover,
.image-modal__next:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.image-modal__prev {
  left: 20px;
}

.image-modal__next {
  right: 20px;
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* モバイル対応 */
@media (max-width: 768px) {
  .image-modal__close {
    top: 10px;
    right: 15px;
    font-size: 30px;
  }
  
  .image-modal__prev,
  .image-modal__next {
    padding: 10px 15px;
    font-size: 24px;
  }
  
  .image-modal__prev {
    left: 10px;
  }
  
  .image-modal__next {
    right: 10px;
  }
}