/* === Базовые стили и сброс === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    background: #f3f4f6;
    color: #0f172a;
    padding: 0 16px 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background 0.2s, color 0.2s;
}

html.dark body {
    background: #0f172a;
    color: #e2e8f0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* === Шапка === */
.header {
    text-align: center;
    margin: 28px 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 6px;
}

.logo-text {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0047cc, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0 8px 16px rgba(0,71,204,0.3), 0 4px 8px rgba(0,0,0,0.2), 0 2px 4px rgba(255,255,255,0.2);
}

html.dark .logo-text {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 8px 16px rgba(96,165,250,0.4), 0 4px 8px rgba(0,0,0,0.5);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin: 8px 0;
}

html.dark .page-title {
    color: #f1f5f9;
}

.header p {
    color: #6b7280;
    font-size: 1rem;
    font-style: italic;
}

html.dark .header p {
    color: #9ca3af;
}

.logo-heart {
    display: inline-block;
    width: 130px;
    height: 130px;
    background: repeating-linear-gradient(45deg, #0047cc 0px, #0047cc 6px, rgba(179,217,255,0.85) 6px, rgba(179,217,255,0.85) 12px);
    clip-path: path("M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z");
    box-shadow: 0 6px 12px rgba(0,0,0,0.3), 0 2px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(0,0,0,0.15);
    vertical-align: middle;
    flex-shrink: 0;
}

html.dark .logo-heart {
    background: repeating-linear-gradient(45deg, #60a5fa 0px, #60a5fa 6px, rgba(179,217,255,0.85) 6px, rgba(179,217,255,0.85) 12px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.4);
}

/* === Кнопка темы === */
.theme-switch {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: #0047cc;
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 100;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
    transition: all 0.2s;
}

.theme-switch:hover {
    transform: scale(1.1);
}

html.dark .theme-switch {
    border-color: #475569;
    box-shadow: 0 6px 14px rgba(255,255,255,0.1);
}

/* === Подвал === */
.site-footer {
    margin-top: 40px;
    padding: 20px 0 100px 0;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

html.dark .site-footer {
    border-color: #334155;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.footer-links-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: #334155;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s, text-decoration 0.2s;
    white-space: nowrap;
}

.footer-links a:hover {
    color: #0047cc;
    text-decoration: underline;
}

html.dark .footer-links a {
    color: #cbd5e1;
}

html.dark .footer-links a:hover {
    color: #60a5fa;
}

.footer-links .highlight {
    font-weight: 600;
    color: #0047cc;
}

html.dark .footer-links .highlight {
    color: #60a5fa;
}

.footer-copy {
    color: #94a3b8;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .footer-links a {
        font-size: 0.95rem;
        margin: 0 4px; /* чтобы не слипались */
    }
    .footer-links-row {
        gap: 12px;
    }
}

/* === Кнопка "Наверх" === */
#backToTopBtn {
    display: none;
    position: fixed;
    bottom: 160px;
    right: 20px;
    z-index: 99;
    background: linear-gradient(180deg, #0055e6 0%, #0039a6 100%);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* === Поисковая секция === */
.search-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

html.dark .search-section {
    background: #1e293b;
    border-color: #334155;
}

.search-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 40px;
    outline: none;
    background: white;
    color: inherit;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.04);
    min-width: 0;
}

html.dark .search-input {
    background: #0f172a;
    border-color: #475569;
}

.search-btn {
    background: linear-gradient(180deg, #0055e6 0%, #0039a6 100%);
    color: white;
    border: none;
    padding: 0 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    white-space: nowrap;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.search-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* === Фильтры === */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-group {
    min-width: 0;
    position: relative;
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.filter-select,
.filter-input-small {
    width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
    background: white;
    outline: none;
    color: inherit;
}

html.dark .filter-select,
html.dark .filter-input-small {
    background: #1e293b;
    border-color: #475569;
}

/* === Автодополнение городов === */
.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

html.dark .city-suggestions {
    background: #1e293b;
    border-color: #475569;
}

.city-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s;
}

.city-suggestion-item:hover {
    background: #eef2ff;
}

html.dark .city-suggestion-item:hover {
    background: #334155;
}

/* === Сортировка === */
.sort-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sort-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    background: #eef2ff;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.sort-btn.active {
    background: #0047cc;
    color: white;
    border-color: #0047cc;
}

html.dark .sort-btn {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

html.dark .sort-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* === История поиска === */
.history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.history-item {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    background: #eef2ff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

html.dark .history-item {
    background: #334155;
}

.history-item button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    color: #64748b;
    padding: 0 2px;
    margin-left: 2px;
}

.clear-history {
    background: none;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    color: #0047cc;
    margin-left: 8px;
}

/* === Результаты === */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.counter {
    background: #e0e7ff;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #0047cc;
}

html.dark .counter {
    background: #334155;
    color: #cbd5e1;
}

.reset-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

html.dark .reset-btn {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

/* === Карточки вакансий === */
.vacancies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vacancy-card,
.card {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    border: 1px solid #edf2f7;
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    animation: fadeSlideUp 0.3s ease-out forwards;
    opacity: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.vacancy-card:active {
    background: inherit;
}

@keyframes fadeSlideUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

html.dark .vacancy-card,
html.dark .card {
    background: #1e293b;
    border-color: #334155;
}

/* === Золотая рамка для премиум-вакансий === */
.vacancy-card.premium {
    border: 2px solid #f5b042;
    box-shadow: 0 2px 12px rgba(245,176,66,0.3), 0 2px 6px rgba(0,0,0,0.05);
}

html.dark .vacancy-card.premium {
    border-color: #f5b042;
    box-shadow: 0 2px 12px rgba(245,176,66,0.2);
}

.vacancy-card.premium::before {
    content: "⭐ Премиум";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #f5b042 0%, #e0950f 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    z-index: 15;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* === Красная рамка для срочных вакансий === */
.vacancy-card.urgent {
    border: 2px solid #dc2626;
    box-shadow: 0 2px 12px rgba(220,38,38,0.2), 0 2px 6px rgba(0,0,0,0.05);
}

html.dark .vacancy-card.urgent {
    border-color: #ef4444;
    box-shadow: 0 2px 12px rgba(239,68,68,0.25);
}

.vacancy-card.urgent::after {
    content: "🔴 Срочно!";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    z-index: 15;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Если карточка и премиум, и срочная — оба значка */
.vacancy-card.premium.urgent::before {
    content: "⭐ Премиум";
    top: -12px;
}

.vacancy-card.premium.urgent::after {
    content: "🔴 Срочно!";
    bottom: -12px;
}

/* === Рекламная карточка === */
.vacancy-card.ad {
    border: 2px dashed #f59e0b;
    background: #fffbeb;
    cursor: pointer;
}

html.dark .vacancy-card.ad {
    background: #2d2a1e;
    border-color: #f59e0b;
}

.vacancy-card.ad::before {
    content: "📢 Реклама";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    z-index: 15;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.vacancy-card.ad .job-title {
    color: #92400e;
}

html.dark .vacancy-card.ad .job-title {
    color: #fbbf24;
}

.job-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
    padding-right: 90px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    word-break: break-word;
}

html.dark .job-title {
    color: #f1f5f9;
}

.job-title .date-badge {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    margin-left: 12px;
}

html.dark .job-title .date-badge {
    color: #9ca3af;
}

.salary {
    font-size: 1.15rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 6px;
    padding-right: 90px;
}

html.dark .salary {
    color: #34d399;
}

.company-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #0047cc;
    flex-shrink: 0;
    text-transform: uppercase;
    overflow: hidden;
}

.logo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html.dark .logo-placeholder {
    background: #334155;
    color: #93c5fd;
}

.company-name {
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

html.dark .company-name {
    color: #f1f5f9;
}

.rating-row {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #b45309;
    margin-bottom: 4px;
}

.address {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 8px;
}

html.dark .address {
    color: #9ca3af;
}

.tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.tag {
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: #475569;
}

html.dark .tag {
    background: #334155;
    color: #cbd5e1;
}

.card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}

.btn-respond {
    background: linear-gradient(180deg, #0055e6 0%, #0039a6 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    cursor: pointer;
}

.btn-call {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #047857;
    box-shadow: 0 4px 10px rgba(16,185,129,0.4), 0 2px 5px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-email {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #1d4ed8;
    box-shadow: 0 4px 10px rgba(59,130,246,0.4), 0 2px 5px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

/* === Кнопка "Сайт компании" === */
.btn-website {
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #5b21b6;
    box-shadow: 0 4px 10px rgba(139,92,246,0.4), 0 2px 5px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.3);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-website:hover {
    background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%);
}

/* === Крупные кнопки мессенджеров === */
.btn-share {
    padding: 10px 22px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-share-round {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    text-decoration: none;
    flex-shrink: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

.btn-share-round i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.btn-whatsapp { background: #25D366; color: white; }
.btn-whatsapp:hover { background: #128C7E; }
.btn-telegram { background: #0088cc; color: white; }
.btn-telegram:hover { background: #006699; }
.btn-vk { background: #0077FF; color: white; }
.btn-vk:hover { background: #0066CC; }

.share-buttons {
    display: flex;
    gap: 14px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* === Кнопки Избранное и Скрыть === */
.save-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0;
    z-index: 10;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.save-btn:focus,
.save-btn:active {
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.save-btn.saved {
    background: #ff6b6b;
    color: white;
    border-color: #dc2626;
}

.hide-btn {
    position: absolute;
    top: 50px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #94a3b8;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 0;
    z-index: 10;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.hide-btn:focus,
.hide-btn:active {
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hide-btn:hover {
    color: #dc2626;
    border-color: #dc2626;
}

html.dark .save-btn,
html.dark .hide-btn {
    background: #1e293b;
    border-color: #475569;
}

/* === Кнопка контакта === */
.btn-contact {
    background: #f1f5f9;
    border: 1px solid #d1d5db;
    color: #334155;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

html.dark .btn-contact {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

/* === Подписка === */
.subscribe-section {
    margin: 40px 0 20px;
}

.subscribe-card {
    background: white;
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
}

html.dark .subscribe-card {
    background: #1e293b;
    border-color: #334155;
}

.subscribe-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #0047cc, #3b82f6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 16px rgba(0,71,204,0.3);
}

.subscribe-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

html.dark .subscribe-title {
    color: #f1f5f9;
}

.subscribe-desc {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 20px;
    max-width: 400px;
}

html.dark .subscribe-desc {
    color: #9ca3af;
}

.subscribe-form {
    display: flex;
    width: 100%;
    max-width: 450px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.subscribe-input {
    flex: 1 1 250px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 40px;
    outline: none;
    font-size: 0.9rem;
    line-height: 42px;
    background: white;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.subscribe-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

html.dark .subscribe-input {
    background: #0f172a;
    border-color: #475569;
}

.subscribe-btn {
    background: linear-gradient(180deg, #0055e6 0%, #0039a6 100%);
    color: white;
    border: none;
    height: 42px;
    padding: 0 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,71,204,0.3);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.subscribe-btn:hover {
    background: linear-gradient(180deg, #1d4ed8 0%, #1e3a8a 100%);
}

.subscribe-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.subscribe-status {
    margin-top: 16px;
    min-height: 24px;
    font-size: 0.9rem;
    font-weight: 500;
}

.subscribe-status.success {
    color: #059669;
}

.subscribe-status.error {
    color: #dc2626;
}

/* === Дополнительные секции === */
.extra-sections {
    margin-top: 40px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0f172a;
}

html.dark .section-title {
    color: #f1f5f9;
}

.companies-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.company-card {
    background: #eef2ff;
    border-radius: 12px;
    padding: 10px 18px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    border: 1px solid #cbd5e1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0047cc;
    transition: all 0.2s;
}

html.dark .company-card {
    background: #1e293b;
    border-color: #475569;
    color: #60a5fa;
}

/* === Кнопка "Загрузить ещё" === */
.load-more-btn {
    background: white;
    border: 2px solid #0047cc;
    color: #0047cc;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.load-more-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #cbd5e1;
    cursor: default;
    box-shadow: none;
}

html.dark .load-more-btn {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

html.dark .load-more-btn:disabled {
    background: #0f172a;
    color: #64748b;
    border-color: #334155;
}

/* === Недавно просмотренные и сохранённые поиски === */
.recent-section,
.saved-searches-section {
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

html.dark .recent-section,
html.dark .saved-searches-section {
    background: #1e293b;
    border-color: #334155;
}

.recent-header,
.saved-searches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.recent-title,
.saved-searches-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
}

html.dark .recent-title,
html.dark .saved-searches-title {
    color: #f1f5f9;
}

.recent-clear-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
}

.recent-scroll,
.saved-searches-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.recent-card,
.saved-search-card {
    min-width: 220px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.recent-card:hover,
.saved-search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

html.dark .recent-card,
html.dark .saved-search-card {
    background: #0f172a;
    border-color: #334155;
}

/* === Кнопка удаления === */
.remove-btn {
    background: #dc2626 !important;
    color: white !important;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

/* === Кнопка избранного на странице вакансии === */
.fav-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.fav-btn.active {
    background: #ff6b6b;
}
.fav-btn:focus,
.fav-btn:active {
    outline: none;
}
/* ========== АДАПТИВНОСТЬ ========== */

/* Планшеты и небольшие ноутбуки */
@media (max-width: 1024px) {
    .container {
        padding: 0 12px;
    }
    .search-section {
        padding: 16px;
    }
}

/* Мобильные устройства (ширина до 768px) */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2.2rem;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .search-row {
        flex-direction: column;
    }
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    .filters-grid {
        grid-template-columns: 1fr;
    }
    .sort-btns {
        justify-content: center;
        width: 100%;
    }
    .card-actions {
        justify-content: center;
    }
    .btn-share-round {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .recent-card,
    .saved-search-card {
        min-width: 180px;
    }
    .share-buttons {
        justify-content: center;
    }
    .subscribe-form {
        flex-direction: column;
        align-items: stretch;
    }
    .subscribe-input {
        width: 100%;
        height: 40px;
        line-height: 40px;
        padding: 0 12px;
        font-size: 0.85rem;
    }
    .subscribe-btn {
        width: 100%;
        justify-content: center;
        height: 40px;
        padding: 0 20px;
        font-size: 0.85rem;
    }
    .site-footer {
        padding-bottom: 120px;
    }
    .footer-links a {
        font-size: 0.9rem;
        margin: 0 4px;
    }
    .footer-links-row {
        gap: 12px;
    }
    .theme-switch {
        bottom: 80px;
        right: 10px;
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
        border-width: 2px;
    }
    #backToTopBtn {
        bottom: 145px;
        right: 10px;
        width: 46px;
        height: 46px;
        font-size: 1.2rem;
    }
    .save-btn {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
    }
    .hide-btn {
        width: 30px;
        height: 30px;
        top: 42px;
        right: 8px;
    }
    .job-title {
        padding-right: 80px;
        word-break: break-word;
    }
    .salary {
        padding-right: 80px;
    }
}

/* Очень маленькие экраны (до 480px) */
@media (max-width: 480px) {
    body {
        padding: 0 8px 16px;
    }
    .header {
        margin: 20px 0 12px;
    }
    .logo-heart {
        width: 100px;
        height: 100px;
    }
    .logo-text {
        font-size: 1.8rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
    .search-section {
        padding: 12px;
        border-radius: 16px;
    }
    .search-input {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
    .search-btn {
        font-size: 0.9rem;
        height: 42px;
    }
    .filter-select,
    .filter-input-small {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
    .sort-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    .job-title {
        font-size: 1rem;
        padding-right: 70px;
        word-break: break-word;
    }
    .salary {
        font-size: 1rem;
        padding-right: 70px;
    }
    .btn-respond,
    .btn-call,
    .btn-email,
    .btn-website {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
    .vacancy-card,
    .card {
        padding: 12px 14px;
    }
    .share-buttons {
        gap: 10px;
    }
    .subscribe-title {
        font-size: 1.2rem;
    }
    .subscribe-desc {
        font-size: 0.85rem;
    }
    .subscribe-input {
        height: 38px;
        line-height: 38px;
        padding: 0 10px;
        font-size: 0.8rem;
    }
    .subscribe-btn {
        height: 38px;
        padding: 0 16px;
        font-size: 0.8rem;
    }
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    .footer-links a {
        font-size: 0.9rem;
        margin: 0 4px;
    }
    .footer-links-row {
        gap: 8px;
    }
    .theme-switch {
        bottom: 70px;
        right: 8px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    #backToTopBtn {
        bottom: 130px;
        right: 8px;
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
    .save-btn {
        width: 28px;
        height: 28px;
        top: 6px;
        right: 6px;
    }
    .hide-btn {
        width: 28px;
        height: 28px;
        top: 38px;
        right: 6px;
    }
    .job-title {
        padding-right: 65px;
    }
    .salary {
        padding-right: 65px;
    }
}

/* Экстренные правки для экранов ≤360px */
@media (max-width: 360px) {
    .theme-switch {
        right: 4px;
        width: 38px;
        height: 38px;
        bottom: 70px;
        font-size: 1rem;
    }
    #backToTopBtn {
        right: 4px;
        width: 38px;
        height: 38px;
        bottom: 120px;
        font-size: 1rem;
    }
    .save-btn {
        width: 26px;
        height: 26px;
        top: 4px;
        right: 4px;
    }
    .hide-btn {
        width: 26px;
        height: 26px;
        top: 34px;
        right: 4px;
    }
}

/* === Выпадающее меню мессенджеров (одинаковые иконки) === */
.share-popup .btn-share-round {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.share-popup .btn-share-round i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* В мобильной версии чуть меньше */
@media (max-width: 768px) {
    .share-popup .btn-share-round {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
        }
