/* ============================================
   ASSISEEK CAREERS — ПОЛНАЯ ВЕРСИЯ
   ============================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --bg-primary: #0a0a0f;
    --bg-secondary: #13151a;
    --bg-card: rgba(18, 20, 36, 0.88);
    --bg-hover: rgba(99, 102, 241, 0.08);
    --bg-active: rgba(99, 102, 241, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #a1a5b7;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.55);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-y: auto !important;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding-bottom: 2rem;
}

/* ===== ГРАДИЕНТНЫЙ ФОН ===== */
.gradient-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: 
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(99, 102, 241, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 75%, rgba(139, 92, 246, 0.12), transparent 50%),
        radial-gradient(ellipse at 50% 50%, #12121f 0%, #0a0a0f 70%);
}

/* ===== КОНТЕЙНЕР ===== */
.container {
    max-width: 1100px;
    margin: 1.5rem auto;
    padding: 0 1.25rem;
    flex: 1;
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        margin: 2rem auto;
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
        margin: 0.75rem auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
        margin: 0.5rem auto;
    }
}

/* ===== СТЕКЛЯННАЯ КАРТОЧКА ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .glass-card {
        padding: 2rem;
        margin-bottom: 2rem;
        border-radius: var(--radius-xl);
    }
}

@media (max-width: 768px) {
    .glass-card {
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 0.75rem;
        border-radius: var(--radius-sm);
        margin-bottom: 0.75rem;
    }
}

/* ===== ШАПКА ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 14px 0;
    background: transparent;
}

@media (min-width: 768px) {
    .site-header {
        padding: 14px 20px 0;
    }
}

.navbar-glass {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.55rem 1rem;
    background: rgba(12, 14, 24, 0.82);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@media (min-width: 768px) {
    .navbar-glass {
        padding: 0.5rem 1.25rem;
        border-radius: 20px;
    }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
}

.navbar-brand img {
    height: 28px;
    width: auto;
}

@media (min-width: 768px) {
    .navbar-brand img {
        height: 32px;
    }
}

.navbar-brand span {
    background: linear-gradient(135deg, #ffffff, #a5b4fc, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.1rem;
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 1rem 0;
        gap: 4px;
    }
    .nav-links.open {
        display: flex;
    }
}

.nav-links a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.1);
}

.nav-links a.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #7c3aed 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    transition: var(--transition);
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.32);
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.42);
    color: #fff;
}

/* ===== HERO ===== */
.careers-hero {
    text-align: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.05));
    border-color: rgba(99, 102, 241, 0.2);
}

.careers-hero .hero-icon {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 0.5rem;
}

.careers-hero h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .careers-hero h2 {
        font-size: 2rem;
    }
}

.careers-hero .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ===== ФИЛЬТРЫ ===== */
.filters-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .filters-grid {
        gap: 1.25rem;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

@media (max-width: 480px) {
    .filter-buttons {
        gap: 0.3rem;
    }
}

.filter-btn {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .filter-btn {
        font-size: 0.72rem;
        padding: 0.3rem 0.7rem;
    }
}

.filter-btn:hover {
    background: var(--bg-hover);
    border-color: rgba(99, 102, 241, 0.3);
}

.filter-btn.active {
    background: var(--bg-active);
    border-color: var(--primary);
    color: var(--primary);
}

.filter-toggles .toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .filter-toggles .toggle-group {
        gap: 0.3rem;
    }
}

.toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.82rem;
    color: var(--text-secondary);
    user-select: none;
}

@media (max-width: 480px) {
    .toggle-chip {
        font-size: 0.72rem;
        padding: 0.25rem 0.6rem;
    }
}

.toggle-chip:hover {
    background: var(--bg-hover);
}

.toggle-chip input[type="checkbox"] {
    display: none;
}

.toggle-chip.active {
    background: var(--bg-active);
    border-color: var(--primary);
    color: var(--primary);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.results-count strong {
    color: var(--text-primary);
}

.btn-reset-filters {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-reset-filters:hover {
    color: var(--primary);
}

/* ===== ВАКАНСИИ ===== */
.vacancies-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .vacancies-list {
        gap: 1rem;
    }
}

.vacancy-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .vacancy-card {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .vacancy-card {
        padding: 0.6rem 0.75rem;
        border-radius: var(--radius-sm);
    }
}

.vacancy-card:hover {
    background: var(--bg-hover);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .vacancy-card:hover {
        transform: none;
    }
}

.vacancy-card.hidden {
    display: none;
}

.vacancy-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 180px;
}

