/* =====================================================================
   Employers Vacancy Page — employers.css
   Follows theme design: Montserrat, #047BEF primary, ._container, ._btn
   ===================================================================== */

:root {
    --emp-primary:      #047BEF;
    --emp-primary-dim:  rgba(4, 123, 239, 0.1);
    --emp-text:         #1a1a1a;
    --emp-muted:        #666;
    --emp-bg-light:     #f4f7fb;
    --emp-bg-alt:       #edf4fd;
    --emp-white:        #fff;
    --emp-radius:       12px;
    --emp-shadow:       0 4px 20px rgba(0,0,0,0.07);
    --emp-shadow-hover: 0 8px 32px rgba(0,0,0,0.12);
    --emp-transition:   all 0.3s ease;
}

/* ── Shared ─────────────────────────────────────────────────────────── */
.emp-page {
    overflow-x: hidden;
}

.emp-section-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--emp-text);
}

.emp-section-title span,
.emp-section-title--accent {
    color: var(--emp-primary);
}

.emp-section-title--center {
    text-align: center;
}

@media (max-width: 1232px) {
    .emp-section-title {
        font-size: calc(22px + 16 * (100vw - 393px) / 839);
    }
}

@media (max-width: 393px) {
    .emp-section-title {
        font-size: 22px;
    }
}

.emp-image-glow {
    position: relative;
}

.emp-image-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(4,123,239,0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(30px);
    z-index: 0;
    pointer-events: none;
}

.emp-image-glow picture {
    display: block;
    max-width: 100%;
}

.emp-image-glow img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--emp-radius);
}

/* =====================================================================
   Единые кнопки лендинга: класс .emp-btn вместе с темным ._btn
   ===================================================================== */
._btn.emp-btn {
    min-width: 0 !important;
    width: fit-content;
    max-width: min(100%, 440px);
    min-height: 58px;
    height: auto;
    padding: 16px 36px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-sizing: border-box;
    border-radius: 14px;
    text-decoration: none;
}

._btn.emp-btn.emp-btn--inverse {
    background: #fff;
    color: var(--emp-primary);
}

._btn.emp-btn.emp-btn--inverse:hover {
    background: rgba(255, 255, 255, 0.92);
    opacity: 1 !important;
}

.emp-hero__btn.emp-btn,
.emp-advantages__btn.emp-btn,
.emp-publish__btn.emp-btn {
    align-self: start;
}

@media (max-width: 768px) {
    ._btn.emp-btn {
        padding: 15px 28px;
        font-size: 19px;
        min-height: 56px;
    }
}


/* ── Block 2: Hero (DOM: заголовок → подзаголовок → изображение → кнопка) ─ */
.emp-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--emp-bg-light) 0%, #dce9f8 100%);
}

.emp-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    column-gap: 48px;
    row-gap: 0;
    align-items: start;
}

.emp-hero__title {
    grid-column: 1;
    grid-row: 1;
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--emp-text);
    margin: 0 0 20px;
    max-width: 600px;
}

.emp-hero__subtitle {
    grid-column: 1;
    grid-row: 2;
    font-size: 20px;
    line-height: 1.6;
    color: var(--emp-muted);
    margin: 0 0 24px;
    max-width: 600px;
}

.emp-hero__image {
    grid-column: 2;
    grid-row: 1 / span 3;
    max-width: 560px;
    width: 100%;
    justify-self: end;
    align-self: center;
}

.emp-hero__btn {
    grid-column: 1;
    grid-row: 3;
    margin-top: 28px;
}

@media (max-width: 1232px) {
    .emp-hero__title {
        font-size: calc(26px + 14 * (100vw - 393px) / 839);
    }
}

@media (max-width: 900px) {
    .emp-hero__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .emp-hero__title,
    .emp-hero__subtitle,
    .emp-hero__image,
    .emp-hero__btn {
        grid-column: 1;
        grid-row: auto;
        justify-self: center;
        max-width: 100%;
    }

    .emp-hero__image {
        max-width: 400px;
        width: 100%;
    }

    .emp-hero__btn {
        margin-inline: auto;
    }
}

@media (max-width: 393px) {
    .emp-hero__title {
        font-size: 26px;
    }
}


/* ── Block 3: Advantages ────────────────────────────────────────────── */
.emp-advantages {
    padding: 80px 0;
    background: var(--emp-white);
}

