/* Slider Text to Logo Animation */
.slider-content-wrapper {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 450px;
}

/* Initial text state */
.slider-text-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-text-content.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-30px) scale(0.95);
}

/* Logo content state */
.slider-logo-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.slider-logo-content.fade-in {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}


.slider-logo-content img {
    max-width: 220px;
    height: auto;
    margin-bottom: 15px;
    margin-top: -80px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider-logo-content.fade-in img {
    animation: modernScaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}


.slider-logo-subtext {
    font-size: 40px;
    line-height: 66px;
    color: white;
    font-family: var(--heading-font);
    margin-top: -35px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}


.slider-logo-subtext[style*="color: rgb(0, 0, 0)"] {
    text-shadow: 0 4px 8px rgba(255, 255, 255, 0.4);
}


.slider-text-content h1 {
    animation: modernSlideIn 1s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left center;
}

@keyframes modernSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-60px) translateY(10px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) translateY(0);
        filter: blur(0);
    }
}

/* Animation for the logo */
@keyframes modernScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.7) rotate(-5deg);
        filter: blur(8px);
    }

    60% {
        transform: scale(1.05) rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0);
    }
}

/* Animation for the subtext */
.slider-logo-content.fade-in .slider-logo-subtext {
    animation: modernFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes modernFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px) translateX(-20px);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) translateX(0);
        filter: blur(0);
    }
}

/* Button Animation - Keep button always visible */
.slider-content-wrapper .build_button {
    animation: modernButtonEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease;
    position: relative;
    z-index: 20;
    opacity: 1 !important;
}

@keyframes modernButtonEntrance {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(4px);
    }

    70% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Button Hover Animation */
.slider-content-wrapper .build_button:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.slider-content-wrapper .build_button:active {
    transform: translateY(-1px) scale(1.02) !important;
    transition: transform 0.1s ease;
}

/* Responsive adjustments */
/* Laptop view (1024px - 1920px) */
@media (min-width: 1024px) and (max-width: 1920px) {
    .slider-content-wrapper {
        width: 420px;
    }

    .slider-text-content h1 {
        font-size: 42px !important;
        line-height: 56px !important;
    }

    .slider-logo-content img {
        max-width: 220px !important;
        margin-top: -80px !important;
        margin-bottom: 15px !important;
    }

    .slider-logo-subtext {
        font-size: 35px !important;
        line-height: 56px !important;
        margin-top: -35px !important;
    }

    /* Move logo/text closer to button for specific sliders */
    /* uPVC Solutions - Herrlich logo */
    .banner__two-area:nth-child(2) .slider-logo-content {
        margin-top: 0px;
        /* Adjust this value to move logo up/down */
    }

    .banner__two-area:nth-child(2) .slider-logo-content img {
        margin-top: 0px !important;
        /* Adjust logo top spacing */
        margin-bottom: 10px !important;
        /* Adjust space between logo and text */
    }

    .banner__two-area:nth-child(2) .slider-logo-subtext {
        margin-top: 0px !important;
        /* Adjust text position below logo */
    }

    /* Wardrobes - Leto Wardrobe logo */
    .banner__two-area:nth-child(3) .slider-logo-content {
        margin-top: 0px;
        /* Adjust this value to move logo up/down */
    }

    .banner__two-area:nth-child(3) .slider-logo-content img {
        margin-top: 0px !important;
        /* Adjust logo top spacing */
        margin-bottom: 10px !important;
        /* Adjust space between logo and text */
    }

    .banner__two-area:nth-child(3) .slider-logo-subtext {
        margin-top: 0px !important;
        /* Adjust text position below logo */
    }

    /* Solid Surface - Durasein logo */
    .banner__two-area:nth-child(4) .slider-logo-content {
        margin-top: 0px;
        /* Adjust this value to move logo up/down */
    }

    .banner__two-area:nth-child(4) .slider-logo-content img {
        margin-top: 0px !important;
        /* Adjust logo top spacing */
        margin-bottom: 10px !important;
        /* Adjust space between logo and text */
    }

    .banner__two-area:nth-child(4) .slider-logo-subtext {
        margin-top: 0px !important;
        /* Adjust text position below logo */
    }

    /* Timber Doors - Engineering Doors logo */
    .banner__two-area:nth-child(5) .slider-logo-content {
        margin-top: 0px;
        /* Adjust this value to move logo up/down */
    }

    .banner__two-area:nth-child(5) .slider-logo-content img {
        margin-top: 0px !important;
        /* Adjust logo top spacing */
        margin-bottom: 10px !important;
        /* Adjust space between logo and text */
    }

    .banner__two-area:nth-child(5) .slider-logo-subtext {
        margin-top: 0px !important;
        /* Adjust text position below logo */
    }

    /* Total Interior Solutions - Centrepoint Homes logo - DISABLED */
    .banner__two-area:nth-child(6) .slider-logo-content {
        display: none !important;
        /* Hide logo content completely */
    }

    .banner__two-area:nth-child(6) .slider-text-content {
        opacity: 1 !important;
        /* Keep text always visible */
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }

    .banner__two-area:nth-child(6) .slider-text-content.fade-out {
        opacity: 1 !important;
        /* Prevent fade-out */
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }

    .build_button {
        margin-top: 50px !important;
    }
}

