/* Секции не выше 90% экрана: общие отступы ужаты */
.section { padding-block: 12px; }
.info-block { --ib-pad: 10px; --ib-gap: 8px; --ib-title: clamp(22px, 2.2vw, 32px); }
.info-block__inner { gap: 16px; }
.info-block--split .info-block__inner { column-gap: 24px; }
.info-block__eyebrow { margin-bottom: 6px; }
.info-block__title { margin-bottom: 6px; }
.info-block__subtitle { margin-top: 0; }
.info-block--side .info-block__card { min-height: 0; gap: 4px; }
.info-block__name { margin-top: 0; }
.footer-block { padding: 28px 0 16px; }

/* Герой — около 70% высоты экрана, содержимое внутри карточки */
#top.section { padding-block: 8px 12px; }

#top.hero-block {
    --hb-min-h: 0;
    --hb-pad: 20px 28px;
    --hb-title: clamp(22px, 3vh, 36px);
    --hb-subtitle: 15px;
}

#top .hero-block__inner {
    height: 70vh;
    min-height: 0;
    max-height: 70vh;
    align-content: center;
}

#top .hero-block__eyebrow {
    margin-bottom: 8px;
    font-size: 12px;
    letter-spacing: .08em;
}

#top .hero-block__title { margin-bottom: 8px; }
#top .hero-block__facts { margin-top: 12px; gap: 6px; }
#top .hero-block__fact { padding: 6px 12px; }
#top .hero-block__actions { margin-top: 14px; }
#top .hero-block__btn { min-height: 44px; }

/* Вакансия: один столбец, каждая карточка — строка */
#vacancy .info-block__list {
    grid-template-columns: 1fr;
    align-self: start;
    gap: 6px;
}

#vacancy .info-block__card {
    --ib-img-w: 88px;
    display: grid;
    /* icon column hidden for review
    grid-template-columns: 32px minmax(0, 1fr);
    grid-template-areas: "icon name" "icon text";
    */
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "name" "text";
    align-items: center;
    column-gap: 10px;
    row-gap: 0;
    grid-column: auto;
    min-width: 0;
    min-height: 0;
    padding: 6px 104px 6px 12px;
}

/* #vacancy .info-block__icon { grid-area: icon; } */
#vacancy .info-block__name { grid-area: name; }
#vacancy .info-block__text { grid-area: text; }

#vacancy .info-block__name { font-size: 15px; }
#vacancy .info-block__text { font-size: 13px; line-height: 1.35; }
#vacancy .info-block__icon { width: 32px; height: 32px; }
#vacancy .info-block__photo { aspect-ratio: auto; max-height: 100%; object-fit: cover; }

/* Слайдер истории и отзывы — без запаса по высоте */
.slider-block.section { padding-block: 12px; }
.slider-block--media { --sl-col-gap: 20px; }
.slider-block--media .slider-block__media { min-height: 0; height: min(46vh, 360px); }
.slider-block__head { margin-bottom: 12px; }
#reviews .slider-block__img { aspect-ratio: 16 / 7; max-height: 140px; object-fit: cover; }
#reviews .slider-block__body { padding: 12px 14px 14px; }
#reviews .slider-block__text {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Шаги анкеты */
#steps .anket-block__inner { column-gap: 24px; }
#steps .anket-block__step { gap: 10px; padding: 6px 12px 6px 6px; }
#steps .anket-block__img { height: 52px; width: 84px; aspect-ratio: auto; }
#steps .anket-block__photo { height: 140px; }
#steps .anket-block__text { margin: 0; font-size: 13px; line-height: 1.35; }

/* Окно подробностей */
.offer-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.offer-modal[hidden] { display: none; }

.offer-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(11 31 58 / .55);
}

.offer-modal__panel {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(80vh, 720px);
    overflow: auto;
    padding: 0 28px 24px;
    border-radius: var(--radius-lg);
    background: var(--color-bg);
    color: var(--color-text);
    box-shadow: var(--shadow-md);
}

.offer-modal__media {
    display: block;
    width: calc(100% + 56px);
    max-width: none;
    height: 240px;
    margin: 0 -28px 18px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--color-surface);
}

.offer-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
}

.offer-modal__close svg { width: 18px; height: 18px; }

.offer-modal__title {
    margin: 0 36px 16px 0;
    padding-top: 4px;
    font-size: var(--text-xl);
    line-height: var(--line-tight);
}

.offer-modal__body p {
    margin: 0 0 12px;
    color: var(--color-muted);
    line-height: 1.55;
}

.offer-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: var(--color-primary-text);
    font-weight: var(--weight-bold);
    text-decoration: none;
}

.offer-modal__btn svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
    .offer-modal {
        display: flex;
        align-items: center;
        justify-content: center;
        padding:
            max(8px, env(safe-area-inset-top))
            8px
            max(8px, env(safe-area-inset-bottom));
    }

    .offer-modal__panel {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 0 16px 16px;
    }

    .offer-modal__media {
        flex: none;
        width: calc(100% + 32px);
        height: min(180px, 30dvh);
        margin: 0 -16px 12px;
    }

    .offer-modal__title,
    .offer-modal__btn { flex: none; }

    .offer-modal__body {
        min-height: 0;
        overflow: auto;
        overscroll-behavior: contain;
    }

    .offer-modal__btn {
        justify-content: center;
        width: 100%;
        margin-top: 12px;
    }
}

#offer .info-block__more {
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
}

/* Цветные SVG на тёмном фоне — белая подложка, иначе тёмно-синий сливается */
.slider-block__badge svg,
.header-block__link-icon svg,
.footer-block__contacts .icon--building,
.footer-block__logo-icon {
    background: #fff;
    border-radius: 8px;
    padding: 3px;
    box-sizing: content-box;
}

