/* ---------- Sekcja ---------- */

.integrations-section {
    width: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px;
    box-sizing: border-box;
}

.integrations-box {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ---------- Diagram ---------- */

.integrations-diagram {
    width: 100%;
    max-width: 960px;
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.integrations-hub {
    position: relative;
    z-index: 1;
    width: clamp(80px, 13vw, 124px);
    aspect-ratio: 1;
    border-radius: 24px;
    background: #087443;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: integrations-glow 2.4s ease-in-out infinite;
}

.integrations-hub svg,
.integrations-hub img {
    width: 46%;
    height: auto;
}

@keyframes integrations-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(8, 116, 67, 0.25); }
    50%      { box-shadow: 0 0 0 14px rgba(8, 116, 67, 0); }
}

/* ---------- Linie ---------- */

.integrations-lines {
    display: block;
    width: 100%;
    height: auto;          /* skaluje się proporcjonalnie → linie zawsze trafiają w środek kafli */
    overflow: visible;
}

.integrations-lines path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.integrations-lines-base path {
    stroke: #d6e4da;
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;   /* zawsze 1.5px, niezależnie od szerokości ekranu */
}

/* Świecąca kreska płynąca od logo do narzędzi */
.integrations-lines-pulse path {
    stroke: #087443;
    stroke-width: 3;
    stroke-dasharray: 14 200;
    stroke-dashoffset: 14;
    animation: integrations-pulse 2.4s linear infinite;
    animation-delay: var(--delay, 0s);
}

@keyframes integrations-pulse {
    from { stroke-dashoffset: 14; }
    to   { stroke-dashoffset: -100; }
}

/* ---------- Kafle narzędzi ---------- */

.integrations-list {
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);   /* środki kolumn: 10/30/50/70/90% = końce linii */
}

.integrations-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.integrations-tile {
    width: clamp(52px, 10vw, 98px);
    aspect-ratio: 1;
    border-radius: 20px;
    background: #F1F5ED;
    border: 1px solid #e5ece7;
    color: #101c19;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.integrations-tile svg,
.integrations-tile img {
    width: 42%;
    height: auto;
}

.integrations-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(16, 28, 25, 0.08);
}

.integrations-label {
    margin-top: 12px;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 500;
    letter-spacing: -0.3px;
    font-size: 14px;
    line-height: 20px;
    color: #101c19;
}

/* ---------- Responsywność ---------- */

@media (max-width: 640px) {
    .integrations-section {
        padding: 60px 20px;
    }

    .integrations-diagram {
        margin-top: 40px;
    }

    .integrations-hub {
        border-radius: 18px;
    }

    .integrations-tile {
        border-radius: 14px;
    }

    /* Na wąskim ekranie viewBox jest mocno pomniejszony → grubsza kreska w jednostkach SVG */
    .integrations-lines-pulse path {
        stroke-width: 6;
    }

    .integrations-label {
        font-size: 11px;
        margin-top: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .integrations-hub,
    .integrations-lines-pulse path {
        animation: none;
    }

    .integrations-lines-pulse {
        display: none;
    }
}

