/* Animationen für die Services-Sektion */

/* Magnet-Animation und andere Animationen bleiben erhalten */

.matrix-rain::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
                rgba(0,0,0,0.8) 0%, 
                rgba(0,0,0,0) 20%, 
                rgba(0,0,0,0) 80%, 
                rgba(0,0,0,0.8) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Matrix-Zeichen */
@keyframes matrixRain {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(100%);
    }
}

/* Generiere Matrix-Zeichen mit JavaScript */
.matrix-rain::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, 
            transparent 0px, 
            transparent 25px, 
            rgba(240, 58, 112, 0.15) 25px, 
            rgba(240, 58, 112, 0.15) 26px),
        repeating-linear-gradient(90deg, 
            transparent 0px, 
            transparent 25px, 
            rgba(240, 58, 112, 0.15) 25px, 
            rgba(240, 58, 112, 0.15) 26px);
    animation: matrixGrid 20s linear infinite;
}

@keyframes matrixGrid {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 50px 50px;
    }
}

/* Einzelne Matrix-Spalten */
.matrix-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(rgba(240, 58, 112, 0.7) 1px, transparent 1px),
        radial-gradient(rgba(240, 58, 112, 0.5) 1px, transparent 1px),
        radial-gradient(rgba(240, 58, 112, 0.3) 1px, transparent 1px);
    background-size: 20px 20px, 15px 15px, 10px 10px;
    background-position: 0 0, 10px 10px, 5px 5px;
    animation: matrixDots 8s linear infinite;
}

@keyframes matrixDots {
    0% {
        background-position: 0 0, 10px 10px, 5px 5px;
    }
    100% {
        background-position: 0 100px, 10px 110px, 5px 105px;
    }
}

/* Services Sektion mit Scroll-Transition */
.services-section {
    min-height: 100vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
    background: #000000;
    overflow: hidden;
    z-index: 1;
}

