/* 折り紙風画像ギャラリー - WordPress用スタイル */

.origami-gallery-wrapper {
  width: 100%;
  position: relative;
}

.origami-gallery-container {
  width: 100%;
  height: 100vh;
  min-height: 600px;
  background-color: #020617;
}

.origami-gallery-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 0;
}

.origami-gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.origami-gallery-item:hover {
  z-index: 10;
  transform: scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.origami-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.origami-gallery-item:hover img {
  transform: scale(1.1);
}

.origami-gallery-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
  pointer-events: none;
}

.origami-gallery-item:hover .origami-gallery-overlay {
  background-color: rgba(0, 0, 0, 0.1);
}

/* 折り紙風のクリップパス */
.origami-gallery-item:nth-child(1) {
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
}

.origami-gallery-item:nth-child(2) {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10% 100%);
}

.origami-gallery-item:nth-child(3) {
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 0 100%);
}

.origami-gallery-item:nth-child(4) {
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
}

.origami-gallery-item:nth-child(5) {
  clip-path: polygon(5% 0, 95% 0, 100% 100%, 0 100%);
}

.origami-gallery-item:nth-child(6) {
  clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}

.origami-gallery-item:nth-child(7) {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8% 100%);
}

.origami-gallery-item:nth-child(8) {
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

.origami-gallery-item:nth-child(9) {
  clip-path: polygon(0 0, 88% 0, 100% 100%, 12% 100%);
}

/* フルスクリーンモーダル */
.origami-gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease-in-out;
}

.origami-gallery-modal.active {
  display: flex;
}

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

.origami-gallery-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  backdrop-filter: blur(8px);
  z-index: 10000;
}

.origami-gallery-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.origami-gallery-close svg {
  width: 24px;
  height: 24px;
  color: white;
  display: block;
}

.origami-gallery-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1280px;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.origami-gallery-modal-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .origami-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(9, 1fr);
  }

  .origami-gallery-item:nth-child(1) {
    grid-area: 1 / 1 / 3 / 2 !important;
  }

  .origami-gallery-item:nth-child(2) {
    grid-area: 1 / 2 / 2 / 3 !important;
  }

  .origami-gallery-item:nth-child(3) {
    grid-area: 2 / 2 / 3 / 3 !important;
  }

  .origami-gallery-item:nth-child(4) {
    grid-area: 3 / 1 / 5 / 2 !important;
  }

  .origami-gallery-item:nth-child(5) {
    grid-area: 3 / 2 / 5 / 3 !important;
  }

  .origami-gallery-item:nth-child(6) {
    grid-area: 5 / 1 / 6 / 3 !important;
  }

  .origami-gallery-item:nth-child(7) {
    grid-area: 6 / 1 / 7 / 2 !important;
  }

  .origami-gallery-item:nth-child(8) {
    grid-area: 6 / 2 / 8 / 3 !important;
  }

  .origami-gallery-item:nth-child(9) {
    grid-area: 7 / 1 / 9 / 2 !important;
  }
}
