/* Fancybox カスタマイズ - 白背景＋透過 */
.fancybox__container {
  --fancybox-bg: rgba(255, 255, 255, 0.8); /* 白背景95%透過 */
  --fancybox-color: #333; /* テキストを黒に */
}

.fancybox__backdrop {
  background: var(--fancybox-bg);
  backdrop-filter: blur(10px);
}

.fancybox__caption {
  background: rgba(255, 255, 255, 0.9); /* キャプションも白背景 */
  color: #333; /* テキスト黒 */
  font-size: 1.4rem;
  padding: 1rem 2rem;
  text-align: center;
  font-family: 'Yu Gothic Medium', '游ゴシック Medium', YuGothic, '游ゴシック体', 'Hiragino Sans', 'メイリオ', sans-serif;
  border-radius: 8px; /* 角丸追加 */
}

/* ツールバーの色調整 */
.fancybox__toolbar .fancybox__button {
  color: #333 !important; /* ボタンを黒に */
}

.fancybox__toolbar .fancybox__button:hover {
  background: rgba(0, 0, 0, 0.1) !important; /* ホバー時の背景 */
}

/* 縦横比を保持しながら一定サイズ感で表示 */
.fancybox__content {
  max-width: 900px !important;
  max-height: 700px !important;
  min-width: 300px !important;
  min-height: 200px !important;
}

.fancybox__slide img {
  max-width: 900px !important;
  max-height: 700px !important;
  min-width: 300px !important;
  min-height: 200px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* 画像の中央配置を確実にする */
.fancybox__slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* モバイル対応での画像サイズ調整 */
@media (max-width: 768px) {
  .fancybox__caption {
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
  
  .fancybox__content {
    max-width: 95vw !important;
    max-height: 80vh !important;
    min-width: 250px !important;
    min-height: 150px !important;
  }
  
  .fancybox__slide img {
    max-width: 95vw !important;
    max-height: 80vh !important;
    min-width: 250px !important;
    min-height: 150px !important;
  }
}

/* タブレット対応 */
@media (max-width: 1024px) and (min-width: 769px) {
  .fancybox__content {
    max-width: 800px !important;
    max-height: 600px !important;
  }
  
  .fancybox__slide img {
    max-width: 800px !important;
    max-height: 600px !important;
  }
}

.is-horizontal .f-carousel__nav .f-button.is-next, .is-horizontal .fancybox__nav .f-button.is-next {
    right: 0;
}
.f-button {
    background: rgba(0, 0, 0, 0.3);
}