@charset "UTF-8";

/* クリック可能であることを示す */
.card-photo {
  cursor: pointer;
  position: relative;
  overflow: hidden; /* 拡大した画像が枠からはみ出さないように設定 */
}

/* メイン画像のアニメーション設定 */
.card-photo > img {
  transition: transform 0.5s ease; /* ゆっくり滑らかに変化させる */
  display: block;
  width: 100%;
}

/* ホバー時に画像を1.1倍に拡大 */
.card-photo:hover > img {
  transform: scale(1.1);
}

/* カード内にある拡大用の画像群は通常非表示 */
.modal-img {
  display: none;
}

/* ライトボックスの背景（オーバーレイ） */
#custom-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* ライトボックスのコンテンツエリア */
.lightbox-body {
  position: relative;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  cursor: default;
}

/* 画像とナビゲーションを包むメインエリア（ここを基準に中央配置する） */
.lightbox-main {
  position: relative;
}

/* スライダーコンテナ */
.lightbox-image-wrap {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap img {
  display: none;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 1em;
}

.lightbox-image-wrap img.active {
  display: block;
}

/* キャプション */
.lightbox-caption {
  padding: 15px;
  color: #fff;
  text-align: center;
  font-weight: 600;
}

/* 枚数表示 */
.lightbox-counter {
  position: absolute;
  top: 15px;
  left: 15px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 12px;
  border-radius: 20px;
  z-index: 10;
}

/* 矢印ボタン */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  font-size: 26px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  font-weight: bold;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

/* 閉じるボタン */
.lightbox-close {
  position: absolute;
  top: -55px;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #fff;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  padding: 0 20px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 10001;
}

@media screen and (max-width: 769px) {
  .lightbox-close {
    top: -50px;
    right: 0;
    font-size: 12px;
    padding: 0 15px;
    height: 30px;
  }
  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .lightbox-prev { left: 5px; }
  .lightbox-next { right: 5px; }
}

/* カード内の虫眼鏡アイコンを疑似要素で表示 */
.card-photo::after {
  content: "";
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3Cline x1='11' y1='8' x2='11' y2='14'%3E%3C/line%3E%3Cline x1='8' y1='11' x2='14' y2='11'%3E%3C/line%3E%3C/svg%3E") no-repeat center;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  pointer-events: none;
  z-index: 5;
  transition: background-color 0.3s, transform 0.3s;
}

.card-photo:hover::after {
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}