:root {
    --xivotec-primary: #002340;
    --xivotec-accent: #0cbcdb;
    --xivotec-text: #333333;
    --xivotec-bg-light: #f4f6f8;

    /* Abgeleitet */
    --xivotec-dark: #001629;
    --xivotec-accent-hover: #09a8c4;
    --xivotec-accent-glow: rgba(12, 188, 219, 0.25);
    --xivotec-accent-subtle: rgba(12, 188, 219, 0.08);
    --xivotec-text-dark-headline: #ffffff;
    --xivotec-text-dark-body: #B8C8D8;
    --xivotec-border-dark: rgba(12, 188, 219, 0.15);
}

/* Base Styles */
body {
    font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
    color: var(--xivotec-text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Syne', 'DM Sans', sans-serif;
    font-weight: 700;
    margin-top: 0;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.leistung-section {
    padding: 64px 20px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100vw;
}

@media (min-width: 1024px) {
    .leistung-section {
        padding: 120px 0;
    }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 1. HERO SECTION */
.hero-section {
    background-color: var(--xivotec-dark);
    color: var(--xivotec-text-dark-headline);
    min-height: 50;
    display: flex;
    align-items: center;
    position: relative;
    background-image: radial-gradient(circle at 50% 50%, rgba(12, 188, 219, 0.05) 0%, transparent 60%); 
    /* Net pattern simulation with simple CSS if SVG not available, or use SVG if provided */
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9InJnYmEoMTIsMTg4LDIxOSwwLjEyKSIvPjwvc3ZnPg=='); /* Simple dot pattern as placeholder for "network pattern" */
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center; /* Mobile center align */
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        text-align: left; /* Desktop left align */
    }
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #ffffff;
}

.hero-text .highlight {
    color: var(--xivotec-accent);
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--xivotec-text-dark-body);
    margin-bottom: 40px;
    max-width: 500px;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .hero-text h1 {
        font-size: 4.5rem;
    }
}

.scroll-down-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #B8C8D8;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.scroll-down-link:hover {
    color: var(--xivotec-accent);
}

.scroll-arrow {
    margin-right: 8px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-5px);}
    60% {transform: translateY(-3px);}
}

.hero-illustration {
    display: none;
}

@media (min-width: 1024px) {
    .hero-illustration {
        display: block;
        width: 100%;
        height: auto;
        opacity: 0.8;
    }
}

/* 2. LEISTUNGS-GRID (Legacy Styles - Overridden Below) */
.services-section {
    background-color: var(--xivotec-bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--xivotec-text);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,35,64,0.08); /* Legacy shadow */
    position: relative;
    transition: all 0.3s ease;
    border-top: 3px solid transparent;
    overflow: hidden;
}

/* 3. PROZESS-SECTION */
.process-section {
    background-color: var(--xivotec-primary);
    color: #ffffff;
}

.process-header h2 {
    color: #ffffff;
}
.process-header p {
    color: var(--xivotec-text-dark-body);
}

.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    position: relative;
    margin-top: 60px;
}

.process-step {
    background: var(--xivotec-dark);
    border: 1px solid rgba(12,188,219,0.2);
    border-radius: 10px;
    padding: 24px;
    position: relative;
    z-index: 2;
}

.step-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--xivotec-accent);
    margin-bottom: 12px;
    display: block;
}

.step-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(12,188,219,0.12);
    color: var(--xivotec-accent);
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 99px;
    font-family: 'JetBrains Mono', monospace;
}

.process-step h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: #ffffff;
}

.process-step p {
    font-size: 0.95rem;
    color: var(--xivotec-text-dark-body);
    line-height: 1.5;
}

/* Connectors Mobile */
.process-grid::before {
    display: none !important;
}

