
/* =========================
   Публичный список педагогов
   ========================= */
.st38-directory{
    width:100%;
    max-width:1200px;
    margin:0 auto;
    padding:10px 0 35px;
    font-family:inherit;
    box-sizing:border-box;
}
.st38-head{
    display:flex;
    justify-content:space-between;
    gap:20px;
    align-items:end;
    margin-bottom:22px;
}
.st38-head h2{margin:0 0 5px;font-size:30px;line-height:1.2}
.st38-head p{margin:0;color:#6b7280}
.st38-count{
    background:#f3f4f6;
    border-radius:12px;
    padding:9px 13px;
    white-space:nowrap;
    font-size:14px;
}

/* Поиск — на всю ширину блока */
.st38-tools{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    margin-bottom:22px;
    width:100%;
}
.st38-search{
    width:100%;
    min-height:62px;
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid #dfe3e8;
    border-radius:14px;
    padding:0 16px;
    background:#fff;
    box-sizing:border-box;
}
.st38-search span{font-size:24px;color:#777}
.st38-search input{
    width:100%;
    height:58px;
    min-width:0;
    border:0;
    outline:0;
    background:transparent;
    font:inherit;
    font-size:16px;
}
.st38-tools select{
    width:100%;
    height:52px;
    border:1px solid #dfe3e8;
    border-radius:14px;
    padding:0 14px;
    background:#fff;
    font:inherit;
    box-sizing:border-box;
}

/* Карточки списка */
.st38-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}
.st38-card{
    display:flex;
    gap:16px;
    min-width:0;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:20px;
    background:#fff;
    box-shadow:0 4px 18px rgba(0,0,0,.04);
    transition:transform .2s,box-shadow .2s;
    box-sizing:border-box;
}
.st38-card:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 25px rgba(0,0,0,.08);
}
.st38-avatar{
    width:52px;
    height:52px;
    min-width:52px;
    border-radius:15px;
    background:#eef2ff;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    font-weight:700;
    font-size:21px;
}
.st38-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.st38-card-body{min-width:0}
.st38-card-body h3{
    font-size:19px;
    margin:0 0 7px;
    line-height:1.3;
    overflow-wrap:anywhere;
}
.st38-card-body h3 a{text-decoration:none}
.st38-position{color:#555;margin-bottom:6px}
.st38-subject{
    font-size:14px;
    color:#2563eb;
    margin-bottom:12px;
    overflow-wrap:anywhere;
}
.st38-more{font-size:14px;text-decoration:none}
.st38-empty{text-align:center;padding:35px;background:#f8fafc;border-radius:16px}
.st38-card[hidden]{display:none!important}

/* =========================
   Адаптивный список
   ========================= */
@media(max-width:900px){
    .st38-grid{grid-template-columns:1fr}
}
@media(max-width:700px){
    .st38-head{
        align-items:flex-start;
        flex-direction:column;
    }
    .st38-head h2{font-size:25px}
    .st38-card{padding:16px}
}
@media(max-width:480px){
    .st38-directory{padding-inline:4px}
    .st38-search{min-height:56px}
    .st38-search input{height:52px;font-size:15px}
}

/* =========================
   Адекватная ширина центральной
   страницы профиля между боковыми
   колонками темы
   ========================= */
html body.single-school_teacher .st38-profile-page{
    position:relative!important;
    z-index:5!important;
    display:block!important;

    width:min(
        1040px,
        calc(100vw - clamp(430px, 42vw, 760px))
    )!important;

    max-width:1040px!important;
    min-width:0!important;
    margin-left:auto!important;
    margin-right:auto!important;

    padding:clamp(20px,3vw,38px) 0 clamp(32px,5vw,60px)!important;
    box-sizing:border-box!important;
    background:transparent!important;
}
html body.single-school_teacher .st38-profile-wrap{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
}
html body.single-school_teacher .st38-profile-card{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    position:relative!important;
    z-index:6!important;
}
html body.single-school_teacher .st38-profile-hero,
html body.single-school_teacher .st38-profile-body,
html body.single-school_teacher .st38-profile-footer{
    min-width:0!important;
    max-width:100%!important;
    box-sizing:border-box!important;
}
html body.single-school_teacher .st38-profile-hero-text{min-width:0!important}
html body.single-school_teacher .st38-profile-hero h1,
html body.single-school_teacher .st38-section h2,
html body.single-school_teacher .st38-value,
html body.single-school_teacher .st38-list{
    max-width:100%!important;
    overflow-wrap:anywhere!important;
}
html body.single-school_teacher .st38-profile-body{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
}

/* Профиль */
.st38-back{
    display:inline-flex;
    align-items:center;
    gap:9px;
    margin:0 0 18px;
    color:#3157d5;
    text-decoration:none;
    font-size:15px;
    font-weight:600;
}
.st38-back:hover{text-decoration:underline}
.st38-back span{font-size:22px;line-height:1}
.st38-profile-card{
    background:#fff;
    border:1px solid #e7eaf1;
    border-radius:24px;
    box-shadow:0 12px 40px rgba(24,39,75,.08);
}
.st38-profile-hero{
    display:flex;
    gap:24px;
    align-items:center;
    padding:34px 38px;
    background:linear-gradient(135deg,#f1f5ff 0%,#fff 65%);
    border-bottom:1px solid #e7eaf1;
}
.st38-profile-avatar{
    width:84px;
    height:84px;
    flex:0 0 84px;
    border-radius:22px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    background:#3157d5;
    color:#fff;
    font-size:34px;
    font-weight:800;
    box-shadow:0 10px 25px rgba(49,87,213,.25);
}
.st38-profile-avatar img{
    width:100%;
    height:100%;
    display:block;
    object-fit:cover;
}
.st38-eyebrow{
    text-transform:uppercase;
    letter-spacing:.08em;
    font-size:12px;
    font-weight:700;
    color:#71809d;
    margin-bottom:7px;
}
.st38-profile-hero h1{
    margin:0;
    color:#182238;
    font-size:32px;
    line-height:1.15;
}
.st38-profile-position{
    margin-top:8px;
    color:#4b5870;
    font-size:17px;
    font-weight:600;
}
.st38-profile-tags{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:14px;
}
.st38-profile-tags span{
    padding:7px 11px;
    border-radius:999px;
    background:#e8edff;
    color:#3157d5;
    font-size:13px;
    font-weight:700;
    max-width:100%;
    overflow-wrap:anywhere;
}
.st38-profile-body{
    padding:28px 38px;
    gap:18px;
}
.st38-section{
    border:1px solid #e8ebf2;
    border-radius:18px;
    padding:20px;
    background:#fff;
    min-width:0;
    overflow:hidden;
    box-sizing:border-box;
}
.st38-section.st38-wide{grid-column:1/-1}
.st38-section-head{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
}
.st38-section h2{
    margin:0;
    color:#202b3f;
    font-size:17px;
    line-height:1.3;
}
.st38-icon{
    width:32px;
    height:32px;
    border-radius:10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#f0f3ff;
    color:#3157d5;
    font-size:15px;
    flex:0 0 32px;
}
.st38-value{
    color:#4e5b70;
    font-size:15px;
    line-height:1.65;
}
.st38-list{
    margin:0;
    padding-left:20px;
    color:#4e5b70;
    font-size:15px;
    line-height:1.65;
}
.st38-list li{margin:3px 0}
.st38-profile-footer{padding:0 38px 30px}

/* Профиль: планшет */
@media(max-width:900px){
    html body.single-school_teacher .st38-profile-page{
        width:calc(100vw - 280px)!important;
    }
    html body.single-school_teacher .st38-profile-body{
        grid-template-columns:minmax(0,1fr)!important;
    }
    html body.single-school_teacher .st38-section.st38-wide{
        grid-column:auto!important;
    }
    .st38-profile-hero{padding:24px}
    .st38-profile-body{padding:20px 24px}
    .st38-profile-footer{padding:0 24px 24px}
}

/* Профиль: телефон */
@media(max-width:760px){
    html body.single-school_teacher .st38-profile-page{
        width:calc(100vw - 20px)!important;
        max-width:none!important;
        margin-left:auto!important;
        margin-right:auto!important;
        padding:16px 0 32px!important;
    }
    .st38-profile-card{border-radius:18px}
    .st38-profile-hero{
        padding:22px 18px;
        align-items:flex-start;
    }
    .st38-profile-body{padding:16px 18px}
    .st38-profile-footer{padding:0 18px 22px}
}
@media(max-width:480px){
    html body.single-school_teacher .st38-profile-page{
        width:calc(100vw - 10px)!important;
        padding-top:10px!important;
    }
    .st38-profile-hero{
        display:block;
        padding:18px 14px;
    }
    .st38-profile-avatar{
        width:70px;
        height:70px;
        flex-basis:70px;
        border-radius:18px;
        margin-bottom:15px;
    }
    .st38-profile-hero h1{font-size:22px}
    .st38-profile-body{padding:12px 14px}
    .st38-section{padding:16px}
    .st38-profile-footer{padding:0 14px 18px}
}
@media(max-width:360px){
    html body.single-school_teacher .st38-profile-page{
        width:calc(100vw - 6px)!important;
    }
    .st38-profile-hero h1{font-size:20px}
}
