/* ═══════════════════════════════════════════════════════════════
   kz-filial-single.css  v1.2.3
   ═══════════════════════════════════════════════════════════════ */

:root {
    --kvhs-accent:    #39CFDD;
    --kvhs-blue:      #01A4BD;
    --kvhs-dark:      #012B33;
    --kvhs-text:      #2B2A29;
    --kvhs-muted:     #6B7280;
    --kvhs-white:     #FFFFFF;
    --kvhs-border:    #DDE5F4;
    --kvhs-orange:    #F59E0B;
    --kvhs-r:         14px;
    --kvhs-shadow:    0 4px 24px rgba(1,164,189,.10);
    --kvhs-shadow-lg: 0 12px 40px rgba(1,43,51,.16);
}

.kvh-single {
    color: var(--kvhs-text);
    max-width: 1180px;
    margin: 0 auto;

    /*
     * Переменные из kz-vacancies.css и kz-documents-docs.css объявлены
     * только на .kvh-vac-wrap / .kvh-docs-wrap.
     * Чтобы элементы вакансий и документов корректно отображались
     * внутри .kvh-preview-list, объявляем их здесь — они наследуются вниз.
     */
    --kvhv-primary  : #2F4090;
    --kvhv-mid      : #2D53A4;
    --kvhv-accent   : #1396EE;
    --kvhv-text     : #333;
    --kvhv-muted    : #6B7280;
    --kvhv-border   : #E8EDF4;
    --kvhv-bg       : #F4F7FC;
    --kvhv-white    : #FFFFFF;
    --kvhv-orange   : #E07B2A;
    --kvhv-hover-bg : #EEF4FB;
    --kvhv-r        : 10px;

    --kvhd-primary  : #002B32;
    --kvhd-accent   : #00A4BD;
    --kvhd-text     : #002B32;
    --kvhd-muted    : #6B7280;
    --kvhd-border   : #E8EDF4;
    --kvhd-bg       : #F4F7FC;
    --kvhd-white    : #FFFFFF;
    --kvhd-hover-bg : #EEF9FB;
    --kvhd-r        : 10px;
}

/* ── HERO ────────────────────────────────────────────────────── */
.kvh-single-hero {
    position: relative;
    min-height: 300px;
    border-radius: var(--kvhs-r);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    margin-bottom: 52px;
}
.kvh-single-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    transition: transform .7s ease;
}
.kvh-single-hero:hover .kvh-single-hero__bg { transform: scale(1.04); }
.kvh-single-hero__bg--default {
    background: linear-gradient(135deg, #012B33 0%, #01A4BD 65%, #39CFDD 100%);
}
.kvh-single-hero__overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(75deg, #00BED8 20%, #FFFFFF00 100%);
}
.kvh-single-hero__content {
    position: relative;
    z-index: 2;
    padding: 36px 48px;
    width: 100%;
}
.kvh-single-hero__title {
    font-size: clamp(20px, 2.8vw, 32px);
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.kvh-single-hero__sub {
    font-size: 14px;
    color: rgba(255,255,255,.85);
    margin: 0;
    max-width: 600px;
    line-height: 1.55;
    font-weight: 300;
    text-shadow: 0 1px 6px rgba(0,0,0,.2);
}

/* ── BODY ────────────────────────────────────────────────────── */
.kvh-single-body {
    display: flex;
    flex-direction: column;
    gap: 52px;
}

/* ── SECTION TITLE ───────────────────────────────────────────── */
.kvh-single-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--kvhs-dark);
    margin: 0 0 28px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--kvhs-border);
    position: relative;
}
.kvh-single-section__title::after {
    content: '';
    position: absolute;
    left: 0; bottom: -2px;
    width: 48px; height: 2px;
    background: var(--kvhs-blue);
    border-radius: 2px;
}

/* ── INFO ROW ────────────────────────────────────────────────── */
.kvh-single-info {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}
.kvh-single-info__text { min-width: 0; }
.kvh-single-prose {
    font-size: 15px;
    line-height: 1.78;
    color: var(--kvhs-text);
}
.kvh-single-prose p        { margin: 0 0 16px; }
.kvh-single-prose p:last-child { margin-bottom: 0; }