.emp-advantages__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 34px;
    align-items: start;
}

.emp-advantages__title {
    grid-column: 1;
    grid-row: 1;
}

.emp-advantages__image {
    grid-column: 2;
    grid-row: 1 / span 3;
    max-width: 500px;
    width: 100%;
    justify-self: end;
    align-self: center;
}

.emp-advantages__list {
    grid-column: 1;
    grid-row: 2;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.emp-advantages__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    font-size: 18px;
    line-height: 1.5;
    color: var(--emp-text);
    padding: 16px 20px;
    background: var(--emp-bg-light);
    border-radius: var(--emp-radius);
    transition: var(--emp-transition);
}

.emp-advantages__item:hover {
    background: var(--emp-bg-alt);
    transform: translateX(4px);
}

.emp-advantages__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 1px;
}

.emp-advantages__btn {
    grid-column: 1;
    grid-row: 3;
}

@media (max-width: 1024px) {
    .emp-advantages__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .emp-advantages__title,
    .emp-advantages__image,
    .emp-advantages__list,
    .emp-advantages__btn {
        grid-column: 1;
        grid-row: auto;
        justify-self: center;
    }

    .emp-advantages__list {
        margin-top: 0;
        width: 100%;
        max-width: 100%;
    }

    .emp-advantages__image {
        max-width: 400px;
        width: 100%;
    }
}

/* ── Block 4: About ─────────────────────────────────────────────────── */
.emp-about {
    padding: 80px 0;
    background: var(--emp-bg-light);
}

.emp-about__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 34px;
    align-items: start;
}

.emp-about__title {
    grid-column: 1 / -1;
    margin-bottom: 24px;
}

.emp-about__image {
    grid-column: 1;
    grid-row: 2;
    max-width: 480px;
    width: 100%;
}

.emp-about__text {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    font-size: 18px;
    line-height: 1.7;
    color: var(--emp-muted);
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

.emp-about__text strong {
    color: var(--emp-primary);
}

.emp-about__countries {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emp-about__countries li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--emp-text);
    font-size: 17px;
}

.emp-about__countries img {
    width: 28px;
    height: auto;
    border-radius: 3px;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .emp-about__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .emp-about__title {
        grid-column: 1;
        margin-bottom: 0;
    }

    .emp-about__image,
    .emp-about__text {
        grid-column: 1;
        grid-row: auto;
        max-width: 100%;
    }

    .emp-about__image {
        max-width: 380px;
        width: 100%;
        margin-inline: auto;
    }
}


/* ── Block 5: Publish ───────────────────────────────────────────────── */
.emp-publish {
    padding: 80px 0;
    background: var(--emp-white);
}

.emp-publish__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 0.9fr);
    gap: 34px;
    align-items: start;
}

.emp-publish__title {
    grid-column: 1;
    grid-row: 1;
}

.emp-publish__image {
    grid-column: 2;
    grid-row: 1 / span 3;
    max-width: 360px;
    width: 100%;
    justify-self: end;
    align-self: center;
}

.emp-publish__text {
    grid-column: 1;
    grid-row: 2;
    font-size: 18px;
    line-height: 1.7;
    color: var(--emp-muted);
    margin: 24px 0 36px;
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.emp-publish__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.emp-publish__list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.emp-publish__check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.emp-publish__btn {
    grid-column: 1;
    grid-row: 3;
}

@media (max-width: 1024px) {
    .emp-publish__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .emp-publish__title,
    .emp-publish__image,
    .emp-publish__text,
    .emp-publish__btn {
        grid-column: 1;
        grid-row: auto;
        justify-self: center;
    }

    .emp-publish__text {
        margin-top: 0;
        width: 100%;
        max-width: 100%;
    }

    .emp-publish__image {
        max-width: 380px;
        width: 100%;
    }
}


/* ── Block 6: Form ──────────────────────────────────────────────────── */
.emp-form-section {
    padding: 80px 0;
    background: var(--emp-bg-light);
}

.emp-form-section__subtitle {
    font-size: 20px;
    color: var(--emp-muted);
    text-align: center;
    margin-bottom: 48px;
    margin-top: 28px;
}

.emp-form {
    max-width: 800px;
    margin-inline: auto;
    width: 100%;
    background: var(--emp-white);
    border-radius: 16px;
    padding: 48px;
    box-shadow: var(--emp-shadow);
}

.emp-form__fieldset {
    border: none;
    padding: 0;
    margin: 0 0 40px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.emp-form__fieldset:last-of-type {
    margin-bottom: 32px;
}

.emp-form__legend {
    font-size: 18px;
    font-weight: 700;
    color: var(--emp-text);
    margin: 0 0 24px;
    padding: 0 0 12px;
    border-bottom: 2px solid var(--emp-bg-alt);
    width: 100%;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
}

.emp-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-width: 0;
    align-self: stretch;
}

.emp-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    min-width: 0;
    align-self: stretch;
}

