:root {
    --ts-red: #cb1219;
    --ts-red-dark: #a90f15;
    --ts-red-soft: #fff3f3;
    --ts-dark: #202020;
    --ts-text: #3a3a3a;
    --ts-muted: #6f757b;
    --ts-border: #e6e6e6;
    --ts-bg: #f3f3f3;
    --ts-white: #ffffff;
    --ts-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

/* Страница Нашият екип: размери и фон по предоставения образец */
body {
    margin: 0;
    color: var(--ts-text);
    background: var(--ts-bg);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

.ts-team-page {
    padding: 42px 0 64px;
}

.ts-team-page>.container {
    max-width: 1180px;
}

.ts-team-page .team-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 36px 40px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d1d1d 0%, #2f2f2f 72%, #3b1517 100%);
    border-radius: 8px;
    box-shadow: var(--ts-shadow);
}

.ts-team-page .team-hero::after {
    content: "";
    position: absolute;
    top: -70px;
    right: -45px;
    width: 220px;
    height: 220px;
    border: 28px solid rgba(203, 18, 25, 0.28);
    border-radius: 50%;
}

.ts-team-page .team-hero>* {
    position: relative;
    z-index: 1;
}

.ts-team-page .team-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 12px;
    color: var(--ts-red);
    background: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ts-team-page .team-hero h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.25;
}

.ts-team-page .team-hero p {
    max-width: 930px;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 17px;
}

.ts-team-page .team-hero strong {
    color: #ffffff;
}

.ts-team-page {
    --ts-team-ink: #202832;
    --ts-team-muted: #66717d;
    --ts-team-line: #dfe5e8;
    --ts-team-red: #cb1219;
    --ts-team-soft: #f4f6f7;
    color: var(--ts-team-ink);
    font-family: inherit;
    line-height: 1.65
}

.ts-team-page * {
    box-sizing: border-box
}

.ts-team-page .ts-team-intro {
    text-align: center;
    padding: 48px 0 42px;
    max-width: 860px;
    margin: auto
}

.ts-team-page .ts-team-lead {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 22px
}

.ts-team-page .ts-team-intro p {
    margin: 0 auto 18px;
    font-size: 18px;
    line-height: 1.75;
}

.ts-team-page .ts-team-intro .ts-team-last {
    font-weight: 700;
    margin-top: 24px
}

.ts-team-page .ts-team-section {
    padding: 40px 0 52px;
    border-top: 1px solid var(--ts-team-line)
}

.ts-team-page .ts-team-section-head {
    text-align: center;
    max-width: 830px;
    margin: 0 auto 36px
}

.ts-team-page h2 {
    font-size: 30px;
    line-height: 1.3;
    margin: 0 0 15px;
    color: var(--ts-team-ink);
    font-weight: 700;
}

/* Къса червена линия под заглавията на отделите */
.ts-team-page .ts-team-section-head h2::after,
.ts-team-page .ts-team-cta h2::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    margin: 16px auto 0;
    background: #cb1219;
    border-radius: 2px;
}

.ts-team-page .ts-team-section-head p {
    margin: 0;
    color: var(--ts-team-muted);
    font-size: 18px;
    line-height: 1.75;
}

.ts-team-page .ts-team-people {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 34px 24px;
}

.ts-team-page .ts-team-person {
    text-align: center;
    flex: 0 0 calc((100% - 72px) / 4);
    max-width: 245px;
}

/* При 5 служители: 3 на първия ред и 2 на втория */
@media (min-width: 901px) {
    .ts-team-page .ts-team-people:has(> .ts-team-person:nth-child(5):last-child) .ts-team-person {
        flex-basis: calc((100% - 48px) / 3);
    }
}

.ts-team-page .ts-team-photo {
    width: clamp(145px, 16vw, 190px);
    height: clamp(145px, 16vw, 190px);
    max-width: 100%;
    border-radius: 50%;
    background: #f0f2f5;
    border: 1px solid #e5e9ed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 16px;
    color: #929ba4
}

.ts-team-page .ts-team-photo svg {
    width: 44%;
    height: 44%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round
}

.ts-team-page .ts-team-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center
}

.ts-team-page .ts-team-name {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 5px;
    overflow-wrap: anywhere;
}

.ts-team-page .ts-team-role {
    color: var(--ts-team-muted);
    font-size: 16px;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: anywhere;
}

