/* ==========================================
   Lightbox スタイル
   ========================================== */

/* ページヘッダー */
.page-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: var(--spacing-2xl) 0 var(--spacing-xl) 0;
  text-align: center;
  margin-top: 60px;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: var(--spacing-sm);
}

.page-subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* ギャラリーセクション */
.gallery-section {
  padding: var(--spacing-2xl) 0;
  background-color: var(--bg-light);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-xl);
}

.gallery-item {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.gallery-link {
  position: relative;
  display: block;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-link:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(102, 126, 234, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-link:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.gallery-caption {
  color: white;
  font-size: 1rem;
  font-weight: 500;
}

.gallery-description {
  padding: var(--spacing-md);
}

.gallery-description h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-xs);
}

.gallery-description p {
  font-size: 0.9375rem;
  color: var(--text-gray);
  line-height: 1.6;
}

/* Lightbox モーダル */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: zoomIn 0.3s ease;
}

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

.lightbox-caption {
  color: white;
  text-align: center;
  padding: var(--spacing-md);
  font-size: 1.125rem;
  max-width: 800px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: var(--spacing-sm) var(--spacing-md);
  transition: all 0.3s ease;
  border-radius: var(--radius-md);
  backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  line-height: 1;
}

.lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.5rem;
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 50px;
  }

  .lightbox-caption {
    font-size: 1rem;
    padding: var(--spacing-sm);
  }
}