/* Только последнее поле непосредственно в fieldset (не поле внутри .emp-form__row) */
.emp-form__fieldset > .emp-form__field:last-child {
    margin-bottom: 0;
}

.emp-form__label {
    font-size: 16px;
    font-weight: 600;
    color: var(--emp-text);
    line-height: 1.4;
}

.emp-form__required {
    color: #e53e3e;
    margin-left: 2px;
}

.emp-form__input,
.emp-form__select,
.emp-form__textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 13px 16px;
    border: 1.5px solid #dde3ed;
    border-radius: 8px;
    font-size: 17px;
    color: var(--emp-text);
    background: var(--emp-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.emp-form__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    cursor: pointer;
}

.emp-form__textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.emp-form__input:focus,
.emp-form__select:focus,
.emp-form__textarea:focus {
    outline: none;
    border-color: var(--emp-primary);
    box-shadow: 0 0 0 3px rgba(4, 123, 239, 0.12);
}

.emp-form__input.--error,
.emp-form__select.--error,
.emp-form__textarea.--error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.emp-form__error {
    font-size: 14px;
    line-height: 1.35;
    color: #e53e3e;
    display: block;
    margin: 0;
}

.emp-form__error:empty,
.emp-form__error[hidden] {
    display: none !important;
}

.emp-form__submit-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
}

.emp-form__submit._btn.emp-btn {
    max-width: min(100%, 440px);
    position: relative;
}

.emp-form__submit._btn.emp-btn:disabled:not(.is-loading) {
    opacity: 0.6;
    cursor: not-allowed;
}

.emp-form__submit._btn.emp-btn.is-loading:disabled {
    opacity: 1;
    cursor: wait;
}

.emp-form__submit-spinner[hidden] {
    display: none !important;
}

.emp-form__submit-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
}

.emp-form__submit.is-loading .emp-form__submit-text {
    visibility: hidden;
    opacity: 0;
}

.emp-form__submit.is-loading .emp-form__submit-spinner {
    display: block !important;
    left: 50%;
    right: auto;
    top: 50%;
    animation: emp-spin-center 0.65s linear infinite;
}