@media (max-width: 480px) {
    .vacancy-info {
        min-width: unset;
    }
}

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

@media (max-width: 480px) {
    .vacancy-title {
        font-size: 0.9rem;
    }
}

.vacancy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .vacancy-meta {
        gap: 0.3rem;
        font-size: 0.7rem;
    }
}

.vacancy-meta .tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.vacancy-meta .tag i {
    font-size: 0.7rem;
}

.vacancy-meta .tag.direction {
    color: var(--primary-light);
}

.vacancy-meta .tag.no-experience {
    color: var(--warning);
}

.vacancy-meta .tag.flexible {
    color: var(--success);
}

.vacancy-description {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

@media (max-width: 480px) {
    .vacancy-description {
        font-size: 0.75rem;
    }
}

.vacancy-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .vacancy-actions {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .vacancy-actions {
        width: 100%;
    }
}

.vacancy-apply-btn {
    padding: 0.4rem 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .vacancy-apply-btn {
        width: 100%;
        justify-content: center;
        padding: 0.5rem;
        font-size: 0.78rem;
    }
}

.vacancy-apply-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

@media (max-width: 480px) {
    .vacancy-apply-btn:hover {
        transform: none;
    }
}

.empty-vacancies {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-vacancies i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.empty-vacancies p {
    margin-bottom: 0.25rem;
}

.empty-vacancies span {
    font-size: 0.85rem;
}

/* ===== МОДАЛКА ОТКЛИКА ===== */
.apply-vacancy-info {
    margin-bottom: 1.25rem;
    padding: 0.6rem 1rem;
    background: var(--bg-active);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.vacancy-badge {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.required {
    color: var(--danger);
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 0.75rem;
    }
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

@media (max-width: 480px) {
    .form-label {
        font-size: 0.8rem;
    }
}

.form-control {
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
}

@media (max-width: 480px) {
    .form-control {
        font-size: 0.88rem;
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
    }
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

@media (max-width: 480px) {
    textarea.form-control {
        min-height: 60px;
    }
}

.checkbox-group {
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .checkbox-label {
        font-size: 0.8rem;
    }
}

.checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: white;
    padding: 0.7rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
}

@media (max-width: 480px) {
    .btn-submit {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1.5rem;
        font-size: 0.88rem;
    }
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

@media (max-width: 480px) {
    .btn-submit:hover {
        transform: none;
    }
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit .btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

/* ===== АЛЕРТЫ ===== */
.alert-message {
    padding: 0.6rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: none;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #f87171;
}

@media (max-width: 480px) {
    .alert-message {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
    }
}

.alert-message.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

/* ===== МОДАЛКИ ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal[style*="display: flex"],
.modal[style*="display:flex"] {
    display: flex !important;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.25s ease;
}

@media (max-width: 480px) {
    .modal-content {
        border-radius: var(--radius-md);
        max-width: 100%;
        margin: 0.5rem;
        padding: 0.5rem;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 480px) {
    .modal-header {
        padding: 0.75rem 1rem;
    }
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

@media (max-width: 480px) {
    .modal-header h3 {
        font-size: 1rem;
    }
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

@media (max-width: 480px) {
    .modal-body {
        padding: 1rem;
    }
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 480px) {
    .modal-footer {
        flex-direction: column;
        padding: 0.75rem 1rem;
    }
    .modal-footer button {
        width: 100%;
        justify-content: center;
    }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 380px;
}

@media (max-width: 768px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
        bottom: 1rem;
    }
}

.toast {
    padding: 0.8rem 1.2rem;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease;
}

@media (max-width: 480px) {
    .toast {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}
.toast.error {
    border-left: 4px solid var(--danger);
}
.toast.info {
    border-left: 4px solid var(--info);
}
.toast.warning {
    border-left: 4px solid var(--warning);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    font-size: 1.2rem;
}
.toast-content {
    flex: 1;
    font-size: 0.85rem;
}
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

::selection {
    background: var(--primary);
    color: white;
}

/* ===== ОТКЛЮЧЕНИЕ АНИМАЦИЙ ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}