.page-wrapper {
    background-color: var(--bg-page);
    min-height: 100vh;
}

.vacancy-main {
    max-width: var(--max-width);
    margin: var(--between-island-gap) auto;
    padding: 0 3px 0;
    width: 100%;
}

.vacancy-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: var(--between-island-gap);
    align-items: start;
}

.vacancy-content {
    padding-top: 0;
}

.vacancy-header-row {
    display: flex;
    gap: var(--between-island-gap);
    margin-bottom: var(--between-island-gap);
    align-items: stretch;
}

.vacancy-sidebar {
    padding-top: 0;
}

.vacancy-logo-island {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vacancy-logo-large {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.08);
    background: var(--white);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.vacancy-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.vacancy-main-info-island {
    flex: 1 1 auto;
    height: 160px;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

.vacancy-position {
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0 0 4px 0;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-name {
    font-size: 1.0rem;
    color: var(--primary);
    margin: 0 0 14px 0;
    font-weight: 550;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Теги-плашки */
.vacancy-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: hidden;
    max-height: 32px;
}

.pill {
    padding: 6px 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.salary-pill {
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.85rem;
}

/* --- ТЕЛО ВАКАНСИИ (Details Island) --- */
.vacancy-info-island {
    padding: 35px;
    margin-bottom: var(--between-island-gap);
}

.details-section h3 {
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 18px;
}

.rich-text {
    font-size: 0.96rem;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-line;
}

/* --- ПРАВАЯ КОЛОНКА (Sidebar) --- */
.sticky-cta {
    padding: 30px;
    position: sticky;
    top: 25px;
    text-align: center;
    display: none;
}

.btn-apply {
    background: var(--bg-content);
    color: var(--primary-light);
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 12px;
    padding: 12px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 0 3px 1px var(--primary, #2563eb);
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 4px 2px var(--primary, #2563eb);
}

.btn-apply:active {
    transform: translateY(0);
    scale: 0.98;
}

/* ====================== АДАПТИВНОСТЬ ====================== */
@media (max-width: 1024px) {
    .vacancy-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .vacancy-main {
        padding: 0 16px;
        box-sizing: border-box;
    }

    .vacancy-main-info-island {
        height: auto;
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .vacancy-header-row {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-bottom: 16px;
    }

    .vacancy-logo-island {
        width: 100px;
        height: 100px;
    }

    .vacancy-logo-large {
        border-radius: 14px;
        font-size: 1.8rem;
    }

    .vacancy-main-info-island {
        width: 100%;
        padding: 16px;
        box-sizing: border-box;
        text-align: center;
        align-items: center;
    }

    .vacancy-position {
        font-size: 1.1rem;
        line-height: 1.2;
    }

    .company-name {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .vacancy-meta-pills {
        justify-content: center;
        gap: 6px;
    }

    .pill {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .vacancy-info-island {
        padding: 20px 16px;
        margin-bottom: 16px;
        box-sizing: border-box;
    }

    .rich-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .details-section h3 {
        margin-bottom: 12px;
        font-size: 0.80rem;
    }

    .sticky-cta {
        padding: 20px 16px;
        position: static;
    }

    .btn-apply {
        min-height: 50px;
        font-size: 0.92rem;
    }
}