/* =========================================
   КАРТОЧКА СОТРУДНИКА — БЕЗ SPAN, НА ЧИСТОМ HTML
   ========================================= */

.sm-card,
.sm-card * {
    box-sizing: border-box;
}

.sm-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;

    width: 100%;

    margin: 0 0 20px 0;
    padding: 30px;

    background: #ffffff;
    border: 1px solid #dfe4e8;
    border-radius: 10px;

    font-family: inherit;
    color: #111111;
}


/* ---------- Фото справа ---------- */

.sm-card .sm-photo {
    order: 2;
    flex: 0 0 260px;
    width: 260px;

    display: flex;
    justify-content: center;

    margin: 0;
    padding: 0;
}

.sm-card .sm-photo img {
    display: block;
    width: 220px;
    height: 220px;
    object-fit: cover;
    border-radius: 50%;
    border: none;
    margin: 0;
    padding: 0;
}


/* ---------- Контент слева ---------- */

.sm-card .sm-content {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;

    margin: 0;
    padding: 0 30px 0 0;
}


/* ---------- Должность ---------- */

.sm-card .sm-position {
    margin: 0 0 8px 0;
    padding: 0;

    color: #718096;

    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}


/* ---------- Имя ---------- */

.sm-card .sm-name {
    margin: 0 0 20px 0;   /* уменьшено с 22px — блок контактов теперь выше */
    padding: 0;

    color: #111111;

    font-size: 22px;
    line-height: 1.3;
    font-weight: 600;
}


/* ---------- Блок контактов — на flex-элементах БЕЗ span ---------- */

.sm-card .sm-contacts {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
		padding-top: 25px;

    gap: 40px;

    margin: 0 0 22px 0;
    padding: 0;

    flex-wrap: wrap;
}


/* Каждый контакт — flex-контейнер из двух строк */

.sm-card .sm-contact {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    margin: 0;
    padding: 0;
}


/* Подпись — через ::before с data-label */

.sm-card .sm-contact::before {
    content: attr(data-label);

    display: block;

    margin: 0 0 4px 0;
    padding: 0;

    color: #718096;

    font-size: 11px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;

    white-space: nowrap;
}


/* Значение — ссылка или обычный текст */

.sm-card .sm-contact a,
.sm-card .sm-contact .sm-plain {
    display: block;

    margin: 0;
    padding: 0;

    color: #1d3557;

    font-size: 15px;
    line-height: 1.3;
    font-weight: 400;

    text-decoration: none;

    white-space: nowrap;
}

.sm-card .sm-contact a:hover {
    color: #c62828;
}


/* ---------- Кнопка ---------- */

.sm-card .sm-btn {
    display: inline-block;

    /* Кнопка прижата к нижнему краю контактов,
       выравнивается по baseline значений */
		margin: 0 0 0 auto;
    align-self: flex-start;

    padding: 13px 28px;

    background-color: #1baa1d;
    color: #ffffff;

    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: 0.3px;

    text-decoration: none;
    text-align: center;
    white-space: nowrap;

    border: none;
    border-radius: 6px;

    cursor: pointer;

    box-shadow: 0 2px 6px rgba(27, 170, 29, 0.25);

    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.sm-card .sm-btn:hover,
.sm-card .sm-btn:focus {
    background-color: #169a18;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(27, 170, 29, 0.4);
    transform: translateY(-1px);
}

.sm-card .sm-btn:active {
    background-color: #148516;
    box-shadow: 0 2px 5px rgba(27, 170, 29, 0.3);
    transform: translateY(0);
}


/* ---------- Описание ---------- */

.sm-card .sm-description {
    margin: 0;
    padding: 0;

    color: #777777;

    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

.sm-card .sm-description p {
    margin: 0 0 15px 0;
    padding: 0;
}

.sm-card .sm-description p:last-child {
    margin-bottom: 0;
}


/* =========================================
   ПЛАНШЕТ (до 1000px)
   ========================================= */

@media (max-width: 1000px) {

    .sm-card {
        padding: 25px;
    }

    .sm-card .sm-photo {
        flex: 0 0 200px;
        width: 200px;
    }

    .sm-card .sm-photo img {
        width: 170px;
        height: 170px;
    }

    .sm-card .sm-content {
        padding-right: 25px;
    }

    .sm-card .sm-name {
        margin-bottom: 8px;
    }

    .sm-card .sm-contacts {
        gap: 25px;
    }

    .sm-card .sm-contact a,
    .sm-card .sm-contact .sm-plain {
        font-size: 14px;
    }

    .sm-card .sm-btn {
        padding: 12px 22px;
        font-size: 13px;
    }
}


/* =========================================
   МОБИЛЬНАЯ ВЕРСИЯ (до 700px)
   ========================================= */

@media (max-width: 700px) {

    .sm-card {
        flex-direction: column;
        padding: 22px;
    }

    .sm-card .sm-photo {
        order: 1;
        width: 100%;
        flex: none;
        justify-content: flex-start;
        margin: 0 0 20px 0;
        padding: 0;
    }

    .sm-card .sm-photo img {
        width: 130px;
        height: 130px;
    }

    .sm-card .sm-content {
        order: 2;
        width: 100%;
        padding: 0;
    }

    .sm-card .sm-name {
        font-size: 20px;
        margin-bottom: 18px;
    }

    /* Контакты — сетка 2 колонки */

    .sm-card .sm-contacts {
        display: grid;

        grid-template-columns: 1fr 1fr;

        column-gap: 20px;
        row-gap: 18px;

        align-items: start;

        margin: 0 0 20px 0;
    }

    .sm-card .sm-contact a,
    .sm-card .sm-contact .sm-plain {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        font-size: 14px;
    }

    /* Кнопка на всю ширину, компактнее */

    .sm-card .sm-btn {
        grid-column: 1 / -1;

        display: block;

        margin: 4px 0 0 0;
        width: 100%;

        padding: 11px 18px;
        font-size: 13px;

        align-self: auto;
    }

    .sm-card .sm-description {
        font-size: 14px;
        line-height: 1.55;
    }
}


/* =========================================
   МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 400px)
   ========================================= */

@media (max-width: 400px) {

    .sm-card {
        padding: 18px;
    }

    .sm-card .sm-photo img {
        width: 110px;
        height: 110px;
    }

    .sm-card .sm-name {
        font-size: 19px;
    }

    .sm-card .sm-contacts {
        column-gap: 14px;
        row-gap: 16px;
    }

    .sm-card .sm-contact a,
    .sm-card .sm-contact .sm-plain {
        font-size: 13px;
    }

    .sm-card .sm-btn {
        padding: 10px 15px;
        font-size: 12px;
    }

    .sm-card .sm-description {
        font-size: 14px;
    }
}