.service-container {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

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

.service-slide.active {
    opacity: 1;
    z-index: 2;
}

.service-content {
    padding: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.service-row {
    display: flex;
    align-items: center;
}

/* Text-Bereich */
.service-text {
    padding: 2rem;
}

.service-text h2 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    white-space: nowrap;
    padding-bottom: 5px;
}

.service-text h2 .text-gradient {
    background: linear-gradient(45deg, var(--logo-gradient-start), var(--logo-gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

/* Speziell für den Klick-Text, damit er sichtbar ist */
.klick-animation {
    background: linear-gradient(45deg, var(--logo-gradient-start), var(--logo-gradient-end)) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 0 2px rgba(240, 58, 112, 0.5) !important;
    position: relative;
    animation: klickAnimation 4s ease-in-out infinite;
}

/* Mobile: Animation standardmäßig aktiv, aber optimiert */
@media (max-width: 768px) {
    .service-website .klick-animation {
        animation: klickAnimation 4s ease-in-out infinite;
        animation-play-state: paused;
    }
    
    .service-website.animate .klick-animation {
        animation-play-state: running !important;
    }
}

@keyframes klickAnimation {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 2px rgba(240, 58, 112, 0.5);
    }
    28% {
        transform: scale(1);
        text-shadow: 0 0 2px rgba(240, 58, 112, 0.5);
    }
    30% {
        transform: scale(0.92);
        text-shadow: 0 0 4px rgba(240, 58, 112, 0.8);
    }
    33% {
        transform: scale(1);
        text-shadow: 0 0 6px rgba(240, 58, 112, 0.9);
    }
    36% {
        transform: scale(1.05);
        text-shadow: 0 0 8px rgba(240, 58, 112, 0.7);
    }
    40% {
        transform: scale(1);
        text-shadow: 0 0 2px rgba(240, 58, 112, 0.5);
    }
}

/* Herz-Animation für "Liebe" - nur wenn sichtbar */
.liebe-animation {
    position: relative;
    overflow: visible;
}

/* Mobile: Herz-Animation standardmäßig pausiert */
@media (max-width: 768px) {
    .service-app .liebe-animation::before,
    .service-app .liebe-animation::after,
    .service-app .liebe-animation .heart-1,
    .service-app .liebe-animation .heart-2,
    .service-app .liebe-animation .heart-3 {
        animation-play-state: paused;
    }
    
    .service-app.animate .liebe-animation::before,
    .service-app.animate .liebe-animation::after,
    .service-app.animate .liebe-animation .heart-1,
    .service-app.animate .liebe-animation .heart-2,
    .service-app.animate .liebe-animation .heart-3 {
        animation-play-state: running !important;
    }
}

.liebe-animation::before,
.liebe-animation::after,
.liebe-animation .heart-1,
.liebe-animation .heart-2,
.liebe-animation .heart-3 {
    content: '\2665'; /* Herz-Symbol */
    position: absolute;
    font-size: 20px;
    color: var(--primary-pink);
    opacity: 0;
    z-index: -1; /* Hinter dem Text */
    filter: drop-shadow(0 0 5px rgba(240, 58, 112, 0.7));
    transform-origin: center bottom;
    top: 50%;
}

.liebe-animation::before {
    animation: floatHeart 6s ease-out infinite;
    animation-delay: 0.5s;
    left: 10%;
}

.liebe-animation::after {
    animation: floatHeart 6s ease-out infinite;
    animation-delay: 2.5s;
    font-size: 16px;
    left: 30%;
}

.liebe-animation .heart-1 {
    animation: floatHeart 6s ease-out infinite;
    animation-delay: 1.5s;
    font-size: 18px;
    left: 50%;
}

.liebe-animation .heart-2 {
    animation: floatHeart 6s ease-out infinite;
    animation-delay: 3.5s;
    font-size: 22px;
    left: 70%;
}

.liebe-animation .heart-3 {
    animation: floatHeart 6s ease-out infinite;
    animation-delay: 4.5s;
    font-size: 14px;
    left: 90%;
}

/* Magnet-Animation für "Magnet" */
.magnet-container {
    position: relative;
    display: inline-block;
}

.magnet-animation {
    position: relative;
    display: inline-block;
    transition: transform 0.5s ease;
}

.magnet-icon {
    position: absolute;
    top: -8px;
    right: -75px;
    width: 60px;
    height: 60px;
    background-image: url("../images/magneticoncompiaz.png");
    background-size: contain;
    background-repeat: no-repeat;
    transform: rotate(0deg);
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
    z-index: 2;
}

/* Das Magnet-Icon ist von Anfang an sichtbar und bleibt an seiner Position */

.service-ecommerce.active .magnet-animation {
    animation: magnetAttract 4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
    animation-delay: 0.5s;
}


@keyframes magnetAttract {
    /* Anfangsposition */
    0% { transform: translateX(-40px) rotate(0deg); }
    
    /* Leichtes Vibrieren */
    10% { transform: translateX(-39px) rotate(0.5deg); }
    20% { transform: translateX(-40px) rotate(-0.5deg); }
    
    /* Langsame Annäherung */
    60% { transform: translateX(-20px) rotate(1deg); }
    
    /* Beschleunigte Anziehung zum Magneten */
    85% { transform: translateY(-4px) translateX(0px) rotate(4deg); }
    
    /* Schneller Endspurt */
    100% { transform: translateY(-8px) translateX(35px) rotate(8deg); }
}

@keyframes magnetAppear {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); }
}

/* Herz-Animation für "Liebe" */
@keyframes floatHeart {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.3) rotate(-10deg);
    }
    10% {
        opacity: 0.9;
        transform: translateY(-10px) translateX(-10%) scale(0.6) rotate(-5deg);
    }
    30% {
        opacity: 1;
        transform: translateY(-30px) translateX(10%) scale(0.8) rotate(5deg);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-60px) translateX(-5%) scale(0.9) rotate(-5deg);
    }
    70% {
        opacity: 0.6;
        transform: translateY(-90px) translateX(5%) scale(0.7) rotate(5deg);
    }
    90% {
        opacity: 0.2;
        transform: translateY(-120px) translateX(-5%) scale(0.5) rotate(-5deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-140px) scale(0.3) rotate(0);
    }
}

/* Cursor Animation für "Klick" - nur wenn sichtbar */
.klick-animation::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background-image: url('../images/cursor.svg');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    animation: cursorClick 4s ease-in-out infinite;
}

/* Mobile: Cursor-Animation standardmäßig pausiert */
@media (max-width: 768px) {
    .service-website .klick-animation::before {
        animation: cursorClick 4s ease-in-out infinite;
        animation-play-state: paused;
    }
    
    .service-website.animate .klick-animation::before {
        animation-play-state: running !important;
    }
}

@keyframes cursorClick {
    0%, 100% {
        opacity: 0;
        top: -30px;
        left: 0;
        transform: scale(0.8);
    }
    10% {
        opacity: 1;
        top: -20px;
        left: 20px;
        transform: scale(1);
    }
    20% {
        top: 10px;
        left: 40px;
    }
    25% {
        transform: scale(0.9);
    }
    30% {
        transform: scale(1);
        top: 10px;
        left: 40px;
    }
    35% {
        top: 10px;
        left: 40px;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        top: -20px;
        left: 20px;
    }
    50% {
        opacity: 0;
        top: -30px;
        left: 0;
    }
}

.service-text h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-color);
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.service-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.service-text .btn {
    margin-top: 1rem;
}

/* Bild-Bereich */
.service-image-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease;
}

.service-image-container:hover .service-image {
    transform: scale(1.03);
}

