/* ══════════════════════════════════════════
   shima-slideshow.css
   ══════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden; /* 全画面固定のためスクロールバーを非表示 */
}

body {
  font-family:
    "Hiragino Mincho ProN",
    "Yu Mincho",
    serif;
  background: #0a1f2e;
}


/* ══════ SLIDESHOW ══════ */

.slideshow {
  position: fixed; /* viewportに完全に固定 */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* ★修正箇所: セレクタの「.」を追加 ＆ object-fit を cover に変更★ */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画面全体を隙間なくカバー */
  display: block;
  transform-origin: center center;
  animation: none;
}

.slide.active img {
  animation:
    kenburns
    8s
    ease-out
    forwards;
}


/* ══════ KEN BURNS ══════ */

@keyframes kenburns {
  0% {
    transform:
      scale(1)
      translateX(0);
  }
  100% {
    transform:
      scale(1.07)
      translateX(-1.5%);
  }
}


/* ══════ GRADIENT OVERLAY ══════ */

.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(8,24,36,.62) 0%,
      transparent 40%,
      rgba(8,24,36,.18) 100%
    );
  pointer-events: none;
}


/* ══════ TITLE ══════ */

.title-block {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 2.4rem 3rem 0;
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  pointer-events: auto;
}


/* ══════ A → B リンク ══════ */

.title-block h2 a {
  position: relative;
  z-index: 1001;
  color: white;
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

.title-block h2 a:hover {
  text-decoration: underline;
}


/* ══════ TITLE H1 ══════ */

.title-block h1 {
  font-size:
    clamp(
      1.6rem,
      4vw,
      2.6rem
    );
  font-weight: 300;
  color: #fff;
  letter-spacing: .35em;
  text-indent: .35em;
  text-shadow:
    0 2px 20px
    rgba(0,0,0,.35);
}


/* ══════ TITLE SUB TEXT ══════ */

.title-block span {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .3em;
  white-space: nowrap;
}


/* ══════ CAPTION ══════ */

.caption {
  position: absolute;
  bottom: 6.5rem;
  left: 3rem;
  z-index: 5;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .9s .5s,
    transform .9s .5s;
  pointer-events: none;
}

.slide.active .caption {
  opacity: 1;
  transform: translateY(0);
}

.caption .tag {
  display: inline-block;
  font-size: .68rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .35em;
  border-left: 2px solid rgba(255,255,255,.45);
  padding-left: .7rem;
  margin-bottom: .5rem;
}


/* ══════ DOTS ══════ */

.dots {
  position: fixed;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  transition: all .4s;
  border: none;
  outline: none;
  padding: 0;
}

.dot.active {
  background: #fff;
  width: 26px;
  border-radius: 4px;
}

.dot:hover {
  background: rgba(255,255,255,.7);
}


/* ══════ PROGRESS BAR ══════ */

.progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 20;
  background: rgba(255,255,255,.1);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: rgba(255,255,255,.55);
  transition: width linear;
}


/* ══════ COUNTER ══════ */

.counter {
  position: fixed;
  bottom: 2.2rem;
  right: 3rem;
  z-index: 10;
  font-size: .75rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .2em;
}


/* ══════ FOOTER & 戻るボタン ══════ */

footer {
  position: fixed;
  bottom: 2rem;
  left: 3rem;
  z-index: 1000;
  pointer-events: auto;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: #ffffff;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.1em;
}

.back-button:hover {
  background-color: rgba(255, 255, 255, 0.25);
  border-color: #ffffff;
  color: #ffffff;
}


/* ══════ RESPONSIVE ══════ */

@media(max-width:600px) {
  .title-block {
    padding: 1.8rem 1.5rem 0;
  }

  .caption {
    left: 1.5rem;
    bottom: 5.5rem;
  }

  .counter {
    right: 1.5rem;
  }

  footer {
    left: 1.5rem;
    bottom: 1.8rem;
  }
}