/* ローディング画面のスタイル */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

/* メインコンテンツを最初は非表示にする */
body.invisible #main-content {
    visibility: hidden;
    opacity: 0;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Swiper Arrow Styles --- */

/* 共通の矢印基本スタイル */
.hero-button-next, .hero-button-prev {
    width: 36px !important;
    height: 36px !important;
    border-top: 1.5px solid #ffffff !important;
}

.hero-button-next::after, .hero-button-prev::after {
    display: none !important;
}

/* 左矢印のスタイル */
.hero-button-prev {
    border-left: 1.5px solid #ffffff !important;
    transform: rotate(-45deg) !important;
    left: 24px !important;
}

/* 右矢印のスタイル */
.hero-button-next {
    border-right: 1.5px solid #ffffff !important;
    transform: rotate(45deg) !important;
    right: 24px !important;
}


/* スマホ表示の時だけ矢印を小さくする */
@media screen and (max-width: 767px) {
    .hero-button-next, .hero-button-prev {
        width: 24px !important;
        height: 24px !important;
    }
}

/* --- Other Styles --- */

.swiper-pagination-bullet-active {
    background-color: #ffffff; /* アクティブなページネーションのドットの色を白に */
}

/* Hamburger Animation */
#hamburger-btn span {
    transition: transform 0.3s ease, opacity 0.3s ease;
}
#hamburger-btn.open span:nth-of-type(1) {
    transform: translateY(8px) rotate(45deg);
}
#hamburger-btn.open span:nth-of-type(2) {
    opacity: 0;
}
#hamburger-btn.open span:nth-of-type(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* 既存のカスタムスクロールバーなどのスタイルは、
   今回のTailwindベース of レイアウトに不要な場合があるため、
   必要に応じてコメントアウトまたは削除を検討する。
   今回はGSAPなどのスクロールアニメーションの兼ね合いもあるため、
   一旦そのまま残しておく。 */

.main {
    touch-action: none;
}

.js-scroll-content {
    transform: translate3d(0, 0, 0);
}

.custom-scrollbar {
    position: fixed;
    top: 24px;
    right: 88px;
    z-index: 60;
    width: 8px;
    height: calc(100dvh - 48px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.custom-scrollbar.is-active {
    opacity: 1;
}

.custom-scrollbar__track {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    overflow: hidden;
}

.custom-scrollbar__thumb {
    position: absolute;
    top: 0;
    width: 100%;
    min-height: 40px;
    background: #14A79F;
    border-radius: 999px;
    transform: translate3d(0, 0, 0);
}

@media screen and (max-width: 768px) {
    html,
    body {
        overflow-y: auto !important;
    }

    .wrap, .wrap-container, .main {
        position: static !important;
        height: auto !important;
        overflow: visible !important;
        touch-action: auto !important;
    }

    .custom-scrollbar {
        display: none !important;
    }
}

/* スクロール矢印のフェードアウト */
#scroll-arrow {
    transition: opacity 0.5s ease;
}

#scroll-arrow.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Page Top Button */
#page-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999; /* 重なり順を最前面に引き上げる */
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9); /* 白背景（少し透過）に変更して視認性を向上 */
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* 影を追加して暗い背景から浮かせる */
}

#page-top-btn:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

#page-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
}

#page-top-btn svg {
    width: 24px;
    height: 24px;
    color: #000; /* 矢印アイコンを黒色に変更 */
}

/* Smartphone responsive */
@media screen and (max-width: 767px) {
    #page-top-btn {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 16px;
    }
    #page-top-btn svg {
        width: 20px;
        height: 20px;
    }
}
