/* ==========================================================================
   SEKCJA: WORKERS / TEAM (Ostateczna, zgodna 1:1 ze wzorcem)
   ========================================================================== */

/* Animacje wejścia */
@keyframes slideBottom {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Animacje pływania (lewitacji kół) */
@keyframes teamFloatA { 
    0%, 100% { translate: 0 0; } 
    50% { translate: 6px -14px; } 
}
@keyframes teamFloatB { 
    0%, 100% { translate: 0 0; } 
    50% { translate: -10px 10px; } 
}
@keyframes teamFloatC { 
    0%, 100% { translate: 0 0; } 
    50% { translate: 4px 12px; } 
}

/* Animacje pulsowania ringów z oryginalnego CSS */
@keyframes ringPulse1 { 
    0%, 100% { inset: -9%; opacity: 0.9; } 
    50% { inset: -16%; opacity: 0.35; } 
}
@keyframes ringPulse2 { 
    0%, 100% { inset: -20%; opacity: 0.55; } 
    50% { inset: -11%; opacity: 0.95; } 
}
@keyframes ringPulse3 { 
    0%, 100% { inset: -32%; opacity: 0.5; } 
    50% { inset: -19%; opacity: 0.85; } 
}

.workers-group {
    .container{
        padding-left: 0;
        padding-right: 0;
    }
    background: #ffffff;
    color: #292b31;
    padding: clamp(48px, 7vw, 84px) clamp(20px, 5vw, 72px);
    overflow-x: hidden;

    .workers-container-grid {
        max-width: 1230px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
        gap: 48px clamp(32px, 6vw, 80px);
        align-items: center;
    }

    .animation-slide-bottom {
        animation: slideBottom 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }

    .workers-intro {
        .module-title {
            padding: 0;
            margin: 0;
            text-align: left;

            .module-supertitle-text {
                display: flex;
                align-items: center;
                gap: 10px;
                margin-bottom: 18px;
                font-size: 12px;
                letter-spacing: 0.1em;
                text-transform: uppercase;
                color: #9397ab;
                font-weight: 500;

                &::before {
                    content: "";
                    display: inline-block;
                    width: 28px;
                    height: 2px;
                    background: #9397ab;
                }
            }

            .module-title-text {
                    font-family: 'Chivo Mono', monospace;
                    font-weight: 500;
                    font-size: clamp(32px, 4.4vw, 56px);
                    line-height: 1.12;
                    letter-spacing: 0.117em;
                    margin: 0px 0px 0px -0.06em;
                    max-width: 16ch;
                    will-change: letter-spacing;
                    text-transform: uppercase;
                    text-align: left;
            }

            .module-subtitle-text{
                margin: 22px 0px 0px;
                font-size: 15.5px;
                line-height: 1.65;
                max-width: 52ch;
                color: #595d6c;
                text-transform: uppercase;
                text-align: justify;
                letter-spacing: 0.048em;
                will-change: letter-spacing;
                font-weight: 400;
                font-family: 'Chivo Mono', monospace;
                display: inline-flex;
                flex-direction: column;
            }
            span{
                margin: 14px 0 0 0;
                letter-spacing: 0.048em;
            }
        }
    }

    .team-cluster {
        position: relative;
        min-height: clamp(440px, 120vw, 640px);
        max-width: 720px;
        width: 100%;

        .team-ball {
            position: absolute;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
            box-shadow: 0 0 0 6px #ffffff, 0 16px 40px rgba(0, 0, 0, 0.12);

            &.team-b1 {
                left: 2%;
                top: 0;
                width: clamp(180px, 50vw, 290px);
                height: clamp(180px, 50vw, 290px);
                z-index: 1;
                animation: teamFloatA 7s ease-in-out infinite;
            }

            &.team-b2 {
                left: 52%;
                top: 36px;
                width: clamp(180px, 50vw, 290px);
                height: clamp(180px, 50vw, 290px);
                z-index: 1;
                animation: teamFloatB 9s ease-in-out infinite 0.8s;
            }

            &.team-b3 {
                left: 22%;
                top: clamp(170px, 46vw, 265px);
                width: clamp(210px, 58vw, 350px);
                height: clamp(210px, 58vw, 350px);
                z-index: 2;
                box-shadow: 0 0 0 6px #ffffff, 0 16px 40px rgba(0, 0, 0, 0.18);
                animation: teamFloatC 8s ease-in-out infinite 0.4s;
            }

            &:hover {
                transform: scale(1.07); 
                /* Efekt hovera glow połączony z rozmiarem */
                box-shadow: 0 0 0 6px #ffffff, 0 0 44px rgba(145, 132, 217, 0.45); 
                z-index: 5 !important;
            }

            /* --- Animowane Pierścienie (Orbity 1:1 wg wzorca) --- */
            .team-ring {
                position: absolute;
                border-radius: 50%;
                pointer-events: none;
                /* Baza ringów: 1.5px solid accent na 55% */
                border: 1.5px solid rgba(145, 132, 217, 0.55);
                z-index: -1;
            }

            .team-ring-1 {
                border-style: dashed; 
                animation: ringPulse1 5s ease-in-out infinite;
            }

            .team-ring-2 {
                border-color: rgba(145, 132, 217, 0.35); 
                animation: ringPulse2 5s ease-in-out infinite 0.6s;
            }

            .team-ring-3 {
                border-color: rgba(150, 144, 201, 0.3); 
                border-style: dotted; 
                animation: ringPulse3 5s ease-in-out infinite 1.2s;
            }

            /* --- Etykiety "Pigułki" --- */
            .team-label {
                position: absolute;
                left: 50%; 
                transform: translateX(-50%);
                z-index: 6; 
                display: inline-flex; 
                align-items: center; 
                gap: 10px;
                font-family: "Inter", system-ui, sans-serif;
                font-size: 15px; 
                font-weight: 500;
                letter-spacing: 0.06em; 
                text-transform: uppercase;
                color: #292b31;
                /* Background wg "color-mix(in srgb, white 92%, transparent)" na oko */
                background: rgba(255, 255, 255, 0.92);
                border: 1px solid #cfd3e5; 
                border-radius: 999px; 
                padding: 8px 16px; 
                pointer-events: none;
                white-space: nowrap;

                .team-flags {
                    display: inline-flex; 
                    flex-direction: row; 
                    align-items: center; 
                    gap: 5px; 
                    vertical-align: middle;

                    img {
                        width: 24px; 
                        height: 16px; 
                        flex: 0 0 auto; 
                        object-fit: cover; 
                        border-radius: 2px; 
                        border: 1.5px solid #f3f5fe; 
                        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); 
                        display: block;
                    }
                }
            }

            &.team-b1 .team-label,
            &.team-b2 .team-label {
                top: -52px; 
                bottom: auto;
            }
            &.team-b3 .team-label {
                bottom: -56px; 
                top: auto;
            }

            /* --- Zdjęcie --- */
            .photo {
                position: absolute;
                inset: 0;
                border-radius: 50%;
                overflow: hidden;
                z-index: 1;

                figure {
                    margin: 0;
                    width: 100%;
                    height: 100%;
                }

                img {
                    display: block;
                    width: 100% !important;
                    height: 100% !important;
                    object-fit: cover !important;
                }
            }

            /* --- Overlay Kontaktowy (Pokazywany po najechaniu) --- */
            .team-contact {
                position: absolute; 
                inset: 0; 
                border-radius: 50%; 
                z-index: 8; 
                display: flex; 
                flex-direction: column; 
                align-items: center; 
                justify-content: center; 
                gap: 6px; 
                text-align: center; 
                /* neutral-900 72% opacity */
                background: rgba(41, 43, 49, 0.72); 
                opacity: 0; 
                pointer-events: none; 
                transition: opacity 0.3s ease; 
                padding: 18%;

                a {
                    display: flex; 
                    align-items: center; 
                    gap: 7px; 
                    font-size: 15px; 
                    font-feature-settings: 'tnum' 1; 
                    color: #f3f5fe; 
                    white-space: nowrap; 
                    letter-spacing: 0;
                    text-decoration: none;
                    transition: color 0.3s ease;

                    &:hover {
                        color: #d2cefd; /* accent-300 */
                    }

                    i {
                        color: #d2cefd; /* accent-300 */
                    }
                }
            }

            &:hover .team-contact {
                opacity: 1;
                pointer-events: auto;
            }
        }

        .scroll-indicator {
            position: absolute;
            right: -20px;
            top: 50%;
            transform: translateY(-50%);
            writing-mode: vertical-rl;
            font-size: 10px;
            letter-spacing: 0.3em;
            text-transform: uppercase;
            color: #b2b6ca;
        }
    }
    .team-slider-arrows {
        display: none;
    }
}


