/**
 * Pretpot Stylish Animation 1 - Styles
 * @package Pretpot_Massive_Addons_Kit_For_Elementor
 * @since 2.7.5
 */

.pretpot-stylish-animation-1 {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Image Layer */
.pretpot-sa1-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.8s ease-in-out, opacity 0.8s ease-in-out;
    opacity: 1;
    z-index: 1;
}

.pretpot-sa1-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Content Container */
.pretpot-sa1-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    text-align: center;
    padding: 20px;
}

/* Heading Styles */
.pretpot-sa1-heading {
    margin: 0 0 30px;
    opacity: 0;
    transform: translateY(20px);
}

.pretpot-sa1-heading.animated-fade {
    animation: pretpotFadeInUp 1s ease forwards;
}

.pretpot-sa1-heading.animated-typewriter {
    opacity: 1;
    transform: none;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid;
    width: 0;
    animation: pretpotTypewriter 2s steps(40) forwards,
               pretpotBlinkCursor 0.75s step-end infinite;
}

@keyframes pretpotTypewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes pretpotBlinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: currentColor; }
}

@keyframes pretpotFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Description Styles */
.pretpot-sa1-description {
    margin: 0 0 30px;
    opacity: 0;
    animation: pretpotFadeInUp 1s ease 0.5s forwards;
}

.pretpot-sa1-description p:last-child {
    margin-bottom: 0;
}

/* Thumbnails Wrapper */
.pretpot-sa1-thumbnails-wrap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
    min-height: 100px;
}

/* Thumbnails Container */
.pretpot-sa1-thumbnails {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    position: relative;
    transform: translateX(0);
    will-change: transform;
}

/* During entrance - show background color only */
.pretpot-stylish-animation-1.entrance-animating .pretpot-sa1-bg {
    background-image: none !important;
    opacity: 1;
}

/* Initial state - scrolling animation */
.pretpot-sa1-thumbnails.scrolling {
    animation: none;
    justify-content: flex-start;
}

/* Continuous seamless scroll animation */
@keyframes pretpotScrollSeamless {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Individual thumbnail during scroll - all small and equal */
.pretpot-sa1-thumbnails.scrolling .pretpot-sa1-thumbnail {
    transition: none;
    transform: scale(1) !important;
    opacity: 1 !important;
}

/* Last thumbnail grows during final transition */
.pretpot-sa1-thumbnail.zoom-last {
    animation: pretpotZoomLastItem 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards !important;
    z-index: 10;
}

@keyframes pretpotZoomLastItem {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    60% {
        transform: scale(2.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(10);
        opacity: 0;
    }
}

/* After scrolling - settled state */
.pretpot-sa1-thumbnails.settled {
    animation: none !important;
    transform: translateX(0) !important;
}

/* Individual Thumbnail */
.pretpot-sa1-thumbnail {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-sizing: border-box;
    opacity: 1;
    transform: scale(1);
}

/* During scrolling - thumbnails are small */
.pretpot-sa1-thumbnails.scrolling .pretpot-sa1-thumbnail {
    transition: none;
    transform: scale(0.8);
    opacity: 0.9;
}

/* During zoom out phase - smooth transition from scroll to settled */
.pretpot-sa1-thumbnails.zooming .pretpot-sa1-thumbnail {
    animation: pretpotZoomOut 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes pretpotZoomOut {
    0% {
        transform: scale(0.8);
        opacity: 0.9;
    }
    40% {
        transform: scale(1.5);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading State */
.pretpot-stylish-animation-1.loading .pretpot-sa1-content {
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pretpot-sa1-content {
        padding: 15px;
    }
    
    .pretpot-sa1-heading {
        margin-bottom: 20px;
    }
    
    .pretpot-sa1-description {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .pretpot-sa1-thumbnails {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .pretpot-sa1-heading.animated-typewriter {
        white-space: normal;
        border-right: none;
        animation: pretpotFadeInUp 1s ease forwards;
    }
}

@media (max-width: 480px) {
    .pretpot-sa1-content {
        padding: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pretpot-sa1-thumbnails.scrolling,
    .pretpot-sa1-thumbnails.zooming .pretpot-sa1-thumbnail,
    .pretpot-sa1-heading,
    .pretpot-sa1-description,
    .pretpot-sa1-bg,
    .pretpot-sa1-thumbnail,
    .pretpot-sa1-thumbnail img {
        animation: none !important;
        transition: none !important;
    }
    
    .pretpot-sa1-heading,
    .pretpot-sa1-description {
        opacity: 1;
        transform: none;
    }
}