/* ==========================================================================
   Inoue Museum - Carousel
   Minimalist full-width image carousel with fade transitions
   ========================================================================== */

/* Carousel Container */
.carousel {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    max-height: 420px;
    border-radius: 2px;
}

/* Slides */
.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: none;
    z-index: 1;
}

.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slide title overlay */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 32px 32px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.45));
    color: #fff;
    pointer-events: none;
}

.carousel-caption-title {
    font-family: var(--font-serif, "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif);
    font-size: 20px;
    letter-spacing: 4px;
    font-weight: 400;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Navigation arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease;
    z-index: 100;
    pointer-events: auto;
    border-radius: 50%;
}

.carousel:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-arrow-prev {
    left: 16px;
}

.carousel-arrow-next {
    right: 16px;
}

/* Dot indicators */
.carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
    pointer-events: auto;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .carousel {
        max-width: calc(100% - 32px);
        margin: 0 16px;
        max-height: 260px;
        aspect-ratio: 16 / 10;
    }

    .carousel-caption {
        padding: 32px 20px 24px;
    }

    .carousel-caption-title {
        font-size: 16px;
        letter-spacing: 3px;
    }

    .carousel-arrow {
        width: 32px;
        height: 32px;
        font-size: 14px;
        opacity: 0.7;
    }

    .carousel:hover .carousel-arrow {
        opacity: 1;
    }

    .carousel-arrow-prev {
        left: 8px;
    }

    .carousel-arrow-next {
        right: 8px;
    }
}
