/**
 * Services Section - Seamless Infinite Carousel
 * Date: 2025-11-08
 * Komplett neue Struktur für nahtloses Laufband
 */

/* ================================================================
   SPACING FIX: Minimaler Abstand zwischen Hero und Services
   ================================================================ */

.hero-b2b {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.services {
    margin-top: 0 !important; /* Kein Overlap, sauber direkt darunter */
    padding-top: 0 !important; /* Komplett entfernt für maximale Kompaktheit */
    padding-bottom: 1rem !important; /* Reduziert von 1.5rem */
}

/* ================================================================
   SERVICES SECTION - GLASSMORPHISM BACKGROUND
   ================================================================ */

.services {
    position: relative;
    display: block !important; /* Sicherstellen, dass keine Flex/Grid von anderen CSS überschreibt */
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(80px);
    overflow: visible !important; /* WICHTIG: visible statt hidden, damit Content nicht abgeschnitten wird */
}

/* Glassmorphism-Overlay - WEIẞ statt lila */
.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Container für Header - Volle Breite, kein Einfluss auf Layout */
.services .container {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Section Header - Zentriert, Mehr Abstand */
.services .section-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 2rem !important; /* Vergrößert für mehr Abstand */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem; /* Nur seitliches Padding für Mobile */
}

.services .section-header h2 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8000ff, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem !important; /* Reduziert von 0.5rem */
}

.services .section-subtitle {
    font-size: 1.25rem;
    color: rgba(107, 114, 128, 0.9);
    font-weight: 400;
    margin: 0 !important;
}

/* ================================================================
   SEAMLESS CAROUSEL - Wrapper & Track
   ================================================================ */

.services-carousel-wrapper {
    position: relative;
    /* VOLLE VIEWPORT BREITE - Edge to Edge */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden; /* Hier bleibt hidden für Carousel-Effekt */
    z-index: 1;
    /* Fade-Effekte an den Rändern */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 5%,
        black 95%,
        transparent 100%
    );
}

.services-carousel-track {
    display: flex;
    gap: 2rem;
    width: fit-content;
    padding: 0 2rem; /* Padding links/rechts für erste/letzte Card */
    /* Animation wird via JavaScript gesteuert */
    will-change: transform;
}

/* Pause on Hover */
.services-carousel-track.paused {
    animation-play-state: paused !important;
}

/* ================================================================
   SERVICE CARDS - GLASSMORPHISM DESIGN
   ================================================================ */

.services .service-card {
    /* Layout - Gleiche Höhe für alle Karten */
    flex: 0 0 400px;
    min-width: 400px;
    max-width: 400px;
    height: 280px; /* Feste Höhe für einheitliche Darstellung */
    padding: 1.25rem; /* Weiter reduziert für kompaktere Darstellung */

    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);

    /* Border */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;

    /* Shadow */
    box-shadow:
        0 8px 32px rgba(31, 38, 135, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);

    /* Display */
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Reduziert für kompaktere Darstellung */

    /* Link Styling */
    text-decoration: none;
    color: inherit;

    /* Transitions */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Hover */
.services .service-card:hover {
    transform: translateY(-12px);
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow:
        0 20px 60px rgba(128, 0, 255, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-color: rgba(128, 0, 255, 0.3);
}

/* ================================================================
   SERVICE CARD ELEMENTS
   ================================================================ */

/* Icon */
.services .service-icon {
    width: 72px;
    height: 72px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg,
        rgba(128, 0, 255, 0.1),
        rgba(99, 102, 241, 0.1)
    );
    backdrop-filter: blur(10px);
    border: 1px solid rgba(128, 0, 255, 0.2);
    box-shadow:
        0 4px 16px rgba(128, 0, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.services .service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg,
        rgba(128, 0, 255, 0.15),
        rgba(99, 102, 241, 0.15)
    );
    box-shadow:
        0 8px 24px rgba(128, 0, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Title */
.services .service-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0.1rem 0; /* Weiter reduziert für kompaktere Darstellung */
    line-height: 1.2; /* Reduziert von 1.3 */
}

/* Tagline */
.services .service-tagline {
    font-size: 1rem;
    font-weight: 600;
    color: #8000ff;
    margin-bottom: 0.1rem; /* Weiter reduziert für kompaktere Darstellung */
    line-height: 1.3;
}

/* Description */
.services .service-description {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.4; /* Reduziert von 1.6 für kompaktere Darstellung */
    margin-bottom: 0.5rem; /* Weiter reduziert für kompaktere Darstellung */
}

/* Feature List */
.services .service-features {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0; /* Weiter reduziert für kompaktere Darstellung */
    flex-grow: 1;
}

.services .service-features li {
    font-size: 0.9rem;
    color: #4b5563;
    padding-left: 0; /* Padding entfernt, da Häkchen weg */
    margin-bottom: 0.25rem; /* Weiter reduziert für kompaktere Darstellung */
    position: relative;
    line-height: 1.4; /* Kompaktere Zeilenhöhe */
}

.services .service-features li::before {
    content: ''; /* Häkchen entfernt */
    display: none;
}

/* Learn More Link */
.services .learn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #8000ff;
    text-decoration: none;
    margin-top: auto;
    transition: all 0.3s ease;
}

.services .learn-more:hover {
    gap: 0.75rem;
    color: #6000cc;
}

/* ================================================================
   RESPONSIVE - MOBILE & TABLET
   ================================================================ */

/* Desktop Carousel bleibt aktiv bis 768px */
@media (min-width: 769px) {
    /* Carousel is active via JavaScript */
    .services-carousel-track {
        /* JavaScript controls animation */
    }
}

/* Tablet (below 769px) - Grid Layout */
@media (max-width: 768px) {
    .services-carousel-wrapper {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .services-carousel-track {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        width: auto;
        padding: 0 2rem;
        transform: none !important; /* Disable any transform */
    }

    .services .service-card {
        flex: none;
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .services {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .services .section-header h2 {
        font-size: 2rem;
    }

    .services .section-subtitle {
        font-size: 1rem;
    }

    .services-carousel-track {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .services .service-card {
        min-height: auto;
        padding: 1.5rem;
    }
}
