/**
 * Homepage Slider Styles
 * Original from: Swiper + GSAP (Claude code)
 *
 * REVERSAL: Delete this file to remove slider styles
 */

.slider-container {
    width: 95vw;
    height: 93svh;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
    border-radius: 0 0 0 1.5rem;
}

.slider-container::before{
    content: " ";
    width: 256px;
    height: 183px;
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
    left: auto !important;
    z-index: 10;
    -webkit-transform: scaleX(-1);
    transform: scaleX(-1);
    background: url(../../../../wp-content/uploads/2024/07/slider-corner.svg) no-repeat;
    visibility: visible;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    opacity: 1 !important; /* Override Swiper's fade effect */
}

/* Background Image Styling */
.slide-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1);
    z-index: 1;
    pointer-events: none;
}

/* Stack-based layering system for reveal effect */
/* All slides start at z-index 1 (bottom of stack) */
.swiper-slide {
    z-index: 1;
}

/* Next slide sits at z-index 2 (ready underneath current) */
.swiper-slide-next {
    z-index: 2;
}

/* Previous slide also at z-index 2 (for backward navigation) */
.swiper-slide-prev {
    z-index: 2;
}

/* Active slide on top at z-index 3 (fades out to reveal underneath) */
.swiper-slide-active {
    z-index: 3;
}

/* Overlay for better text readability */
.slide-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(18, 28, 34, 0.4) 40%, rgba(18, 28, 34, 0.8) 100%);
    mix-blend-mode: multiply;
}

/* Content Container - Base */
.slide-content {
    position: absolute;
    z-index: 5;
    color: white;
}

/* Desktop Positioning (768px and above) */
@media (min-width: 768px) {
    /* Desktop Vertical Positioning */
    .slide-content.slide-desktop-vertical-bottom {
        bottom: 8.5rem;
        top: auto;
    }

    .slide-content.slide-desktop-vertical-center {
        top: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Desktop Horizontal Alignment */
    .slide-content.slide-desktop-align-left {
        left: 6rem;
        right: auto;
        width: calc(100% - 12rem);
        max-width: 60rem;
        text-align: left;
    }

    .slide-content.slide-desktop-align-center {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 60rem;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        padding: 0 2rem;
    }
}

/* Mobile Positioning (767px and below) */
@media (max-width: 767px) {
    /* Mobile Vertical Positioning */
    .slide-content.slide-mobile-vertical-bottom {
        bottom: 8.5rem;
        top: auto;
    }

    .slide-content.slide-mobile-vertical-center {
        top: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Mobile Horizontal Alignment */
    .slide-content.slide-mobile-align-left {
        left: 2rem;
        right: auto;
        width: calc(100% - 4rem);
        max-width: 100%;
        text-align: left;
    }

    .slide-content.slide-mobile-align-center {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        padding: 0 2rem;
    }
}

/* Title Styling with Masking */
.slide-title {
    font-size: clamp(2rem, 2.5rem, 3rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 20px;
    position: relative;
    color: #FFF;
    filter: blur(0px);
}

.slide-title:last-child{
    margin:0;
}

/* Word wrapper for masking effect */
.slide-title > span {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

/* Character wrapper for split text animation */
.slide-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    will-change: transform, opacity;
}

/* Paragraph Styling */
.slide-paragraph {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 2.25rem;
    opacity: 0;
    transform: translateY(30%);
    max-width: 100%;
    will-change: transform, opacity;
}

.slide-paragraph:last-child{
    margin:0;
}

/* CTA Button Styling */
.slide-cta {
    width: fit-content;
    display: inline-block;
    padding: 0.88rem 1.5rem 0.88rem 1.5rem;
    background: #FFF;
    color: #1e2f38;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.6rem;
    font-family: 'Saira', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 0.5rem;
    /* Removed transition to prevent conflict with GSAP */
    opacity: 0;
    transform: translateY(30%);
    will-change: transform, opacity;
    transition: background 0.25s ease-out; /* Only transition properties not animated by GSAP */
}

.slide-cta:hover {
    background: #C4C2C0;
    color: #0F181C;
    /* Removed transform from hover - let GSAP handle position */
}

/* Swiper Navigation Buttons */
.swiper-button-prev,
.swiper-button-next {
    color: white;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-prev{
    left: 2rem;
}

.swiper-button-next{
    right: 2rem;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(18, 28, 34, 0.8);
    transform: scale(1.1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 20px;
}

/* Swiper Pagination */
.swiper-pagination {
    bottom: 24px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 6px;
}

@media (max-width: 1280px){

    .slider-container{
        border-radius: 0 0 0 1.8rem;
    }

    .slider-container::before{
        width: 164px;
        height: 118px;
    }
    
}

@media (max-width: 980px) {

    .slider-container{
        width: 95vw;
        height: 84vh;
    }

    .slide-title {
        font-size: 2.5rem;
    }

    .swiper-button-prev{
        left: 1rem;
    }

    .swiper-button-next{
        right: 1rem;
    }

    .swiper-button-prev:hover,
    .swiper-button-next:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: none;
    }
        
}


/* Responsive Design */
@media (max-width: 768px) {

    .slider-container{
        height: 84vh;
        border-radius: 0 0 0 1.25rem;
    }
    
    .slider-container::before{
        width: 88px;
        height: 63.32px;
    }

    .slide-background::after{
        background:linear-gradient(180deg, rgba(18, 28, 34, 0.4) 40%, rgba(18, 28, 34, 0.8) 100%);
    }
    
    .slide-content.slide-align-left {
        width: calc(100% - 60px);
        left: 2rem;
        right: 2rem;
    }

    .slide-content.slide-vertical-center {
        top: 0;
        bottom: 8.5rem;
        display: flex;
        flex-direction: column;
        justify-content: end;
    }

    .slide-title {
        font-size: 2.25rem;
        margin-bottom: 15px;
    }

    .slide-paragraph {
        margin-bottom: 2rem;
    }

    .slide-cta {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .swiper-pagination{
        bottom: 0.5rem !important;
    }

    .swiper-button-prev, .swiper-button-next{
        width: 2.5rem;
        height: 2.5rem;       
        top:calc(100% - 5rem);
    }

    .swiper-button-prev{
        left: 2rem;
    }

    .swiper-button-next{
        right: 2rem;
    }
    
}
