@charset "UTF-8";

/* =========================================================================
   1. アルバムモーダル (写真一覧を表示するカード型ポップアップ)
   ========================================================================= */
.album-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* 外側は半透明の暗い背景 */
  backdrop-filter: blur(8px); /* 背後のメインページをぼかして引き立たせる */
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center; /* 画面中央に配置 */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.album-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* アルバムモーダルのコンテンツカード（角丸ボード） */
.album-modal-content {
  width: 90%;
  max-width: 1000px;
  height: 85vh; /* 画面全体の85%の高さに制限 */
  background-color: var(--color-bg); /* サイト統一の温かみのある白 */
  border-radius: 20px; /* 高級感のある丸角 */
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3); /* 強い影で手前に浮かび上がる立体感 */
  padding: 60px 40px;
  position: relative;
  overflow-y: auto; /* ボードの内部だけをスクロール可能にする */
  -webkit-overflow-scrolling: touch;
  transform: scale(0.95); /* 現れるときのアニメーション用初期状態 */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.album-modal.is-open .album-modal-content {
  transform: scale(1);
}

/* アルバムヘッダー（タイトルと閉じるボタン） */
.album-modal-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.album-modal-title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: capitalize;
  color: var(--color-text);
  margin-bottom: 10px;
}

.album-modal-title .ja {
  display: block;
  font-size: 13px;
  color: var(--color-light);
  margin-top: 8px;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.album-modal-lead {
  font-size: 11px;
  color: var(--color-light);
  margin-top: 15px;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

/* アルバムを閉じるボタン（カードの右上に固定配置） */
.album-modal-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  font-size: 36px;
  font-weight: 300;
  color: var(--color-text);
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.album-modal-close:hover {
  opacity: 1;
  transform: rotate(90deg);
  color: var(--color-primary);
}

/* 写真グリッド */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.album-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  background-color: #f7f7f5;
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.album-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.08);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.album-item:hover img {
  transform: scale(1.06);
}

.album-item:hover::after {
  opacity: 1;
}


/* =========================================================================
   2. 拡大モーダル (個別写真をさらに大きく表示するポップアップ)
   ========================================================================= */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(18, 18, 18, 0.92); /* 暗い背景 */
  z-index: 2000; /* アルバムモーダルの上に重ねる */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(8px);
}

.lightbox-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* 拡大エリアの枠組み */
.lightbox-content {
  position: relative;
  max-width: 85%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  padding: 12px; /* 白い額縁 */
  border-radius: 8px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); /* 強いドロップシャドウで浮き出し効果 */
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-modal.is-open .lightbox-content {
  opacity: 1;
  transform: scale(1);
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

/* 拡大を閉じるボタン */
.lightbox-close {
  position: absolute;
  top: -55px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  padding: 5px;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

/* 左右切替ボタン */
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  font-size: 20px;
  opacity: 0.6;
  user-select: none;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  opacity: 1;
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
  left: -80px;
}

.lightbox-next {
  right: -80px;
}

/* カウンター表示 (例: 3 / 21) */
.lightbox-counter {
  position: absolute;
  bottom: -40px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.1em;
}

/* =========================================================================
   3. レスポンシブ対応 (モバイル表示の最適化)
   ========================================================================= */
@media screen and (max-width: 1100px) {
  .lightbox-prev {
    left: 20px;
  }
  .lightbox-next {
    right: 20px;
  }
  .lightbox-btn {
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2010;
  }
  .lightbox-close {
    top: 20px;
    right: 20px;
    z-index: 2010;
  }
}

@media screen and (max-width: 768px) {
  .album-modal-content {
    width: 95%;
    height: 90vh; /* モバイルでは高さを少し広げる */
    padding: 50px 20px 30px;
  }
  
  .album-modal-close {
    top: 15px;
    right: 15px;
    font-size: 30px;
    width: 36px;
    height: 36px;
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .lightbox-content {
    max-width: 90%;
    padding: 8px;
  }
  
  .lightbox-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .lightbox-prev {
    left: 10px;
  }
  
  .lightbox-next {
    right: 10px;
  }
}