/* Tablet view */
@media (max-width: 768px) {
    .slider-content-wrapper {
        width: 90%;
        left: 5%;
    }

    .slider-text-content h1 {
        font-size: 32px !important;
        line-height: 42px !important;
        white-space: normal !important;
    }

    .slider-logo-content img {
        max-width: 80px;
        margin-top: -30px;
    }

    .slider-logo-subtext {
        font-size: 28px !important;
        line-height: 38px !important;
        white-space: normal !important;
        margin-top: 15px;
    }

    .slider-content-wrapper .build_button {
        font-size: 14px;
        padding: 12px 24px;
        margin-top: 20px !important;
    }
}

/* Mobile view */
@media (max-width: 480px) {
    .slider-content-wrapper {
        width: 95%;
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .slider-text-content {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
        width: 100%;
        text-align: center;
    }

    .slider-text-content.fade-out {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) scale(1) !important;
    }

    .slider-text-content h1 {
        font-size: 22px !important;
        line-height: 30px !important;
        white-space: normal !important;
        margin-bottom: 15px !important;
        text-align: center;
    }

    .slider-logo-content {
        display: none !important;
    }

    .slider-logo-content img {
        display: none !important;
    }

    .slider-logo-subtext {
        display: none !important;
    }

    .slider-content-wrapper .build_button {
        font-size: 12px;
        padding: 10px 20px;
        margin-top: 15px !important;
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        display: inline-block;
    }

    /* Reduce animation intensity on mobile */
    @keyframes modernSlideIn {
        0% {
            opacity: 0;
            transform: translateX(-30px) translateY(5px);
            filter: blur(2px);
        }

        100% {
            opacity: 1;
            transform: translateX(0) translateY(0);
            filter: blur(0);
        }
    }

    @keyframes modernScaleIn {
        0% {
            opacity: 0;
            transform: scale(0.85) rotate(-3deg);
            filter: blur(4px);
        }

        60% {
            transform: scale(1.02) rotate(0deg);
        }

        100% {
            opacity: 1;
            transform: scale(1) rotate(0deg);
            filter: blur(0);
        }
    }

    @keyframes modernFadeInUp {
        0% {
            opacity: 0;
            transform: translateY(20px) translateX(-10px);
            filter: blur(2px);
        }

        100% {
            opacity: 1;
            transform: translateY(0) translateX(0);
            filter: blur(0);
        }
    }

    @keyframes modernButtonEntrance {
        0% {
            opacity: 0;
            transform: translateY(15px) scale(0.95);
            filter: blur(2px);
        }

        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
            filter: blur(0);
        }
    }
}