/* Стрелка на кнопке — просто иконка, без плашки */
.hero-block__btn:has(.hero-block__btn-icon) { padding-right: 24px; }

.hero-block__btn-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
}

/* Логотип: знак 11 + Segoe UI Bold, AvtoPartner без пробела */
.header-block__logo,
.footer-block__logo {
    font-family: "Segoe UI", sans-serif;
    font-weight: 700;
    color: #0B1F3A;
}

.footer-block__logo { color: #fff; }

.header-block__logo-accent,
.footer-block__logo-accent {
    background-image: linear-gradient(90deg, #1557D6, #2F6FED);
}

@media (max-width: 900px) {
    .header-block__panel {
        --hd-on: var(--color-text);
        --hd-muted: var(--color-muted);
        --hd-line: var(--color-border);
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        color: var(--color-text);
        background: var(--color-bg);
    }

    .header-block__panel-head {
        flex-wrap: wrap;
        align-content: center;
        row-gap: 8px;
    }

    .header-block__panel-head .header-block__logo {
        color: var(--color-text);
        min-width: 0;
    }

    .header-block__close {
        margin-left: auto;
        background: var(--color-surface);
        color: var(--color-text);
    }

    .header-block__panel-head .header-block__lang {
        order: 3;
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
    }

    .header-block__panel-head .header-block__lang-select { width: 100%; }

    .header-block__panel-label { color: var(--color-primary); }

    .header-block__link,
    .header-block__link:hover,
    .header-block__link[aria-current="page"] { color: var(--color-text); }

    .header-block__link-icon {
        background: var(--color-surface);
        color: var(--color-primary);
    }

    .header-block__link-icon svg {
        background: none;
        padding: 0;
    }

    .header-block__contacts a {
        color: var(--color-text);
        background: var(--color-surface);
        border-color: var(--color-border);
    }
}

@media (max-width: 420px) {
    .header-block__panel-head .header-block__logo { font-size: 16px; }
}

@media (max-width: 900px) {
    #top.section { padding-block: 8px; }

    #top .hero-block__inner {
        height: auto;
        max-height: none;
        padding-top: 14vh;
    }

    #top .hero-block__inner::after { height: 18vh; }
    #top .hero-block__facts { margin-top: 8px; gap: 4px; }
    #top .hero-block__actions { margin-top: 10px; }

    .info-block--photo .info-block__photo,
    .info-block--photo-bg .info-block__photo,
    .info-block--photo-full .info-block__photo,
    #steps .anket-block__photo {
        height: 140px;
        max-height: 140px;
        min-height: 0;
        margin-top: 0;
        aspect-ratio: auto;
    }

    #vacancy .info-block__list { grid-template-columns: 1fr; }
}

body.tg-modal-open { overflow: hidden; }
.tg-modal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity .22s ease;
}
.tg-modal[hidden] { display: none !important; }
.tg-modal.is-open { opacity: 1; }
.tg-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 31, 58, .62);
    backdrop-filter: blur(4px);
}
.tg-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    background: #fff;
    color: var(--color-text);
    border-radius: 20px;
    padding: 36px 32px 28px;
    box-shadow: 0 30px 80px -20px rgba(11, 31, 58, .45);
    transform: translateY(16px) scale(.98);
    transition: transform .22s ease;
}
.tg-modal.is-open .tg-modal__dialog { transform: none; }
.tg-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #eef3fb;
    color: var(--color-muted);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.tg-modal__close svg { width: 18px; height: 18px; }
.tg-modal__icon {
    width: 64px;
    height: 64px;
    margin: 4px auto 20px;
    border-radius: 50%;
    background: #e8f0fc;
    color: var(--color-primary);
    display: grid;
    place-items: center;
}
.tg-modal__icon svg { width: 30px; height: 30px; }
.tg-modal__title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
}
.tg-modal__lead {
    margin: 0 0 20px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.55;
    text-align: center;
}
.tg-modal__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}
.tg-modal__cta svg { width: 22px; height: 22px; }
.tg-modal__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.tg-modal__chevron { width: 16px; height: 16px; transition: transform .2s ease; }
.tg-modal__toggle[aria-expanded="true"] .tg-modal__chevron { transform: rotate(180deg); }
.tg-modal__note-wrap { margin-top: 14px; }
.tg-modal__note-wrap[hidden] { display: none !important; }
.tg-modal__note {
    background: #f3f6fb;
    border: 1px solid #d9e2ef;
    border-radius: 14px;
    padding: 16px 18px 14px;
}
.tg-modal__note h4 { margin: 0 0 6px; font-size: 15px; }
.tg-modal__note p { margin: 0 0 10px; font-size: 14px; color: var(--color-muted); }
.tg-modal__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tg-modal__links a { color: var(--color-primary); font-size: 14px; font-weight: 500; text-decoration: none; }
@media (max-width: 575px) {
    .tg-modal { padding: 16px; }
    .tg-modal__dialog { padding: 28px 22px 22px; border-radius: 16px; }
    .tg-modal__title { font-size: 19px; }
}

.contacts-page { padding-block: 48px 72px; }
.contacts-page__title { margin: 0; font-size: clamp(32px, 4vw, 48px); line-height: 1.1; }
.contacts-page__lead { margin: 12px 0 0; max-width: 42ch; color: var(--color-muted); }
.contacts-page__list { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; max-width: 520px; }
.contacts-page__list li { display: grid; gap: 4px; }
.contacts-page__list span { font-size: 13px; color: var(--color-muted); }
.contacts-page__list a { color: inherit; font-weight: 700; text-decoration: none; }
.contacts-page__list a:hover { color: var(--color-primary); }
.contacts-page__phone { font-size: 28px; line-height: 1.2; }
