﻿@charset "utf-8";

[data-gallery] {
  --gallery-cols: 4;
  --gallery-rows: 3;
  --gallery-gap: 14px;
  --gallery-radius: 16px;
  --gallery-bg: rgba(255, 255, 255, 0.04);
  --gallery-arrow-size: 56px;
  --gallery-arrow-bg: rgba(0, 0, 0, 0.28);
  --gallery-arrow-bg-hover: rgba(0, 0, 0, 0.42);
  --gallery-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  --gallery-zoom-radius: 18px;
  --gallery-caption-color: rgba(255, 255, 255, 0.9);
  --gallery-zoom-width: 86vw;
  --gallery-zoom-max: 1200px;
  --gallery-zoom-height: 86vh;

  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

[data-gallery] *,
[data-gallery] *::before,
[data-gallery] *::after {
  box-sizing: border-box;
}

.rc-gallery--tabbed {
  height: 86%;
  margin-top: 4%;
  margin-bottom: 4%;
  padding-top: 52px;
}

.rc-gallery-tabs {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 120;

  display: flex;
  gap: 10px;

  transform: translateX(-50%);
}

.rc-gallery-tabs button {
  min-width: 118px;
  height: 30px;

  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;

  background: rgba(0,0,0,0.32);
  color: rgba(255,255,255,0.72);

  font-size: 11px;
  letter-spacing: 0.18em;

  cursor: pointer;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease;
}

.rc-gallery-tabs button.is-active {
  background: rgba(255,255,255,0.92);
  color: #000;
  border-color: rgba(255,255,255,0.92);
}

.rc-gallery__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.rc-gallery--tabbed .rc-gallery__viewport {
  height: calc(100% - 52px);
}

.rc-gallery__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.rc-gallery__page {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--gallery-rows), minmax(0, 1fr));
  gap: var(--gallery-gap);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition:
    opacity 0.5s ease,
    transform 0.65s cubic-bezier(.22, .61, .36, 1),
    visibility 0s linear 0.65s;
  pointer-events: none;
}

.rc-gallery__page.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition:
    opacity 0.5s ease,
    transform 0.65s cubic-bezier(.22, .61, .36, 1),
    visibility 0s linear 0s;
  pointer-events: auto;
}

.rc-gallery__item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--gallery-radius);
  overflow: hidden;
  background: var(--gallery-bg);
  cursor: zoom-in;
  box-shadow: var(--gallery-shadow);
  transform: translate3d(0, 18px, 0) scale(0.985);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(.22, .61, .36, 1),
    opacity 0.55s ease,
    filter 0.35s ease;
  filter: saturate(0.96) contrast(1.01);
}

.rc-gallery__page.is-active .rc-gallery__item {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.rc-gallery__item:hover {
  filter: saturate(1.02) contrast(1.03);
}

.rc-gallery__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.14) 0%,
      rgba(0, 0, 0, 0.02) 45%,
      rgba(0, 0, 0, 0) 100%
    );
  pointer-events: none;
  z-index: 2;
}

.rc-gallery__itemMedia {
  position: relative;
  width: 100%;
  height: 100%;
}

.rc-gallery__itemMedia > img,
.rc-gallery__itemMedia > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  backface-visibility: hidden;
}

.rc-gallery--tabbed.is-video-panel .rc-gallery__page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rc-gallery--tabbed.is-video-panel .rc-gallery__item {
  width: min(100%, 1100px);
  height: auto;
  aspect-ratio: 16 / 9;

  flex: none;

  background: transparent;
  box-shadow: var(--gallery-shadow);
}

.rc-gallery--tabbed.is-video-panel .rc-gallery__itemMedia {
  width: 100%;
  height: 100%;
}

.rc-gallery--tabbed.is-video-panel .rc-gallery__itemMedia > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.rc-gallery--tabbed.is-video-panel .rc-gallery__itemMedia {
  width: 100%;
  height: 100%;
}

