/* 1. Container & Initial State */
.aes-slider-container {
    position: relative;
    width: 100%;
    height: 100%; /* 85vh Standard height */
    min-height: 500px;
    background: #000;
    overflow: hidden;
}

/* 2. Loading Animation (Spinner) */
.aes-loader {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.aes-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #0056b3; /* Brand Blue */
    animation: aes-spin 1s ease-in-out infinite;
}

@keyframes aes-spin {
    to { transform: rotate(360deg); }
}

/* 3. Slider Stage - Hidden until initialized */
.aes-stage {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.aes-stage.swiper-initialized {
    opacity: 1;
}

/* 4. Swiper Layout Fixes (Prevents Stacking) */
.aes-stage .swiper-wrapper {
    display: flex !important;
    flex-direction: row !important;
}

/* While loading: only show the first slide to prevent vertical bleed */
.aes-stage:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none !important;
}

.aes-stage .swiper-slide {
    flex-shrink: 0 !important;
    width: 100% !important;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* 5. Media Handling (Video/Image) */
.aes-stage .slider-media {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: scale-down;
    z-index: 1;
}

/* 6. Text Overlay & Headline */


.aes-stage .slide-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10 !important;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%) !important;
    display: flex !important;
    align-items: flex-start !important; 
    padding-top: 15vh !important;
    padding-left: 10% !important;
    pointer-events: none;
}

.aes-stage .slide-text {
    pointer-events: auto;
    max-width: 550px;
    position: absolute;
    top: 120px;
}

.aes-stage .forced-headline {
    color: #ffffff !important;
    /* clamp ensures it scales properly with browser zoom */
    font-size: clamp(0.9rem, 2.5vw, 1.9rem) !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
    margin: 0 0 30px 0 !important;
    display: block !important;
}

/* 7. Navigation Buttons */
.swiper-button-next, .swiper-button-prev {
    width: 60px !important;
    height: 60px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid white !important;
    border-radius: 50% !important;
    color: white !important;
    transition: all 0.3s ease;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: #0056b3 !important;
    border-color: #0056b3 !important;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 22px !important;
}

/* Hide navigation until initialized */
.aes-stage:not(.swiper-initialized) .swiper-button-next,
.aes-stage:not(.swiper-initialized) .swiper-button-prev {
    display: none !important;
}