/* How It Works Section Styles */
.section-how-it-works {
    padding: 120px 0;
    background-color: #e0f2fe !important;
    overflow: visible;
    position: relative;
}

/* Wave Container Top */
.section-how-it-works .wave-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    height: 100px;
    transform: rotate(180deg);
}

.section-how-it-works .wave-top .wave-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: #fff;
    overflow: hidden;
}

.section-how-it-works .wave-top .single-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M1200,0V46.29c-47.79,22.2-103.59,32.17-158,28-70.36-5.37-136.33-33.31-206.8-37.5C761.36,32.43,687.66,53.67,617,72.05c-69.27,18-138.3,24.88-209.4,13.08-36.15-6-69.85-17.84-104.45-29.34C210.51,25,87,14.29,0,52.47V0Z' fill='%23e0f2fe'%3E%3C/path%3E%3C/svg%3E") repeat-x;
    background-size: 1200px 100px;
    animation: wave-animation 25s linear infinite;
    opacity: 1;
}

/* Wave Container Bottom */
.section-how-it-works .wave-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(0deg);
}

.section-how-it-works .wave-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 70px;
}

.section-how-it-works .wave-bottom .shape-fill {
    fill: #FFFFFF;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 700;
}

.section-description {
    font-size: 1.3rem;
    color: #444;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.how-it-works-wrapper {
    margin-top: 10px;
    position: relative;
}

/* Step Block - Common Styles */
.hiw-step-block {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    opacity: 1; /* Ensure always visible */
    transform: translateY(0); /* Reset any transforms */
}

.hiw-step-block:last-child {
    margin-bottom: 0;
}

/* Text Content Styles */
.hiw-content-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    z-index: 10;
}

.hiw-step-content {
    max-width: 400px;
    text-align: center;
}

.hiw-step-number {
    font-size: 5rem;
    font-weight: 800;
    color: #4e6ef2;
    margin-bottom: 1rem;
    line-height: 1;
    opacity: 0.9;
}

.hiw-step-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
}

.hiw-step-description {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}

/* Image Container Styles */
.hiw-image-container {
    flex: 1;
    position: relative;
    height: 400px;
    overflow: visible;
    z-index: 5;
}

.hiw-parallax-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hiw-main-image {
    position: absolute;
    border-radius: 15px;
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    z-index: 2;
    transform-style: preserve-3d;
}

.hiw-secondary-image {
    position: absolute;
    border-radius: 15px;
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    z-index: 1;
    opacity: 0.85;
    /* Animation entfernt - keine sekundären Bilder vorhanden */
}

/* Position images for each container */
.hiw-image-left .hiw-main-image {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: coinFlipVertical 5s infinite ease-in-out;
}

.hiw-image-left .hiw-secondary-image {
    top: 60%;
    left: 60%;
    transform: translate(-40%, -40%);
}

.hiw-image-right .hiw-main-image,
.hiw-image-right .hiw-main-image.right-aligned {
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    animation: coinFlipHorizontal 5s infinite ease-in-out 1.5s !important;
}

.hiw-image-right .hiw-secondary-image {
    top: 60%;
    right: 60%;
    transform: translate(40%, -40%);
}

/* Spezifische Animation-Delays für verschiedene Schritte */
.hiw-step-block[data-step="1"] .hiw-main-image {
    animation-delay: 0s; /* Icon 1 startet normal */
}

.hiw-step-block[data-step="2"] .hiw-main-image {
    animation-delay: 1.5s; /* Icon 2 startet mit 1.5s Verzögerung */
}

.hiw-step-block[data-step="3"] .hiw-main-image {
    animation-delay: -1s; /* Icon 3 startet 1 Sekunde früher als Icon 1 */
}

/* Münz-Flip Animation vertikal für linke Icons */
@keyframes coinFlipVertical {
    0% { 
        transform: translate(-50%, -50%) perspective(1000px) rotateY(0deg);
    }
    15% { 
        transform: translate(-50%, -50%) perspective(1000px) rotateY(180deg);
    }
    30% { 
        transform: translate(-50%, -50%) perspective(1000px) rotateY(360deg);
    }
    100% { 
        transform: translate(-50%, -50%) perspective(1000px) rotateY(360deg);
    }
}

/* Münz-Flip Animation horizontal für rechte Icons mit zeitlicher Versetzung */
@keyframes coinFlipHorizontal {
    0% { 
        transform: translate(50%, -50%) perspective(1000px) rotateX(0deg);
    }
    15% { 
        transform: translate(50%, -50%) perspective(1000px) rotateX(180deg);
    }
    30% { 
        transform: translate(50%, -50%) perspective(1000px) rotateX(360deg);
    }
    100% { 
        transform: translate(50%, -50%) perspective(1000px) rotateX(360deg);
    }
}

@keyframes floatReverse {
    0% {
        transform: translate(-40%, -40%);
    }
    25% {
        transform: translate(-42%, -38%);
    }
    50% {
        transform: translate(-38%, -42%);
    }
    75% {
        transform: translate(-36%, -40%);
    }
    100% {
        transform: translate(-40%, -40%);
    }
}

/* Custom animations for right-aligned images - ENTFERNT für Münz-Animation */

/* Alte Float-Animationen entfernt - nur noch Münz-Animationen aktiv */

/* Media queries for responsive design */
@media (max-width: 991px) {
    .hiw-step-block {
        flex-direction: column;
        margin-bottom: 100px;
    }
    
    .hiw-content-container {
        padding: 40px 20px;
        order: 1; /* Always show text below image on mobile */
    }
    
    .hiw-image-container {
        height: 400px;
        width: 100%;
        order: 0; /* Always show image above text on mobile */
    }
    
    .hiw-step-content {
        text-align: center;
    }
    
    /* Adjust image positioning for mobile */
    .hiw-image-left .hiw-main-image,
    .hiw-image-right .hiw-main-image {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        animation: float 8s ease-in-out infinite;
    }
    
    .hiw-image-left .hiw-secondary-image,
    .hiw-image-right .hiw-secondary-image {
        top: 60%;
        left: 60%;
        transform: translate(-40%, -40%);
        animation: floatReverse 9s ease-in-out infinite;
    }
}