/* ==========================================================================
   スクロールアニメーション用CSS
   Scroll Animations CSS
   ========================================================================== */

/* アニメーション適用後の状態 */
.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ギャラリーアイテムの個別アニメーション */
.gallery-item {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-item:nth-child(1) { transition-delay: 0s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.2s; }
.gallery-item:nth-child(4) { transition-delay: 0.3s; }

/* ゾーンアイテムのスタッガーアニメーション */
.zone-item {
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.zone-item:nth-child(1) { transition-delay: 0s; }
.zone-item:nth-child(2) { transition-delay: 0.1s; }
.zone-item:nth-child(3) { transition-delay: 0.2s; }
.zone-item:nth-child(4) { transition-delay: 0.3s; }
.zone-item:nth-child(5) { transition-delay: 0.4s; }

/* 波紋エフェクトのアニメーション */
@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 1000px;
        height: 1000px;
        opacity: 0;
    }
}

/* パルスエフェクト（ボタンなど） */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-primary:hover,
.btn-secondary:hover {
    animation: pulse 0.6s ease-in-out;
}

/* フローティングアニメーション */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 回転輝き効果 */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* カードホバー時のグロー効果 */
.gallery-item:hover,
.other-card:hover,
.testimonial-bubble:hover {
    box-shadow: 0 15px 50px rgba(125, 211, 192, 0.3) !important;
    transition: box-shadow 0.3s ease;
}

/* スクロール時の背景色変化 */
.point-card.animate-in {
    animation: fadeInBackground 1s ease-out;
}

@keyframes fadeInBackground {
    0% {
        background-color: transparent;
    }
    100% {
        background-color: inherit;
    }
}

/* テキストのグラデーション輝き */
.section-title-en.animate-in {
    background: var(--primary-color);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 3s linear infinite;
}

@keyframes shimmerText {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* スムーズなホバートランジション */
.feature-item,
.other-card,
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.feature-item:hover,
.other-card:hover,
.gallery-item:hover {
    filter: brightness(1.05);
}

/* 画像のズームイン効果 */
.point-image-hero img,
.gallery-item img {
    transition: transform 0.6s ease;
}

.point-image-hero:hover img,
.gallery-item:hover img {
    transform: scale(1.08);
}

/* ボタンのリップル効果 */
.btn-primary,
.btn-secondary,
.toggle-detail {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.btn-secondary::after,
.toggle-detail::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after,
.btn-secondary:active::after,
.toggle-detail:active::after {
    width: 300px;
    height: 300px;
}

/* スクロールプログレスバーのスタイル（JSで動的生成） */
/* 上部に4pxのグラデーションバーとして表示 */

/* モバイルでのアニメーション軽減 */
@media (max-width: 768px) {
    /* テキストの改行設定 - 単語の途中で切れないように */
    body, p, h1, h2, h3, h4, h5, h6, li, span, div {
/*        word-break: keep-all;*/
        overflow-wrap: break-word;
        word-wrap: break-word;
		word-break: break-all !important;
    }
    
    .gallery-item,
    .testimonial-bubble,
    .zone-item,
    .point-card,
    .feature-item {
        transition-duration: 0.5s !important;
    }
    
    /* モバイルでは3D変形を無効化（パフォーマンス向上） */
    .feature-item:hover,
    .other-card:hover,
    .gallery-item:hover,
    .testimonial-bubble:hover {
        transform: translateY(-5px) scale(1.02) !important;
    }
}

/* スクロールバーのカスタマイズ */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
