.as-wrapper {
    position: relative;
    width: 100%;
    /* Container height adapts to content or viewport, 
       but cards are absolute so we might want a min-height or inherit */
    height: var(--as-height-mobile, 100vh); 
    overflow: hidden;
    background: transparent; /* Changed from #000 */
    color: white;
    font-family: system-ui, -apple-system, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.as-header {
    position: absolute;
    top: 0; left: 0; width: 100%;
    padding: 2.5rem 1.5rem 1rem;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 100; pointer-events: none;
}

.as-header h3 {
    font-size: 1.25rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    margin: 0; color: white;
}

/* Container */
.as-container {
    position: relative;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
    overflow: hidden;
}

/* Cards */
.as-card {
    position: absolute;
    top: 50%;
    /* Use CSS Variables for Height */
    height: var(--as-height-mobile, 75vh); 
    transform: translateY(-50%);
    border-radius: 24px;
    overflow: hidden;
    will-change: width, left;
    
}

.as-card-inner {
    width: 100%; height: 100%;
    position: relative;
    overflow: hidden;
}

/* Image centering logic */
.as-card-img {
    position: absolute;
    height: 100%;
    width: 80vw; /* Default mobile max width */
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    object-fit: cover;
    pointer-events: none;
    transition: transform 0.1s;
}

.as-card-overlay {
    position: absolute; inset: 0;
    /*background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.8) 100%);*/
    z-index: 2;
}

.as-card-content {
    position: absolute; bottom: 0; left: 50%; 
    transform: translateX(-50%);
    width: 80vw;
    padding: 2rem;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.2s;
    text-align: left;
}

.as-card.is-active .as-card-content { opacity: 1; transition-delay: 0.3s; }

.as-card-title { font-size: 2.5rem; font-weight: 800; line-height: 1; margin-bottom: 0.5rem; color: white; }
.as-card-sub { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; color: #aaa; margin-bottom: 1rem; }
.as-card-desc { font-size: 1rem; color: #ccc; max-width: 90%; line-height: 1.4; }

/* Pagination Dots */
.as-pagination {
    position: absolute; bottom: 2rem; width: 100%;
    display: flex; justify-content: center; gap: 6px; z-index: 50;
}

.as-pip { height: 4px; width: 4px; border-radius: 2px; background: #555; transition: 0.3s; }
.as-pip.active { width: 24px; background: white; }

/* Navigation Buttons (Desktop) */
.as-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px; height: 56px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 200;
    display: none; /* Hidden on mobile */
    align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.as-nav-btn:hover { background: rgba(255,255,255,0.2); transform: translateY(-50%) scale(1.1); }
.as-prev { left: 2rem; }
.as-next { right: 2rem; }

/* Desktop Overrides */
@media (min-width: 1024px) {
    .as-wrapper {
        height: var(--as-height-desktop, 100vh); 
    }
    .as-nav-btn { display: flex; }
    
    .as-card {
        /* Use CSS Variable for Desktop Height */
        height: var(--as-height-desktop, 75vh);
    }

    /* Ensure images cover full card in desktop mode */
    .as-card-img { width: 100% !important; } 
    .as-card-content { width: 100% !important; }
}