/*  Стили для страницы (vacancies.html) */
.vacancies-container {
    padding: 5px;
}

.vacancies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Карточка вакансии --- */
.vacancy-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--primary-light);
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow);
    scroll-margin-top: 70px;
}

.vacancy-card:hover {
    border-color: var(--border);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* Состояние при раскрытии */
.vacancy-card.is-active {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* --- Шапка карточки (Логотип + Название) --- */
.vacancy-header-flex {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 1rem;
}

.company-logo-badge {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: #2563EB;
    border: 1px solid rgba(37, 99, 235, 0.1);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.title-area {
    flex: 1;
    min-width: 0;
}

.vacancy-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vacancy-company {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Мета-теги (Зарплата, Опыт, Формат) --- */
.vacancy-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.tag-salary {
    background: rgba(37, 99, 235, 0.05);
    color: var(--primary-dark);
    border: 2px solid var(--primary-soft);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.85rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.tag-pill {
    background: var(--bg-soft);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

/* --- Превью описания --- */
.vacancy-description-preview {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 1.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
    hyphens: auto;
}

/* --- Кнопки действий --- */
.vacancy-card-footer {
    display: flex;
    gap: 7px;
    margin-top: 10px;
    padding-top: 12px;

}

.btn-toggle-details,
.btn-quick-apply {
    flex: 1;
    height: 38px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-details {
    flex: 0 0 110px;
    background: var(--bg-soft);
    color: var(--text-secondary);
}

.btn-toggle-details:active {
    background: var(--border);
}

.btn-quick-apply {
    flex: 1;
    background: var(--primary-light);
    color: var(--white);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
}

.btn-quick-apply:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

/* --- Раскрывающаяся часть (Аккордеон) --- */
.vacancy-expandable-content {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.details-inner {
    padding: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-section {
    background-color: var(--primary-soft);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.detail-section h4 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 10px;
    padding-bottom: 4px;
}

.detail-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-line;
    text-align: justify;
    text-align-last: left;
    hyphens: auto;
}

/* Локация и график */
.detail-footer-info {
    margin-top: 8px;
    margin-bottom: 0;
    padding: 12px 16px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* --- Состояния (Загрузка / Пусто) --- */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 400px) {
    .vacancy-card {
        padding: 0.85rem;
    }

    .vacancy-header-flex {
        gap: 8px;
        margin-bottom: 0.75rem;
    }

    .company-logo-badge {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .vacancy-title {
        font-size: 1rem;
    }

    .tag-salary, .tag-pill {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .vacancy-card-footer {
        flex-direction: row;
        gap: 5px;
        margin-top: 8px;
    }

    .btn-toggle-details {
        flex: 0 0 90px;
        font-size: 0.75rem;
        height: 34px;
    }

    .btn-quick-apply {
        font-size: 0.75rem;
        height: 34px;
    }

    .detail-footer-info {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}