@keyframes emp-spin-center {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@media (max-width: 480px) {
    .emp-form__submit._btn.emp-btn {
        width: 100%;
        max-width: 100%;
    }
}


/* ── Block 7: Cross-sell ────────────────────────────────────────────── */
.emp-cross {
    padding: 80px 0;
    background: linear-gradient(135deg, #0f2447 0%, #1a3a6e 100%);
    color: #fff;
}

.emp-cross__body {
    display: flex;
    justify-content: center;
}

.emp-cross__content {
    max-width: 680px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.emp-cross__title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 0;
}

.emp-cross__text {
    font-size: 20px;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

.emp-cross__price {
    font-size: 30px;
    font-weight: 800;
    color: #47c8ff;
}

.emp-cross__btn.emp-btn--inverse {
    margin-top: 4px;
    align-self: stretch;
    width: 100%;
    max-width: min(100%, 680px);
    box-sizing: border-box;
}

@media (max-width: 1232px) {
    .emp-cross__title {
        font-size: calc(22px + 14 * (100vw - 393px) / 839);
    }
}

@media (max-width: 768px) {
    .emp-cross__btn.emp-btn {
        max-width: 100%;
        width: 100%;
    }
}


/* ── Modal ──────────────────────────────────────────────────────────── */
.emp-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.emp-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.emp-modal__box {
    position: relative;
    z-index: 1;
    background: var(--emp-white);
    border-radius: 20px;
    padding: 48px 40px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0,0,0,0.15);
    animation: emp-modal-in 0.25s ease;
}

@keyframes emp-modal-in {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.emp-modal__icon {
    margin-bottom: 18px;
}

.emp-modal__icon svg {
    display: block;
    width: 80px;
    height: 80px;
    margin-inline: auto;
}

.emp-modal__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--emp-text);
    margin-bottom: 16px;
}

.emp-modal__text {
    font-size: 18px;
    line-height: 1.6;
    color: var(--emp-muted);
    margin-bottom: 32px;
}

.emp-modal__close.emp-btn {
    min-width: 240px;
    max-width: 320px;
    margin-inline: auto;
}

@media (max-width: 480px) {
    .emp-modal__box {
        padding: 32px 24px;
    }
}

/* Mobile: компактные отступы между секциями (после базовых правил — перебивает padding: 80px) */
@media (max-width: 768px) {
    .emp-hero {
        padding: 90px 0 24px;
    }

    .emp-advantages,
    .emp-about,
    .emp-publish,
    .emp-form-section,
    .emp-cross {
        padding: 24px 0;
    }

    .emp-section-title {
        margin-bottom: 14px;
    }

    .emp-about__title {
        margin-bottom: 8px;
    }

    .emp-form-section__subtitle {
        margin-bottom: 18px;
    }

    .emp-advantages__grid,
    .emp-about__grid,
    .emp-publish__grid {
        gap: 18px;
    }

    .emp-advantages__list {
        gap: 10px;
    }

    .emp-advantages__item {
        padding: 10px 12px;
    }

    .emp-advantages__image.emp-image-glow img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        object-position: center center;
    }

    /* Скрин приложения (employers-img3): компактнее по высоте и ширине на мобилке */
    .emp-publish__image {
        max-width: min(260px, 78vw);
    }

    .emp-publish__image.emp-image-glow img {
        width: auto;
        max-width: 100%;
        max-height: 280px;
        height: auto;
        margin-inline: auto;
        object-fit: contain;
    }

    .emp-publish__text {
        margin: 10px 0 16px;
    }

    .emp-hero__title {
        margin-bottom: 10px;
    }

    .emp-hero__subtitle {
        margin-bottom: 14px;
    }

    .emp-hero__btn {
        margin-top: 14px;
    }

    /* Ровные боковые отступы секции + формы (fieldset/legend без сдвига контента) */
    .emp-form-section ._container {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    .emp-form {
        padding: 18px 16px;
        max-width: 100%;
    }

    /* Единый шаг между блоками полей (margin у полей в ряду не схлопывается с gap сетки) */
    .emp-form__fieldset {
        gap: 18px;
        margin: 0 0 28px;
    }

    .emp-form__fieldset:last-of-type {
        margin-bottom: 24px;
    }

    .emp-form__legend {
        margin-bottom: 12px;
    }

    .emp-form__field {
        margin-bottom: 0;
    }

    .emp-form__row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .emp-cross__btn._btn.emp-btn {
        font-size: 15px;
        line-height: 1.35;
        padding: 12px 16px;
        min-height: 48px;
    }

    .emp-cross__content {
        gap: 10px;
    }

    /* Текст на мобилке: −2px к базовым размерам (заголовки h2/hero/cross title не трогаем) */
    .emp-hero__subtitle {
        font-size: 18px;
    }

    .emp-advantages__item {
        font-size: 16px;
    }

    .emp-about__text {
        font-size: 16px;
    }

    .emp-about__countries li {
        font-size: 15px;
    }

    .emp-publish__text {
        font-size: 16px;
    }

    .emp-form-section__subtitle {
        font-size: 18px;
    }

    .emp-form__label {
        font-size: 14px;
    }

    .emp-form__input,
    .emp-form__select,
    .emp-form__textarea {
        font-size: 15px;
    }

    .emp-form__error {
        font-size: 12px;
    }

    .emp-cross__text {
        font-size: 18px;
    }

    .emp-cross__price {
        font-size: 20px;
    }

    .emp-modal__text {
        font-size: 16px;
    }

    ._btn.emp-btn {
        font-size: 17px;
    }
}

/* Очень узкий экран: подзаголовок героя ещё на −2px от прежних 17px */
@media (max-width: 393px) {
    .emp-hero__subtitle {
        font-size: 15px;
    }
}