@media (min-width: 1024px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 80px;
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
        overflow: visible;
    }

    .process-step:nth-child(n) { grid-column: auto; grid-row: auto; }

    /* Connector Logic for 2-column S-shape */
    .process-step::after {
        content: '';
        position: absolute;
        background: rgba(12,188,219,0.4);
        z-index: 1;
        display: none;
    }

    .process-step:nth-child(1) { grid-column: 1; grid-row: 1; }
    .process-step:nth-child(2) { grid-column: 2; grid-row: 1; }

    .process-step:nth-child(3) { grid-column: 2; grid-row: 2; }
    .process-step:nth-child(4) { grid-column: 1; grid-row: 2; }

    .process-step:nth-child(5) { grid-column: 1; grid-row: 3; }
    .process-step:nth-child(6) { grid-column: 2; grid-row: 3; }

    .process-step:nth-child(7) { grid-column: 2; grid-row: 4; }
    .process-step:nth-child(8) { grid-column: 1; grid-row: 4; }


    /* Arrow/Connector Directions */

    /* 1->2: RIGHT */
    .process-step:nth-child(1)::after {
        display: block;
        width: 110px; height: 2px;
        right: -110px; top: 50%;
    }

    /* 2->3: DOWN */
    .process-step:nth-child(2)::after {
        display: block;
        width: 2px; height: 110px;
        left: 50%; top: 100%;
    }

    /* 3->4: LEFT */
    .process-step:nth-child(3)::after {
        display: block;
        width: 110px; height: 2px;
        left: -110px; top: 50%;
    }

    /* 4->5: DOWN */
    .process-step:nth-child(4)::after {
        display: block;
        width: 2px; height: 110px;
        left: 50%; top: 100%;
    }

    /* 5->6: RIGHT */
    .process-step:nth-child(5)::after {
        display: block;
        width: 110px; height: 2px;
        right: -110px; top: 50%;
    }

    /* 6->7: DOWN */
    .process-step:nth-child(6)::after {
        display: block;
        width: 2px; height: 110px;
        left: 50%; top: 100%;
    }

    /* 7->8: LEFT */
    .process-step:nth-child(7)::after {
        display: block;
        width: 110px; height: 2px;
        left: -110px; top: 50%;
    }
}

/* Mobile: force single column and prevent clipping */
@media (max-width: 1023px) {
    .process-section.leistung-section {
        overflow: visible;
        padding-left: 12px;
        padding-right: 12px;
    }

    .process-section .container {
        padding: 0 8px;
    }

    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
        max-width: 100%;
    }

    .process-step {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .process-step::after {
        display: none !important;
    }
}

/* Small phones: further reduce padding */
@media (max-width: 480px) {
    .process-section.leistung-section {
        padding-left: 8px;
        padding-right: 8px;
    }

    .process-section .container {
        padding: 0 4px;
    }

    .process-step {
        padding: 18px 14px;
    }

    .process-step h3 {
        font-size: 1.1rem;
    }

    .process-step p {
        font-size: 0.9rem;
    }

    .process-header h2 {
        font-size: 1.8rem;
    }

    .process-header p {
        font-size: 0.95rem;
    }
}