.ts-team-page .ts-team-cta {
    padding: 46px 24px;
    text-align: center;
    border-radius: 16px;
    margin: 28px 0;
    background: var(--ts-team-soft)
}

.ts-team-page .ts-team-cta p {
    max-width: 720px;
    margin: 0 auto 24px;
    font-size: 18px;
    line-height: 1.75;
}

.ts-team-page .ts-team-cta--contact {
    background: #fff;
    border: 1px solid var(--ts-team-line);
    margin-bottom: 64px
}

.ts-team-page .ts-team-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 24px;
    border-radius: 7px;
    background: var(--ts-team-red);
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    line-height: 1.3;
    transition: background-color .2s ease
}

.ts-team-page .ts-team-btn:hover,
.ts-team-page .ts-team-btn:focus-visible {
    background: #a90f15;
    color: #fff !important
}

.ts-team-page .ts-team-btn:focus-visible {
    outline: 3px solid #202832;
    outline-offset: 3px
}

@media(max-width:900px) {

    .ts-team-page .ts-team-people {
        gap: 32px 20px;
    }

    .ts-team-page .ts-team-person {
        flex: 0 0 calc((100% - 20px) / 2);
    }

    .ts-team-page .ts-team-photo {
        width: 175px;
        height: 175px
    }
}

@media(max-width:480px) {
    .ts-team-page .ts-team-intro {
        padding: 28px 0 34px
    }

    .ts-team-page .ts-team-section {
        padding: 32px 0 40px
    }

    .ts-team-page .ts-team-people {
        gap: 28px 12px;
    }

    .ts-team-page .ts-team-person {
        flex-basis: calc((100% - 12px) / 2);
    }

    .ts-team-page .ts-team-photo {
        width: min(100%, 145px);
        height: auto;
        aspect-ratio: 1
    }

    .ts-team-page .ts-team-name {
        font-size: 17px;
    }

    .ts-team-page .ts-team-role {
        font-size: 14px;
    }

    .ts-team-page .ts-team-cta {
        padding: 32px 18px
    }

    .ts-team-page .ts-team-cta--contact {
        margin-bottom: 36px
    }
}

@media(max-width:340px) {
    /* .ts-team-page .ts-team-people {
        grid-template-columns: 1fr
    } */

    .ts-team-page .ts-team-person {
        flex-basis: 100%;
    }

    .ts-team-page .ts-team-photo {
        width: 165px
    }
}

@media(prefers-reduced-motion:reduce) {
    .ts-team-page .ts-team-btn {
        transition: none
    }
}

@media (max-width: 767.98px) {
    .ts-team-page {
        padding: 22px 0 40px;
    }

    .ts-team-page .team-hero {
        padding: 28px 22px;
    }

    .ts-team-page .team-hero h2 {
        font-size: 25px;
    }

    .ts-team-page .team-hero p {
        font-size: 15px;
    }
}

/* Обща снимка на екипа */
.ts-team-page .ts-team-group-photo {
    margin: 28px 0 40px;
    text-align: center;
}

.ts-team-page .ts-team-group-photo__placeholder {
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.ts-team-page .ts-team-group-photo img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ts-team-page .ts-team-group-photo figcaption {
    margin-top: 12px;
    color: var(--ts-team-muted);
    font-size: 15px;
}


/* Леко повдигане и сянка само върху кръглия портрет. */
@media (hover: hover) and (pointer: fine) {
    .ts-team-page .ts-team-photo {
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .ts-team-page .ts-team-photo:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ts-team-page .ts-team-photo {
        transition: none;
    }
}

/* Кръгли портрети с малко повече пространство над главата */
.ts-team-photo {
    overflow: hidden;
    border-radius: 50%;
    background: #e5e5e5;
}

.ts-team-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
}

.ts-team-photo {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Адаптивни размери на текстовете */
@media (max-width: 767.98px) {
    .ts-team-page h2 {
        font-size: 25px;
    }

    .ts-team-page .ts-team-section-head p,
    .ts-team-page .ts-team-intro p,
    .ts-team-page .ts-team-cta p {
        font-size: 16px;
        line-height: 1.7;
    }

    .ts-team-page .ts-team-cta h2::after,
    .ts-team-page .ts-team-section-head h2::after {
        width: 54px;
        height: 3px;
        margin-top: 14px;
    }
}