/* ========== カルーセル外枠 ========== */
#sliderSection::before{
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.1) 0%, rgba(180, 180, 180, 0.35) 100%);
    z-index: 3;
}
.carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    /* ← フルスクリーン */
    overflow: hidden;
    background: #000;

}

/* スマホ縦持ち */
@media (max-width: 600px) and (orientation: portrait) {
    .carousel {
        /* height: 75dvh; */
    }
}

/* ========== スライド ========== */
.slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    & img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
    }
    &.is-active .slide-caption {
        opacity: 1;
        transform: translateY(0);
    }
}

/* キャプション */
.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 36px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
    transform: translateY(10px);
    opacity: 0;
    transition: opacity 0.5s 0.2s, transform 0.5s 0.2s;
    pointer-events: none;

    & strong {
        display: block;
        font-size: clamp(0.95rem, 2.5vw, 1.4rem);
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    & span {
        display: block;
        font-size: clamp(0.7rem, 1.5vw, 0.9rem);
        opacity: 0.75;
        margin-top: 4px;
    }
}




/* ========================================
   トランジション定義（9種類）
   ======================================== */

/* fade */
.fx-fade-leave {
    animation: fadOut 0.7s ease forwards;
}

.fx-fade-enter {
    animation: fadIn 0.7s ease forwards;
}

@keyframes fadOut {
    to {
        opacity: 0;
    }
}

@keyframes fadIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* slide → (左へ退場) */
.fx-slideL-leave {
    animation: slideOutL 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

.fx-slideL-enter {
    animation: slideInL 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

@keyframes slideOutL {
    to {
        transform: translateX(-100%);
    }
}

@keyframes slideInL {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* slide ← (右へ退場) */
.fx-slideR-leave {
    animation: slideOutR 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

.fx-slideR-enter {
    animation: slideInR 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

@keyframes slideOutR {
    to {
        transform: translateX(100%);
    }
}

@keyframes slideInR {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* slide ↑ (上へ退場) */
.fx-slideU-leave {
    animation: slideOutU 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

.fx-slideU-enter {
    animation: slideInU 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

@keyframes slideOutU {
    to {
        transform: translateY(-100%);
    }
}

@keyframes slideInU {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

/* slide ↓ (下へ退場) */
.fx-slideD-leave {
    animation: slideOutD 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

.fx-slideD-enter {
    animation: slideInD 0.65s cubic-bezier(.77, 0, .18, 1) forwards;
}

@keyframes slideOutD {
    to {
        transform: translateY(100%);
    }
}

@keyframes slideInD {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* zoom-fade */
.fx-zoom-leave {
    animation: zoomOut 0.7s ease forwards;
}

.fx-zoom-enter {
    animation: zoomIn 0.7s ease forwards;
}

@keyframes zoomOut {
    to {
        transform: scale(1.12);
        opacity: 0;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* split (中央から左右に割れる) */
.fx-split-leave {
    animation: splitOut 0.72s cubic-bezier(.77, 0, .18, 1) forwards;
}

.fx-split-enter {
    animation: splitIn 0.72s cubic-bezier(.77, 0, .18, 1) forwards;
}

@keyframes splitOut {
    0% {
        clip-path: inset(0 0 0 0);
    }

    100% {
        clip-path: inset(0 50% 0 50%);
        opacity: 0;
    }
}

@keyframes splitIn {
    0% {
        clip-path: inset(0 50% 0 50%);
        opacity: 0;
    }

    100% {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

/* curtain (上から垂れ幕) */
.fx-curtain-leave {
    animation: curtainOut 0.7s ease forwards;
}

.fx-curtain-enter {
    animation: curtainIn 0.7s ease forwards;
}

@keyframes curtainOut {
    0% {
        clip-path: inset(0 0 0 0);
    }

    100% {
        clip-path: inset(0 0 100% 0);
    }
}

@keyframes curtainIn {
    0% {
        clip-path: inset(100% 0 0 0);
    }

    100% {
        clip-path: inset(0 0 0 0);
    }
}

/* rotate-fade */
.fx-rotate-leave {
    animation: rotateOut 0.7s ease forwards;
}

.fx-rotate-enter {
    animation: rotateIn 0.7s ease forwards;
}

@keyframes rotateOut {
    to {
        transform: rotate(5deg) scale(1.06);
        opacity: 0;
    }
}

@keyframes rotateIn {
    from {
        transform: rotate(-5deg) scale(0.95);
        opacity: 0;
    }

    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}


/* ========== コントロール UI（画像の上に重ねる） ========== */

/* 前・次ボタン */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: clamp(36px, 5vw, 52px);
    height: clamp(36px, 5vw, 52px);
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    transition: background 0.2s, transform 0.2s;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.38);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: clamp(10px, 2.5vw, 24px);
}

.carousel-btn.next {
    right: clamp(10px, 2.5vw, 24px);
}

.carousel-btn svg {
    width: clamp(16px, 2.5vw, 24px);
    height: clamp(16px, 2.5vw, 24px);
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ドット（下部中央） */
.carousel-footer {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, width 0.3s, border-radius 0.3s;
}

.dot.is-active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
    border-color: #fff;
}

/* プログレスバー（最下部） */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    width: 0%;
    z-index: 20;
    pointer-events: none;
}

/* エフェクト名バッジ（確認用 → 本番では display:none にしてください） */
.fx-badge {
    display: none;
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 25;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.38);
    padding: 3px 9px;
    border-radius: 20px;
    pointer-events: none;
}