#zespol-section {
    position: relative;
    left: calc(-62.5vw + 50%);
    width: 125vw;
    background-color: #ffffff !important;
    min-height: 100vh;
    margin-top: -120px;
    margin-bottom: -40px;
    padding: 260px 0 40px 0;
    box-sizing: border-box;
    z-index: 10;
}

.team-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 80px 40px;
    box-sizing: border-box;
    background-color: #ffffff;
}

.team-header {
    text-align: center;
    margin: 0 auto 60px auto;
    max-width: 1090px;
}

.team-header h1 {
    font-size: 40px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    letter-spacing: -0.5px;
}

.team-header p {
    font-size: 21px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
    text-align: justify !important;
}

.team-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
}

.team-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.team-card-image-box {
    width: calc(100% - 20px);
    margin: 10px 10px 16px 10px;
    aspect-ratio: 1 / 1;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.team-card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.team-card[data-member-id="filip"] .team-card-image-box img {
    transform: scale(1.15);
    transform-origin: top center;
}

.team-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
    padding: 0 24px 24px 24px;
}

.team-card-socials {
    display: flex;
    gap: 16px;
    margin-top: auto;
    align-items: center;
}

.team-card-socials .social-icon {
    color: #64748b;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-card-socials .social-icon:hover {
    color: #0f172a;
}

.team-card-socials svg {
    width: 42px;
    height: 42px;
    stroke-width: 0.8px !important;
    color: #504c4a;
}

.team-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.team-card-header-row h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.team-card-role {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    text-align: right;
}

.team-card-content p {
    font-size: 15px;
    color: #3b3e44;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify !important;
}

#team-detail-view {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

#btn-team-back {
    position: absolute !important;
    top: -12px !important;
    left: -160px !important;
    margin: 0 !important;
}

#btn-team-back svg {
    width: 34px !important;
    height: 34px !important;
}

.btn-back-arrow {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    transition: all 0.2s ease;
    margin-bottom: 20px;
    align-self: flex-start;
}

.team-detail-card {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    width: 100%;
    background: #ffffff;
    padding: 0;
    border: none;
    box-shadow: none;
}

.team-detail-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.team-detail-sidebar .team-detail-image-box {
    width: 260px;
    height: 300px;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
    border: none;
    background-color: #f1f5f9;
}

.team-detail-sidebar .team-detail-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-detail-sidebar h1 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px 0;
}

.team-detail-sidebar h3 {
    font-size: 14px;
    font-weight: 600;
    color: #192fc4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

.team-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0 5px;
}

.team-tag {
    font-size: 16.5px;
    font-weight: 500;
    color: #2e333c;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 20px;
    line-height: 1.4;
    text-align: center;
}

.contact-btn svg {
    color: #475569;
    transition: color 0.2s ease;
}

.team-detail-contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}

.contact-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.contact-icon-link svg {
    width: 42px;
    height: 41px;
    stroke-width: 0.8px !important;
}

.contact-icon-link:hover {
    color: #0f172a;
    transform: scale(1.15);
}

.contact-btn:hover svg {
    color: #0f172a;
    transform: scale(1.05);
}

.team-detail-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bio-quote {
    font-size: 18px;
    font-style: italic;
    font-weight: 500;
    color: #0f172a;
    background-color: #ffffff;
    border-left: 5px solid #0f172a;
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 35px;
    line-height: 1.7;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}   

.bio-section {
    margin-bottom: 32px;
}

.bio-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2532;
    margin: 0 0 12px 0;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
}

.bio-section p {
    font-size: 19px;
    color: #0f172a;
    line-height: 1.8;
    margin: 0 0 16px 0;
    font-weight: 400;
    text-align: justify !important;
}

@media (max-width: 768px) {
    .team-wrapper {
        padding: 30px 15px;
        margin-top: 80px;
    }

    .team-detail-card {
        flex-direction: column;
        padding: 24px 18px;
        align-items: center;
        gap: 30px;
    }

    .team-detail-sidebar {
        width: 100%;
    }

    .team-detail-sidebar .team-detail-image-box {
        width: 180px;
        height: 220px;
    }
}

@media (max-width: 768px) {
    #zespol-section {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        margin-left: 0 !important;
        padding: 20px 0 !important;
        overflow-x: hidden !important;
    }

    .team-wrapper {
        padding: 20px 15px !important;
        margin-top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .team-header {
        margin-bottom: 30px !important;
        width: 100% !important;
        padding: 0 10px !important;
        box-sizing: border-box !important;
    }

    .team-header h1 {
        font-size: 28px !important;
        word-wrap: break-word !important;
    }

    .team-header p {
        font-size: 15px !important;
        word-wrap: break-word !important;
    }

    .team-cards-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 10px !important;
    }
    
    .team-card {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    #team-detail-view {
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 10px !important;
    }

    #btn-team-back {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        margin-bottom: 20px !important;
        align-self: flex-start !important;
    }

    .team-detail-card {
        flex-direction: column !important;
        padding: 20px 15px !important;
        align-items: center !important;
        gap: 25px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .team-detail-sidebar {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .team-detail-sidebar .team-detail-image-box {
        width: 200px !important;
        height: 240px !important;
        margin: 0 auto 20px auto !important;
    }

    .team-detail-main {
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .bio-quote {
        font-size: 15px !important;
        padding: 15px !important;
        margin-bottom: 25px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .bio-section {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .bio-section h3 {
        font-size: 20px !important;
        word-wrap: break-word !important;
    }

    .bio-section p {
        font-size: 15px !important;
        word-wrap: break-word !important;
    }
}