/**
 * Stacked Carousel Styles
 * 堆叠轮播样式
 */

/* Container */
.stacked-carousel-container {
    margin: 0 auto;
    max-width: 1280px;
    padding: 3rem 1.5rem;
}

.stacked-carousel-region {
    position: relative;
    width: 100%;
    padding: 0 1rem;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Slides Container */
.stacked-carousel-slides-container {
    position: relative;
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    overflow: visible;
    outline: none;
    touch-action: pan-y;
    user-select: none;
    cursor: grab;
}

.stacked-carousel-slides-container:active {
    cursor: grabbing;
}

/* Slides Wrapper */
.stacked-carousel-wrapper {
    position: relative;
    display: flex;
    height: 362px;
    width: 100%;
    justify-content: center;
    touch-action: pan-y;
}

/* Individual Slide */
.stacked-carousel-slide {
    position: absolute;
    display: flex;
    width: 100%;
    max-width: 32rem;
    align-items: center;
    justify-content: center;
    will-change: transform;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .stacked-carousel-slide {
        max-width: 36rem;
    }
}

@media (min-width: 1024px) {
    .stacked-carousel-slide {
        max-width: 42rem;
    }
}

/* Card */
.stacked-carousel-card {
    position: relative;
    max-width: 288px;
    width: 100%;
}

.stacked-carousel-card-inner {
    position: relative;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Image Wrapper */
.stacked-carousel-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/5;
    flex-shrink: 0;
    overflow: hidden;
    display: block;
}

.stacked-carousel-image {
    width: 100%;
    height: 100%;
    border-radius: 0.5rem;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}

/* Content Overlay */
.stacked-carousel-content {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem 2rem;
    text-align: center;
}

.stacked-carousel-step {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stacked-carousel-title {
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stacked-carousel-description {
    font-weight: 400;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Navigation */
.stacked-carousel-navigation {
    margin-top: 1.5rem;
    display: flex;
    min-height: 3.5rem;
    width: 100%;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 0.25rem 0;
    justify-content: space-between;
}

@media (min-width: 1024px) {
    .stacked-carousel-navigation {
        justify-content: space-between;
    }
}

/* Navigation Buttons */
.stacked-carousel-nav-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stacked-carousel-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    border: none;
    padding: 0.5rem;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
    color: #111827;
    font-size: 1.5rem;
    line-height: 1;
}

.stacked-carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.stacked-carousel-btn:active {
    color: #374151;
    background-color: rgba(0, 0, 0, 0.1);
}

.stacked-carousel-btn:disabled {
    pointer-events: none;
    cursor: not-allowed;
    color: #9ca3af;
}

.stacked-carousel-btn:focus-visible {
    outline: 2px solid #9ca3af;
    outline-offset: 2px;
}

.stacked-carousel-counter {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0 0.5rem;
    min-width: 1.75rem;
    color: #111827;
    text-align: center;
}

@media (min-width: 1024px) {
    .stacked-carousel-counter {
        font-size: 1rem;
        min-width: 2rem;
    }
}

/* Pagination Dots */
.stacked-carousel-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

@media (min-width: 1024px) {
    .stacked-carousel-pagination {
        padding: 0 1.5rem;
    }
}

.stacked-carousel-dot {
    height: 0.5rem;
    border-radius: 9999px;
    transition: all 0.3s;
    background-color: #d1d5db;
    width: 0.5rem;
    cursor: pointer;
}

.stacked-carousel-dot:hover {
    background-color: #9ca3af;
}

.stacked-carousel-dot.active {
    background-color: #111827;
    width: 1.5rem;
    cursor: auto;
}

.stacked-carousel-dot.active:hover {
    background-color: #111827;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .stacked-carousel-wrapper {
        height: 300px;
    }
    
    .stacked-carousel-card {
        max-width: 240px;
    }
    
    .stacked-carousel-content {
        padding: 1.5rem 1.5rem;
    }
    
    .stacked-carousel-title {
        font-size: 1.25rem;
    }
    
    .stacked-carousel-step,
    .stacked-carousel-description {
        font-size: 0.75rem;
    }
}

/* Loading State */
.stacked-carousel-container.loading .stacked-carousel-slide {
    opacity: 0;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .stacked-carousel-slide {
        transition: none;
    }
}