/* 4. TECHNOLOGY STRIP */
.tech-section {
    background-color: var(--xivotec-bg-light);
    padding: 40px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.tech-title {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.tech-badge {
    background: #ffffff;
    border: 1px solid rgba(0,35,64,0.12);
    color: var(--xivotec-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 99px;
    white-space: nowrap;
}

/* 5. WHY US */
.why-section {
    background-color: var(--xivotec-dark);
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0; /* Border separation handled by CSS */
    border: 1px solid rgba(12,188,219,0.1);
    border-radius: 12px;
    overflow: hidden;
}


@media (min-width: 768px) {
    .why-grid {
        grid-template-columns: 1fr 1fr;
    }
    .why-item:nth-child(odd) {
        border-right: 1px solid rgba(12,188,219,0.1);
    }
    .why-item:nth-child(2n) {
        border-right: none;
    }
    .why-item:nth-last-child(1), .why-item:nth-last-child(2) {
        border-bottom: none;
    }
}

.why-item {
    padding: 40px;
    display: flex;
    align-items: flex-start;
    border-bottom: 1px solid rgba(12,188,219,0.1);
    transition: background 0.3s;
}

.why-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    margin-right: 24px;
    color: var(--xivotec-accent-subtle); /* subtle initially */
    transition: color 0.3s;
}

.why-item:hover .why-icon {
    color: var(--xivotec-accent);
}

.why-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.why-content h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.why-content p {
    font-size: 1rem;
    color: var(--xivotec-text-dark-body);
    line-height: 1.6;
}

/* 6. CTA SECTION */
.cta-section {
    background-color: var(--xivotec-dark);
    text-align: center;
    padding-bottom: 120px;
}

.cta-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(12, 188, 219, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(12, 188, 219, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .cta-title {
        font-size: 3.5rem;
    }
}

.cta-title span {
    color: var(--xivotec-accent);
}

.cta-subtext {
    font-size: 1.25rem;
    color: var(--xivotec-text-dark-body);
    margin-bottom: 48px;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
justify-content: normal;    
align-items: center;
    margin-bottom: 24px;
}

@media (min-width: 480px) {
    .cta-buttons {
        flex-direction: row;
    }
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px 32px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--xivotec-accent);
    color: white;
    box-shadow: 0 0 20px rgba(12, 188, 219, 0.35);
    border: none;
}

.btn-primary:hover {
    background: var(--xivotec-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 25px rgba(12, 188, 219, 0.5);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--xivotec-accent);
    color: var(--xivotec-accent);
}

.btn-secondary:hover {
    background: rgba(12, 188, 219, 0.1);
}

.cta-note {
    font-size: 13px;
    color: var(--xivotec-text-dark-body);
    opacity: 0.7;
}

/* ==========================================================================
   PORTED SERVICES & CARD STYLES (NEW - OVERRIDES LEGACY)
   ========================================================================== */

/* Section Layout */
.services-section {
    padding: 2rem 0 5rem;
    /* Keeps background color from base styles */
}

/* Intro Text Container */
.services-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.services-intro h2 {
    color: var(--xivotec-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.services-intro p {
    color: var(--xivotec-text);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Grid Layout Override */
.services-grid {
    display: grid;
    /* Use auto-fit for responsive layout instead of fixed columns */
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* White Card Component (Ported from global.css .biz-card-white) */
.biz-card-white {
    position: relative;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    overflow: hidden;
}

/* Hover effects */
.biz-card-white:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 35, 64, 0.15);
    border-color: rgba(0, 35, 64, 0.3);
}

/* Left accent bar on hover */
.biz-card-white::before {
    content: '';
    position: absolute;
    top: 0; 
    left: 0;
    width: 4px; 
    height: 0%; /* Grows on hover */
    background: var(--xivotec-primary); /* Uses primary/accent color */
    transition: height 0.4s ease;
    z-index: 1;
}

.biz-card-white:hover::before {
    height: 100%;
}

/* Service Inner Elements (Ported from services.css structure) */
.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    width: 100%;
    position: relative; /* Ensure header sits above content */
}

.service-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--xivotec-accent);
    font-weight: 600;
    background: rgba(12, 188, 219, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
}

/* Icon Styling */
.service-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    /* If SVG, ensure it inherits colors if needed, but img tag is used here */
}

/* Title Styling */
.service-title {
    font-size: 1.5rem;
    color: var(--xivotec-primary);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Description Styling */
.service-description {
    font-size: 1rem;
    color: var(--xivotec-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes footer down */
}

/* Tags List */
.service-tags {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-tags li {
    font-size: 0.8rem;
    background: var(--xivotec-bg-light);
    color: var(--xivotec-primary); /* Dark text on light bg */
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Link Styling */
.service-link {
    display: inline-flex;
    align-items: center;
    color: var(--xivotec-primary);
    font-weight: 600;
    text-decoration: none;
    margin-top: auto;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.service-link:hover {
    color: var(--xivotec-accent);
}

.service-link::after {
    content: '→';
    display: inline-block;
    margin-left: 6px;
    transition: transform 0.2s ease;
}

.service-link:hover::after {
    transform: translateX(4px);
}

/* Tech Stack Section */
.tech-stack-section {
    padding: 5rem 0;
    background-color: var(--xivotec-bg-light); /* Or white if preferred */
    border-top: 1px solid rgba(0,0,0,0.05);
}

.tech-intro {
    max-width: 800px;
    margin-bottom: 3rem;
}

.tech-intro h2 {
    color: var(--xivotec-primary);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.tech-intro p {
    color: var(--xivotec-text);
    font-size: 1.1rem;
    line-height: 1.6;
}

.tech-stack-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns like innfactory */
    column-gap: 4rem;
    row-gap: 3rem;
}

.tech-category h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--xivotec-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0,0,0,0.05); /* Subtle separator */
}

.tech-items-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem; /* Small Gap between pills */
}

/* Tech Pill Card */
.tech-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px; /* Slightly rounded */
    padding: 0.5rem 1rem; /* Compact padding */
    transition: all 0.2s ease;
}

.tech-card:hover {
    border-color: var(--xivotec-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.tech-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 0.75rem; 
}

.tech-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--xivotec-primary);
    white-space: nowrap;
}

/* Responsive Tech Stack */
@media (max-width: 768px) {
    .tech-stack-container {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
        gap: 2rem;
    }
}