.workers-group .team-slider-arrows {
    display: none;
}

@media (min-width: 576px) and (max-width: 767.5px) {
    .workers-group {
    }
    .workers-intro{
        width: 100%;
    }

    .workers-group .workers-container-grid {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    /* Likwidujemy gigantyczną przerwę usuwając min-height z desktopu */
    .workers-group .team-cluster {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 28px;
        width: 100%;
        max-width: 100%;
        min-height: unset !important;
        height: auto !important;
        padding: 10px 0 10px 0;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        align-items: flex-start;
    }

    .workers-group .team-cluster::-webkit-scrollbar {
        display: none;
    }

    .workers-group .scroll-indicator {
        display: none;
    }

    /* Karta pracownika jako pionowa kolumna */
    .workers-group .team-cluster .team-ball,
    .workers-group .team-cluster .team-ball.team-b1,
    .workers-group .team-cluster .team-ball.team-b2,
    .workers-group .team-cluster .team-ball.team-b3 {
        position: relative !important;
        inset: auto !important;
        flex: 0 0 320px !important;
        width: 320px !important;
        height: auto !important;
        margin: 0 auto !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        animation: none !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 14px !important;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .workers-group .team-cluster .team-ball .team-ring {
        display: none !important;
    }

    .workers-group .team-cluster .team-ball .photo {
        position: relative !important;
        inset: auto !important;
        width: 290px !important;
        height: 290px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        box-shadow: 0 0 0 6px #ffffff, 0 16px 35px rgba(0, 0, 0, 0.15);
        order: 1 !important;
    }

    .workers-group .team-cluster .team-ball .team-label {
        position: relative !important;
        inset: auto !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #cfd3e5;
        border-radius: 999px;
        padding: 8px 18px;
        font-size: 14px;
        white-space: nowrap;
        order: 2 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 10px;
    }

    .workers-group .team-cluster .team-ball .team-contact {
        position: relative !important;
        inset: auto !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        background: transparent !important;
        padding: 0 !important;
        order: 3 !important;
        display: block !important;
        text-align: center !important;
    }

    .workers-group .team-cluster .team-ball .team-contact a {
        color: #595d6c;
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    .workers-group .team-cluster .team-ball .team-contact a i {
        color: #e11d48;
    }

    .workers-group .team-cluster .team-ball .team-contact a:nth-of-type(2) {
        display: none !important;
    }

    /* Przyciski na samym dole i wyśrodkowane */
    .workers-group .team-slider-arrows {
        display: flex;
        justify-content: center;
        gap: 16px;
        width: 100%;
        margin-top: 8px;
    }

    .workers-group .team-arrow-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: transparent;
        border: 1px solid #cfd3e5;
        color: #292b31;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .workers-group .team-arrow-btn:hover {
        background: #292b31;
        color: #ffffff;
        border-color: #292b31;
    }
}



@media (max-width: 575.5px) {
    .workers-group {
    }

    .workers-group .workers-container-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .workers-group .team-cluster {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 20px;
        width: 100%;
        max-width: 100%;
        min-height: unset !important;
        height: auto !important;
        padding: 10px 0 10px 0;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        align-items: flex-start;
    }

    .workers-group .team-cluster::-webkit-scrollbar {
        display: none;
    }

    .workers-group .scroll-indicator {
        display: none;
    }

    /* Karta pracownika jako pionowa kolumna */
    .workers-group .team-cluster .team-ball,
    .workers-group .team-cluster .team-ball.team-b1,
    .workers-group .team-cluster .team-ball.team-b2,
    .workers-group .team-cluster .team-ball.team-b3 {
        position: relative !important;
        inset: auto !important;
        flex: 0 0 280px !important;
        width: 280px !important;
        height: auto !important;
        margin: 0 auto !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        animation: none !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .workers-group .team-cluster .team-ball .team-ring {
        display: none !important;
    }

    .workers-group .team-cluster .team-ball .photo {
        position: relative !important;
        inset: auto !important;
        width: 250px !important;
        height: 250px !important;
        border-radius: 50% !important;
        overflow: hidden !important;
        box-shadow: 0 0 0 5px #ffffff, 0 12px 30px rgba(0, 0, 0, 0.15);
        order: 1 !important;
    }

    .workers-group .team-cluster .team-ball .team-label {
        position: relative !important;
        inset: auto !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid #cfd3e5;
        border-radius: 999px;
        padding: 6px 14px;
        font-size: 13.5px;
        white-space: nowrap;
        order: 2 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px;
    }

    .workers-group .team-cluster .team-ball .team-contact {
        position: relative !important;
        inset: auto !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        background: transparent !important;
        padding: 0 !important;
        order: 3 !important;
        display: block !important;
        text-align: center !important;
    }

    .workers-group .team-cluster .team-ball .team-contact a {
        color: #595d6c;
        font-size: 13.5px;
        font-weight: 500;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .workers-group .team-cluster .team-ball .team-contact a i {
        color: #e11d48;
    }

    .workers-group .team-cluster .team-ball .team-contact a:nth-of-type(2) {
        display: none !important;
    }

    .workers-group .team-slider-arrows {
        display: flex;
        justify-content: center;
        gap: 14px;
        width: 100%;
        margin-top: 6px;
    }

    .workers-group .team-arrow-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        border-radius: 50%;
        background: transparent;
        border: 1px solid #cfd3e5;
        color: #292b31;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .workers-group .team-arrow-btn:hover {
        background: #292b31;
        color: #ffffff;
        border-color: #292b31;
    }
}

    @media (min-width: 768px) and (max-width: 991.5px) {
        .workers-group {
            .workers-container-grid {
                gap: 60px clamp(32px, 6vw, 80px);
            }
        }
    }

    @media (min-width: 992px) and (max-width: 1199.5px) {
    
    }

    @media (min-width: 1200px) and (max-width: 1579.5px) {

    }
