/* SLIDER CSS - OPTIMIZED WITH NEW TRANSITIONS */
.slide-title, .slide-description, .slide-button {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.6s ease !important;
}

.slide-title.show, .slide-description.show, .slide-button.show {
    opacity: 1 !important;
    visibility: visible !important;
}
/* CSS Variables */
:root {
    --vh: 1vh;
    --dynamic-vh: 100vh;
    --slider-width: 100%;
    --slider-height: 480px;
    --slider-height-mobile: 480px;
}

/* Full-Height Background */
.background {
    width: 100vw;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 0px !important;
}

/* Slider Container */
.slider-container {
    width: var(--slider-width, 100%);
    height: var(--slider-height, 480px);
    max-height: var(--slider-height, 480px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 0 auto;
    overflow: hidden;
    perspective: 1200px; /* For 3D effects */
}

/* Base slider styles */
.slider {
    width: 100%;
    height: 100%;
    position: relative;
}

/* SLIDE transition (default) */
.transition-slide {
    display: flex;
    transition: transform 0.8s ease-in-out;
}

.transition-slide .slide {
    min-width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* FADE transition */
.transition-fade {
    position: relative;
}

.transition-fade .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-fade .slide.active {
    opacity: 1;
    z-index: 1;
}

/* ZOOM transition */
.transition-zoom {
    position: relative;
}

.transition-zoom .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.9);
    transition: transform 0.8s ease, opacity 0.8s ease;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-zoom .slide.active {
    transform: scale(1);
    opacity: 1;
    z-index: 1;
}

/* NEW TRANSITIONS */

/* FLIP transition */
.transition-flip {
    position: relative;
    transform-style: preserve-3d;
}

.transition-flip .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(90deg);
    transition: transform 0.8s ease-in-out;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-flip .slide.active {
    transform: rotateY(0deg);
    z-index: 1;
}

/* CUBE transition */
.transition-cube {
    position: relative;
    transform-style: preserve-3d;
}

.transition-cube .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateX(90deg);
    transition: transform 0.8s ease-in-out;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-cube .slide.active {
    transform: rotateX(0deg);
    z-index: 1;
}

/* COVERFLOW transition */
.transition-coverflow {
    display: flex;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
}

.transition-coverflow .slide {
    min-width: 100%;
    max-width: 100%;
    height: 100%;
    position: relative;
    transform-origin: center center;
    transition: transform 0.8s ease-in-out, opacity 0.8s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-coverflow .slide:not(.active) {
    opacity: 0.7;
    transform: scale(0.85) rotateY(45deg);
}

/* CARDS transition */
.transition-cards {
    position: relative;
}

.transition-cards .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(100%) scale(0.9);
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.8s ease;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

.transition-cards .slide.active {
    transform: translateX(0%) scale(1);
    opacity: 1;
    z-index: 1;
}

.transition-cards .slide.prev {
    transform: translateX(-100%) scale(0.9);
    opacity: 0.5;
    z-index: 0;
}

/* CREATIVE transition */
.transition-creative {
    position: relative;
    overflow: hidden;
}

.transition-creative .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateZ(45deg) scale(0.5);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-creative .slide.active {
    transform: rotateZ(0deg) scale(1);
    opacity: 1;
    z-index: 1;
}

/* PUSH transition */
.transition-push {
    position: relative;
    overflow: hidden;
}

.transition-push .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
    transition: transform 0.8s ease-in-out;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-push .slide.active {
    transform: translateY(0%);
    z-index: 1;
}

.transition-push .slide.prev {
    transform: translateY(-100%);
    z-index: 0;
}

/* REVEAL transition */
.transition-reveal {
    position: relative;
}

.transition-reveal .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: circle(0% at 50% 50%);
    transition: clip-path 0.8s ease-in-out;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.transition-reveal .slide.active {
    clip-path: circle(100% at 50% 50%);
    z-index: 1;
}

/* FULLSCREEN LAYOUT STYLES */
.slide-fullscreen {
    position: relative;
}

.slide-fullscreen .slide-image {
    width: 100%;
    height: 100%;
    display: block;
}

.slide-fullscreen .slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: object-position 0.3s ease-in-out;
}

.slide-fullscreen .slide-link {
    width: 100%;
    height: 100%;
    display: block;
}

/* SPLIT LAYOUT STYLES */
.slide-split-image-left,
.slide-split-image-right {
    position: relative;
}

.slide-split-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.slide-image-section {
    flex: 0 0 var(--image-width, 50%);
    width: var(--image-width, 50%);
    position: relative;
    overflow: hidden;
}

.slide-text-section {
    flex: 0 0 var(--text-width, 50%);
    width: var(--text-width, 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-origin: padding-box;
    background-clip: border-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-text-section[style*="background-image"] {
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: transparent;
    background-blend-mode: normal !important;
}

.slide-image-section .slide-image {
    width: 100%;
    height: 100%;
    display: block;
}

.slide-image-section .slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.slide-image-section .slide-link {
    width: 100%;
    height: 100%;
    display: block;
}

.text-content-wrapper {
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 2;
}

/* Background overlay for better text readability */
.text-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.7 !important;
    mix-blend-mode: multiply;
}

/* Text Content Styling for Fullscreen */
.slide-fullscreen .text-content {
    position: absolute;
    top: 60%;
    color: white;
    opacity: 1;
    z-index: 10;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

/* Alignment Classes for Fullscreen */
.slide-fullscreen .text-left {
    left: 5%;
    text-align: left;
    transform: translateY(-50%);
}

.slide-fullscreen .text-center {
    left: 50%;
    text-align: center;
    transform: translate(-50%, -50%);
}

.slide-fullscreen .text-right {
    right: 5%;
    text-align: right;
    transform: translateY(-50%);
}

/* Alignment Classes for Split Layouts */
.slide-text-section.text-left {
    text-align: left;
    justify-content: flex-start;
}

.slide-text-section.text-center {
    text-align: center;
    justify-content: center;
}

.slide-text-section.text-right {
    text-align: right;
    justify-content: flex-end;
}

/* Text element styles */
.title {
    font-size: 2rem;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.description {
    font-size: 1rem;
    margin: 0 0 20px 0;
    line-height: 1.5;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

/* Split layout text (remove text-shadow for better readability on colored backgrounds) */
.slide-text-section .title {
    text-shadow: none;
}

.slide-text-section .description {
    text-shadow: none;
}

/* BUTTON STYLES */
.slide-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    color: white;
    background-color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid transparent;
    cursor: pointer;
}

.slide-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Alternative button style for split layouts */
.slide-text-section .slide-button {
    border: 2px solid currentColor;
    background-color: transparent;
}

.slide-text-section .slide-button:hover {
    background-color: currentColor;
    color: #000;
}

/* Navigation Buttons */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

.prev:hover, .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

/* Hide navigation when disabled */
.slider-container[data-show-nav="false"] .prev,
.slider-container[data-show-nav="false"] .next {
    display: none;
}

/* PAGINATION STYLES */
.slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.pagination-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.pagination-dot:hover {
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.pagination-dot.active {
    background-color: white;
    border-color: white;
    transform: scale(1.3);
}

/* Hide pagination when disabled */
.slider-container[data-show-pagination="false"] .slider-pagination {
    display: none;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    .background {
        width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
    }

    .slider-container {
        width: 100vw !important;
        height: 480px !important;
        max-height: 480px !important;
        min-height: 480px !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* Disable 3D effects on mobile for better performance */
    .transition-flip .slide,
    .transition-cube .slide,
    .transition-coverflow .slide {
        transform: none !important;
        transition: opacity 0.8s ease !important;
    }

    .transition-flip .slide.active,
    .transition-cube .slide.active,
    .transition-coverflow .slide.active {
        opacity: 1 !important;
        z-index: 1 !important;
    }

    .transition-flip .slide:not(.active),
    .transition-cube .slide:not(.active),
    .transition-coverflow .slide:not(.active) {
        opacity: 0 !important;
        z-index: 0 !important;
    }

    /* All transition slides mobile layout */
    .transition-slide .slide,
    .transition-fade .slide,
    .transition-zoom .slide,
    .transition-flip .slide,
    .transition-cube .slide,
    .transition-coverflow .slide,
    .transition-cards .slide,
    .transition-creative .slide,
    .transition-push .slide,
    .transition-reveal .slide {
        min-width: 100vw !important;
        max-width: 100vw !important;
        width: 100vw !important;
        height: 480px !important;
        max-height: 480px !important;
        min-height: 480px !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Split layouts mobile */
    .slide-split-container {
        flex-direction: column !important;
        height: 480px !important;
    }
    
    .slide-image-section {
        flex: none !important;
        width: 100% !important;
        height: 240px !important;
        order: 1 !important;
    }

    .slide-text-section {
        flex: none !important;
        width: 100% !important;
        height: 240px !important;
        order: 2 !important;
        padding: 15px 20px !important;
    }

    /* Mobile font sizes */
    .title { font-size: 2rem !important; }
    .description { font-size: 1rem !important; }
    .slide-button { font-size: 0.85rem !important; }

    /* Mobile navigation */
    .prev, .next {
        width: 35px !important;
        height: 35px !important;
        font-size: 14px !important;
    }

    .pagination-dot {
        width: 8px !important;
        height: 8px !important;
    }
}

/* Focus and hover states for better accessibility */
.slide-text-section .slide-button:focus,
.slide-text-section .slide-button:hover {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}