/* Leuchtender Kreis-Effekt für verschiedene Services */
.service-image-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    border-radius: 50%;
    filter: blur(5px);
    z-index: 0;
    animation: pulse 4s infinite alternate;
}

/* Unterschiedliche Farben für die verschiedenen Services */
.service-website .service-image-container::before {
    background: rgba(0, 123, 255, 0.1);
    box-shadow: 
        0 0 30px 10px rgba(0, 123, 255, 0.2),
        0 0 60px 20px rgba(0, 123, 255, 0.1),
        0 0 100px 30px rgba(0, 123, 255, 0.05);
}

.service-app .service-image-container::before {
    background: rgba(240, 58, 112, 0.1);
    box-shadow: 
        0 0 30px 10px rgba(240, 58, 112, 0.2),
        0 0 60px 20px rgba(240, 58, 112, 0.1),
        0 0 100px 30px rgba(240, 58, 112, 0.05);
}

.service-ecommerce .service-image-container::before {
    background: rgba(52, 191, 73, 0.1);
    box-shadow: 
        0 0 30px 10px rgba(52, 191, 73, 0.2),
        0 0 60px 20px rgba(52, 191, 73, 0.1),
        0 0 100px 30px rgba(52, 191, 73, 0.05);
}

.service-ai .service-image-container::before {
    background: rgba(255, 193, 7, 0.1);
    box-shadow: 
        0 0 30px 10px rgba(255, 193, 7, 0.2),
        0 0 60px 20px rgba(255, 193, 7, 0.1),
        0 0 100px 30px rgba(255, 193, 7, 0.05);
}

/* Navigation */
.service-nav {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-nav-item {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-nav-item.active {
    background: var(--primary-pink);
    transform: scale(1.3);
}

/* Mobile First - Services komplett neu */
@media (max-width: 768px) {
    .services-section {
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        background: #000000 !important;
        background-image: none !important;
        background-color: #000000 !important;
        padding: 2rem 1rem !important;
        min-height: auto !important;
        display: block !important;
        background: #000000 !important;
        overflow: visible !important;
    }
    
    .service-image-container {
        background: transparent !important;
        padding: 1rem !important;
        text-align: center !important;
    }
    
    .service-image-container::before {
        display: none !important;
    }
    
    .service-website .service-image-container::before,
    .service-app .service-image-container::before,
    .service-ecommerce .service-image-container::before,
    .service-ai .service-image-container::before {
        display: none !important;
    }
    
    .service-image {
        background: transparent !important;
    }
    
    /* Magnet Animation für Mobile - nur wenn sichtbar */
    .service-ecommerce.animate .magnet-animation {
        animation: magnetAttract 4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards !important;
        animation-delay: 0.5s !important;
    }
    
    .service-ecommerce .magnet-animation {
        animation: magnetAttract 4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
        animation-delay: 0.5s;
        animation-play-state: paused;
    }
    
    .service-ecommerce.animate .magnet-animation {
        animation-play-state: running !important;
    }
    
    /* Magnet Icon kleiner auf Mobile */
    .magnet-icon {
        width: 35px !important;
        height: 35px !important;
        top: -5px !important;
        right: -45px !important;
    }
    
    .service-container {
        position: static !important;
        min-height: auto !important;
        padding: 0 !important;
        display: block !important;
        width: 100% !important;
    }
    
    .service-slide {
        position: static !important;
        opacity: 1 !important;
        display: block !important;
        margin-bottom: 3rem !important;
        height: auto !important;
        width: 100% !important;
    }
    
    .service-content {
        padding: 0 !important;
        width: 100% !important;
        display: block !important;
    }
    
    .service-row {
        display: block !important;
        flex-direction: column !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .service-text {
        margin-bottom: 1.5rem !important;
        text-align: center !important;
        padding: 1rem !important;
    }
    
    .service-text h2 {
        font-size: 1.8rem !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .service-text h3 {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .service-text p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .service-image-container {
        padding: 1rem !important;
        text-align: center !important;
    }
    
    .service-image {
        width: 100% !important;
        max-width: 400px !important;
        height: auto !important;
    }
    
    .service-nav {
        display: none !important;
    }
}

@media (max-width: 991px) and (min-width: 769px) {
    .services-section {
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 3rem 1rem !important;
        min-height: auto !important;
        display: block !important;
    }
    
    .service-container {
        position: static !important;
        min-height: auto !important;
        padding: 0 !important;
        display: block !important;
    }
    
    .service-slide {
        position: static !important;
        opacity: 1 !important;
        display: block !important;
        margin-bottom: 4rem !important;
        height: auto !important;
    }
    
    .service-row {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .service-text {
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
    
    .service-text h2 {
        font-size: 2.5rem !important;
        white-space: normal !important;
    }
    
    .service-text h3 {
        font-size: 1.4rem !important;
    }
    
    .service-nav {
        display: none !important;
    }
}
