/* Expanding Parallax Section - Redesigned */
/* モバイルファースト設計：左右のみ拡大（上下は拡大しない） */

.expanding-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  background-color: #fff;
}

.expanding-section.pending {
  display: none;
}

.expanding-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  will-change: clip-path;
  /* 初期状態：左右24%のインセット（上下は0%） */
  clip-path: inset(0% 24% 0% 24%);
  -webkit-clip-path: inset(0% 24% 0% 24%);
}

.expanding-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.expanding-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.expanding-content {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  width: 100%;
  max-width: 1200px;
  padding: 0 20px;
  color: white;
  text-align: center;
}

.expanding-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Specific adjustments for text readability on images */
.expanding-content .section-title {
  color: white;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.expanding-content p {
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

/* Ensure content box style is adapted if used inside expanding section */
.expanding-content .content-box {
  position: relative;
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-text);
  padding: 30px 20px;
  border-radius: 20px;
  display: inline-block;
  max-width: 800px;
  margin: 0 auto;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s ease, background-color 0.4s ease, backdrop-filter 0.4s ease;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.expanding-content .content-box .section-title {
  color: var(--color-primary);
  text-shadow: none;
}

.expanding-content .content-box p {
  color: var(--color-text);
  text-shadow: none;
}

/* Expanding Content Toggle Button */
.expanding-content-toggle {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(21, 128, 61, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 0;
  opacity: 1;
  visibility: visible;
}

.expanding-content-toggle:hover {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(21, 128, 61, 0.6);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transform: scale(1.05);
}

.expanding-content-toggle:active {
  transform: scale(0.95);
}

.expanding-content-toggle i {
  width: 24px;
  height: 24px;
  color: var(--color-primary, #15803d);
  transition: opacity 0.3s ease;
}

/* モバイルでのトグルボタン位置調整 */
@media (max-width: 768px) {
  .expanding-content-toggle {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  .expanding-content-toggle i {
    width: 18px;
    height: 18px;
  }
}

/* Scroll hint indicator */
.scroll-hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 50;
}

.scroll-hint.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.scroll-hint__icon {
  display: none;
}

.scroll-hint__icon--scroll {
  display: block;
  width: 38px;
  height: 38px;
  background-image: url('../images/scroll.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: scroll-hint-scroll 1.6s ease-in-out infinite;
}

.scroll-hint__icon--swipe {
  display: none;
  width: 42px;
  height: 42px;
  background-image: url('../images/swipe.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: scroll-hint-swipe 1.6s ease-in-out infinite;
}

@keyframes scroll-hint-scroll {
  0% {
    transform: translateY(-6px);
  }
  40% {
    transform: translateY(6px);
  }
  100% {
    transform: translateY(-6px);
  }
}

@keyframes scroll-hint-swipe {
  0% {
    transform: translateY(6px);
  }
  40% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(6px);
  }
}

/* モバイルファースト：タブレット以上 */
@media (min-width: 768px) {
  .expanding-section {
    padding: 0;
  }

  .expanding-content .content-box {
    padding: 40px;
  }
}

/* モバイル専用スタイル（元のindex_test.htmlを踏襲） */
@media (max-width: 768px) {
  .expanding-section {
    padding: 0;
  }

  .expanding-content {
    padding: 0 10px;
    width: 100%;
    box-sizing: border-box;
  }

  .expanding-content .content-box {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 30px 20px;
    box-sizing: border-box;
  }

  .scroll-hint {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
  }

  .scroll-hint__icon--scroll {
    display: none;
  }

  .scroll-hint__icon--swipe {
    display: block;
  }
}