.rc-gallery--tabbed.is-video-panel .rc-gallery__itemMedia > video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.rc-gallery__caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 3;
  color: var(--gallery-caption-color);
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.rc-gallery__nav {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.rc-gallery__arrow {
  position: absolute;
  top: 50%;
  width: var(--gallery-arrow-size);
  height: var(--gallery-arrow-size);
  border: 0;
  border-radius: 999px;
  background: var(--gallery-arrow-bg);
  color: #fff;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    background 0.25s ease,
    transform 0.25s ease,
    opacity 0.25s ease;
  z-index: 11;
}

.rc-gallery__arrow:hover {
  background: var(--gallery-arrow-bg-hover);
}

.rc-gallery__arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.rc-gallery__arrow[disabled] {
  opacity: 0.35;
  cursor: default;
}

.rc-gallery__arrow--prev {
  left: 14px;
}

.rc-gallery__arrow--next {
  right: 14px;
}

.rc-gallery__arrowIcon {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.rc-gallery__arrow--prev .rc-gallery__arrowIcon {
  transform: rotate(-135deg);
  left: 2px;
}

.rc-gallery__arrow--next .rc-gallery__arrowIcon {
  transform: rotate(45deg);
  right: 2px;
}

.rc-gallery__counter {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  min-width: 66px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  pointer-events: none;
  z-index: 11;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.rc-gallery__zoom {
  position: fixed;
  inset: 0;
  z-index: 9990;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.32s ease,
    visibility 0s linear 0.32s;

  --gallery-zoom-width: 86vw;
  --gallery-zoom-max: 1200px;
  --gallery-zoom-height: 86vh;
}

.rc-gallery__zoom.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.32s ease,
    visibility 0s linear 0s;
}

.rc-gallery__zoomBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.rc-gallery__zoomInner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.rc-gallery__zoomContent {
  position: relative;
  width: min(var(--gallery-zoom-width, 86vw), var(--gallery-zoom-max, 1200px));
  height: var(--gallery-zoom-height, 86vh);
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--gallery-zoom-radius);
  overflow: hidden;
  background: transparent;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
  transform: translate3d(0, 18px, 0) scale(0.985);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(.22, .61, .36, 1),
    opacity 0.28s ease;
}

.rc-gallery__zoom.is-open .rc-gallery__zoomContent {
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}

.rc-gallery__zoomMedia {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rc-gallery__zoomMedia > img,
.rc-gallery__zoomMedia > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
}

.rc-gallery__zoomClose {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  z-index: 3;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.rc-gallery__zoomClose:hover {
  background: rgba(255, 255, 255, 0.16);
}

.rc-gallery__zoomClose:active {
  transform: scale(0.96);
}

.rc-gallery__zoomClose::before,
.rc-gallery__zoomClose::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  transform-origin: center;
}

.rc-gallery__zoomClose::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.rc-gallery__zoomClose::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@media (max-width: 768px) {
  .rc-gallery--tabbed {
    height: 88%;
    margin-top: 3%;
    margin-bottom: 3%;
    padding-top: 48px;
  }

  .rc-gallery-tabs {
    top: 0;
  }

  .rc-gallery-tabs button {
    min-width: 104px;
    height: 30px;
    font-size: 10px;
  }

  .rc-gallery--tabbed .rc-gallery__viewport {
    height: calc(100% - 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rc-gallery__page,
  .rc-gallery__item,
  .rc-gallery__zoom,
  .rc-gallery__zoomContent {
    transition: none !important;
    animation: none !important;
  }
}


/* =========================================
   Split Gallery Layout
   VIDEO / PHOTO side by side
========================================= */

.page-section--split-gallery .page-section__content {
  display: none !important;
}

.page-section--split-gallery .page-section__gallery {
  left: 50%;
  right: auto;
  top: 50%;
  z-index: 4;

  width: min(86vw, 1320px);
  height: min(66vh, 640px);

  transform: translate(-50%, -50%);
}

.gallery-split-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.35fr) minmax(420px, 1fr);
  gap: clamp(34px, 4vw, 58px);

  width: 100%;
  height: 100%;
}

.gallery-split-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.gallery-split-label {
  margin: 0 0 14px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.86);
}

.rc-gallery--split {
  height: calc(100% - 28px);
}

.rc-gallery--split-video .rc-gallery__itemMedia > video {
  object-fit: cover;
}

.rc-gallery--split-video .rc-gallery__item {
  aspect-ratio: 16 / 9;
}

.rc-gallery--split .rc-gallery__counter {
  bottom: -38px;
}

/* =========================================
   Split Gallery Fine Tune
========================================= */

.gallery-split-panel--video {
  display: flex;
  flex-direction: column;
}

.gallery-split-panel--video .rc-gallery--split-video {
  height: auto;
  flex: 1;

  display: flex;
  align-items: center;
}

.gallery-split-panel--video .rc-gallery__viewport {
  height: auto;
  aspect-ratio: 16 / 9;
}

.gallery-split-panel--video .rc-gallery__track,
.gallery-split-panel--video .rc-gallery__page,
.gallery-split-panel--video .rc-gallery__item {
  height: 100%;
}

.gallery-split-panel--video .rc-gallery__itemMedia,
.gallery-split-panel--video .rc-gallery__itemMedia video {
  height: 100%;
}

.gallery-split-panel--video .rc-gallery__itemMedia video {
  object-fit: cover;
}

/* VIDEO側も複数対応するため、矢印は非表示にしない */
.rc-gallery--split-video .rc-gallery__arrow {
  display: block;
}

/* 左右カラム内でページャーが中央に寄りすぎないよう余白確保 */
.rc-gallery--split .rc-gallery__arrow--prev {
  left: 18px;
}

.rc-gallery--split .rc-gallery__arrow--next {
  right: 18px;
}

/* VIDEO / PHOTO 間の干渉防止 */
.gallery-split-layout {
  gap: clamp(34px, 4vw, 58px);
}

/* =========================================
   Split Video Arrow Center Fix
========================================= */

.rc-gallery--split-video .rc-gallery__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rc-gallery--split-video .rc-gallery__arrow span {
  position: relative;
  margin: 0;
  left: 0 !important;
  right: 0 !important;
}

.rc-gallery--split-video .rc-gallery__arrow--prev span {
  transform: rotate(-135deg);
}

.rc-gallery--split-video .rc-gallery__arrow--next span {
  transform: rotate(45deg);
}