/* ── CONTACTS ────────────────────────────────────────────────── */
.kvh-single-contacts {
    background: var(--kvhs-white);
    border: 1px solid var(--kvhs-border);
    border-radius: var(--kvhs-r);
    padding: 28px 30px;
    box-shadow: var(--kvhs-shadow);
}
.kvh-single-contacts__list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.kvh-single-contacts__item {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--kvhs-text);
}
.kvh-single-contacts__icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #d6f5f8, #b8edf3);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kvhs-blue);
}
.kvh-single-contacts__icon svg { width: 15px; height: 15px; }
.kvh-single-contacts__item a { color: var(--kvhs-blue); text-decoration: none; }
.kvh-single-contacts__item a:hover { text-decoration: underline; }

/* ── STATS BLOCK ─────────────────────────────────────────────── */
.kvh-stats-block__heading {
    font-size: 22px;
    font-weight: 400;   /* не жирным */
    color: var(--kvhs-dark);
    margin: 0 0 28px;
}
.kvh-stats-block__sub {
    font-weight: 400;
    color: var(--kvhs-blue);
}

.kvh-single-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.kvh-single-stat {
    background-color: rgba(230, 230, 230, 0.3);
    padding: 40px 15px;
    border-radius: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
}
.kvh-single-stat.kvh-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .45s ease, transform .45s ease;
}
.kvh-single-stat__num {
    color: #00A4BD;
    font-size: 42px;
    font-weight: 500;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.kvh-single-stat__label {
    color: #002B32;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    width: 100%;
    text-align: center;
}

/* ── STAFF CARDS ─────────────────────────────────────────────── */
.kvh-single-staff {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}
.kvh-staff-card {
    background: var(--kvhs-white);
    border: 1px solid var(--kvhs-border);
    border-radius: var(--kvhs-r);
    overflow: hidden;
    box-shadow: var(--kvhs-shadow);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(22px);
}
.kvh-staff-card.kvh-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .45s ease, transform .45s ease, box-shadow .28s ease;
}
.kvh-staff-card--clickable { cursor: pointer; }
.kvh-staff-card--clickable:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--kvhs-shadow-lg);
}
.kvh-staff-card__photo {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(160deg, #d0f4f8 0%, #a8e8f0 100%);
    position: relative;
    flex-shrink: 0;
}
.kvh-staff-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform .5s ease;
    min-height: 100%;
}
.kvh-staff-card--clickable:hover .kvh-staff-card__photo img { transform: scale(1.06); }
.kvh-staff-card__nophoto {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(1,43,51,.18);
}
.kvh-staff-card__nophoto svg { width: 64px; height: 64px; }
.kvh-staff-card__hint {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(1,43,51,.80) 0%, transparent 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .05em;
    padding: 28px 14px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity .3s ease;
}
.kvh-staff-card__hint svg { width: 14px; height: 14px; flex-shrink: 0; }
.kvh-staff-card--clickable:hover .kvh-staff-card__hint { opacity: 1; }
.kvh-staff-card__info {
    padding: 16px 18px 18px;
    flex: 1;
    border-top: 1px solid var(--kvhs-border);
}
.kvh-staff-card__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--kvhs-dark);
    line-height: 1.35;
    margin-bottom: 4px;
}
.kvh-staff-card__pos {
    font-size: 12px;
    color: var(--kvhs-blue);
    line-height: 1.45;
}

/* ── PREVIEW SECTIONS ────────────────────────────────────────── */
.kvh-previews {
    display: flex;
    flex-direction: column;
    gap: 40px;
}
.kvh-preview-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.kvh-preview-section__head .kvh-single-section__title {
    margin-bottom: 0;
    flex: 1;
}
.kvh-preview-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--kvhs-blue);
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s;
}
.kvh-preview-all:hover { color: var(--kvhs-dark); }
.kvh-preview-all svg { width: 14px; height: 14px; }

.kvh-preview-list {
    display: flex;
    flex-direction: column;
    border-radius: var(--kvhs-r);
    overflow: hidden;
    border: 1px solid var(--kvhs-border);
}

/* Разделители между вакансиями внутри превью */
.kvh-preview-list .kvh-vac-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    border-top: none;
}
.kvh-preview-list .kvh-vac-item:last-child {
    border-bottom: none;
}

/* Разделители между документами внутри превью */
.kvh-preview-list--docs .kvh-corp-docs-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.kvh-preview-list--docs .kvh-corp-docs-item:last-child {
    border-bottom: none;
}

/* ── МОДАЛЬНОЕ ОКНО ──────────────────────────────────────────── */
.kvh-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.kvh-modal.kvh-modal--open { display: flex; }
.kvh-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(1,43,51,.65);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.kvh-modal__box {
    position: relative;
    z-index: 1;
    background: var(--kvhs-white);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(1,43,51,.35);
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: kvhModalIn .3s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes kvhModalIn {
    from { opacity: 0; transform: scale(.92) translateY(16px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}
.kvh-modal__close {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 10;
    width: 34px; height: 34px;
    min-width: 0;
    padding: 0; margin: 0;
    background: rgba(210,245,248,.92);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kvhs-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    transition: background .2s ease, transform .2s ease;
    line-height: 1;
    box-sizing: border-box;
}
.kvh-modal__close:hover { background: #a8e8f0; transform: rotate(90deg); }
.kvh-modal__close svg {
    display: block;
    width: 16px; height: 16px;
    flex-shrink: 0;
    pointer-events: none;
}
.kvh-modal__inner {
    display: grid;
    grid-template-columns: 200px 1fr;
    flex: 1;
    min-height: 0;
}
.kvh-modal__left {
    background: linear-gradient(160deg, #d0f4f8 0%, #8dd8e8 100%);
    flex-shrink: 0;
    overflow: hidden;
}
.kvh-modal__photo {
    width: 100%;
    height: 260px;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}
.kvh-modal__photo--empty {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(1,43,51,.2);
}
.kvh-modal__photo--empty svg { width: 72px; height: 72px; }
.kvh-modal__right {
    padding: 36px 32px 32px;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.kvh-modal__name {
    font-size: 20px;
    font-weight: 700;
    color: var(--kvhs-dark);
    line-height: 1.2;
    margin-bottom: 8px;
    padding-right: 44px;
}
.kvh-modal__pos {
    font-size: 13px;
    color: var(--kvhs-blue);
    font-weight: 500;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--kvhs-border);
}
.kvh-modal__bio {
    font-size: 14px;
    line-height: 1.75;
    color: var(--kvhs-text);
}
.kvh-modal__bio p        { margin: 0 0 12px; }
.kvh-modal__bio p:last-child { margin-bottom: 0; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .kvh-single-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
    .kvh-single-info  { grid-template-columns: 1fr; }
    .kvh-single-hero__content { padding: 28px 24px; }
    .kvh-single-stats { grid-template-columns: repeat(3, 1fr); }
    .kvh-modal__inner {
        grid-template-columns: 1fr;
        grid-template-rows: 200px 1fr;
    }
    .kvh-modal__photo      { height: 200px; }
    .kvh-modal__photo--empty { height: 200px; }
    .kvh-modal__right      { padding: 22px 22px 24px; }
}
@media (max-width: 600px) {
    .kvh-single-hero   { min-height: 220px; }
    .kvh-single-hero__title { font-size: 20px; }
    .kvh-single-body   { gap: 36px; }
    .kvh-single-stats  { grid-template-columns: repeat(2, 1fr); }
    .kvh-single-stat__num { font-size: 32px; }
    .kvh-single-stat__label { font-size: 13px; }
    .kvh-single-staff  { grid-template-columns: repeat(2, 1fr); }
    .kvh-staff-card__photo { height: 200px; }
    .kvh-modal__name   { font-size: 17px; }
    .kvh-modal__box    { border-radius: 14px; }
}
