/* Покращення темної теми для сторінки вакансій */

/* Загальні стилі для темної теми */
body:not(.light-theme) {
    --vacancy-bg: rgba(40, 50, 70, 0.95);
    --vacancy-border: rgba(100, 116, 139, 0.4);
    --vacancy-hover-bg: rgba(50, 60, 80, 0.98);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --filter-bg: rgba(30, 41, 59, 0.85);
    --filter-border: rgba(75, 85, 99, 0.5);
    --input-bg: rgba(30, 41, 59, 0.9);
    --input-border: rgba(100, 116, 139, 0.6);
    --shadow-primary: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* Поліпшення карточок вакансій */
body:not(.light-theme):not(.light-background-active) .vacancy-item {
    background: var(--vacancy-bg) !important;
    border: 2px solid var(--vacancy-border) !important;
    color: var(--text-primary) !important;
    box-shadow: var(--shadow-primary) !important;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

body:not(.light-theme):not(.light-background-active) .vacancy-item:hover {
    background: var(--vacancy-hover-bg) !important;
    border-color: rgba(56, 178, 172, 0.6) !important;
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-5px);
}

/* Заголовки вакансій */
body:not(.light-theme) .vacancy-item h3,
body:not(.light-theme) .vacancy-item .job-title {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Назва компанії */
body:not(.light-theme) .vacancy-item .company-name {
    color: #60a5fa !important;
    font-weight: 500 !important;
    font-size: 0.95rem;
}

/* Опис та інший текст */
body:not(.light-theme) .vacancy-item p,
body:not(.light-theme) .vacancy-item .description {
    color: var(--text-secondary) !important;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Мета-інформація (дата, зарплата, локація) */
body:not(.light-theme) .vacancy-meta,
body:not(.light-theme) .vacancy-date,
body:not(.light-theme) .salary,
body:not(.light-theme) .location {
    color: var(--text-muted) !important;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Поліпшення фільтрів */
body:not(.light-theme):not(.light-background-active) .filter-section {
    background: var(--filter-bg) !important;
    border: 2px solid var(--filter-border) !important;
    box-shadow: var(--shadow-primary) !important;
    backdrop-filter: blur(15px);
    padding: 20px;
    border-radius: 12px;
}

/* Селекти у фільтрах */
body:not(.light-theme):not(.light-background-active) .filter-select,
body:not(.light-theme):not(.light-background-active) select {
    background: var(--input-bg) !important;
    border: 2px solid var(--input-border) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body:not(.light-theme):not(.light-background-active) .filter-select:focus,
body:not(.light-theme):not(.light-background-active) select:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
    outline: none;
    background: rgba(30, 41, 59, 0.95) !important;
}

/* Опції у селектах */
body:not(.light-theme):not(.light-background-active) .filter-select option,
body:not(.light-theme):not(.light-background-active) select option {
    background: rgba(30, 41, 59, 0.98) !important;
    color: var(--text-primary) !important;
    padding: 10px;
    border: none;
}

/* Поля вводу */
body:not(.light-theme) input[type="text"],
body:not(.light-theme) input[type="search"],
body:not(.light-theme) input[type="email"] {
    background: var(--input-bg) !important;
    border: 2px solid var(--input-border) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

body:not(.light-theme) input[type="text"]:focus,
body:not(.light-theme) input[type="search"]:focus,
body:not(.light-theme) input[type="email"]:focus {
    border-color: #60a5fa !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2) !important;
    outline: none;
    background: rgba(30, 41, 59, 0.95) !important;
}

/* Плейсхолдери */
body:not(.light-theme) input::placeholder,
body:not(.light-theme) select::placeholder {
    color: rgba(203, 213, 225, 0.6) !important;
}

/* Кнопки */
body:not(.light-theme) .filter-btn,
body:not(.light-theme) .apply-btn,
body:not(.light-theme) .reset-btn,
body:not(.light-theme) .reset-filters-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body:not(.light-theme):not(.light-background-active) .apply-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

body:not(.light-theme):not(.light-background-active) .apply-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

body:not(.light-theme):not(.light-background-active) .reset-btn,
body:not(.light-theme):not(.light-background-active) .reset-filters-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

body:not(.light-theme):not(.light-background-active) .reset-btn:hover,
body:not(.light-theme):not(.light-background-active) .reset-filters-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

/* Кнопка "Створити вакансію" */
body:not(.light-theme):not(.light-background-active) .create-vacancy-btn {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body:not(.light-theme):not(.light-background-active) .create-vacancy-btn:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.6);
}

/* ПОКРАЩЕННЯ ДЛЯ СВІТЛО-СІРИХ ФОНІВ */
/* Робимо текст чорним на світло-сірих фонах для кращої видимості */

/* Найбільш специфічні селектори для світло-сірих фонів */
body[style*="f5f7fa"] h1,
body[style*="f5f7fa"] .hero-title,
body[style*="f5f7fa"] .section h2,
body[style*="f5f7fa"] .section-title,
body[style*="f5f7fa"] .page-title,
body[style*="f5f7fa"] .main-title {
    color: #000000 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9) !important;
    font-weight: 800 !important;
}

body[style*="c3cfe2"] h1,
body[style*="c3cfe2"] .hero-title,
body[style*="c3cfe2"] .section h2,
body[style*="c3cfe2"] .section-title,
body[style*="c3cfe2"] .page-title,
body[style*="c3cfe2"] .main-title {
    color: #000000 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9) !important;
    font-weight: 800 !important;
}

body[style*="e3ffe7"] h1,
body[style*="e3ffe7"] .hero-title,
body[style*="e3ffe7"] .section h2,
body[style*="e3ffe7"] .section-title,
body[style*="e3ffe7"] .page-title,
body[style*="e3ffe7"] .main-title {
    color: #000000 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9) !important;
    font-weight: 800 !important;
}

body[style*="d9e7ff"] h1,
body[style*="d9e7ff"] .hero-title,
body[style*="d9e7ff"] .section h2,
body[style*="d9e7ff"] .section-title,
body[style*="d9e7ff"] .page-title,
body[style*="d9e7ff"] .main-title {
    color: #000000 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9) !important;
    font-weight: 800 !important;
}

/* Додаткові селектори для всіх можливих заголовків на світлих фонах */
body.light-background-active h1,
body.light-background-active .hero-title,
body.light-background-active .section h2,
body.light-background-active .section-title,
body.light-background-active .page-title,
body.light-background-active .main-title {
    color: #000000 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9) !important;
    font-weight: 800 !important;
}

/* Універсальні селектори для будь-яких світлих фонів */
html[style*="f5f7fa"] h1,
html[style*="f5f7fa"] .hero-title,
html[style*="c3cfe2"] h1,
html[style*="c3cfe2"] .hero-title,
html[style*="e3ffe7"] h1,
html[style*="e3ffe7"] .hero-title,
html[style*="d9e7ff"] h1,
html[style*="d9e7ff"] .hero-title {
    color: #000000 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9) !important;
    font-weight: 800 !important;
}

/* Спеціальні селектори для найбільш проблемного тексту - гарне обрамлення як у кнопки */
body[style*="f5f7fa"] .hero-title,
body[style*="c3cfe2"] .hero-title,
body[style*="e3ffe7"] .hero-title,
body[style*="d9e7ff"] .hero-title,
body[style*="f5f7fa"] .container h1:first-child,
body[style*="c3cfe2"] .container h1:first-child,
body[style*="e3ffe7"] .container h1:first-child,
body[style*="d9e7ff"] .container h1:first-child {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    border: 2px solid #2980b9 !important;
    padding: 15px 25px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4) !important;
    display: inline-block !important;
    margin-bottom: 20px !important;
    transition: all 0.3s ease !important;
}

/* Ефект при наведенні */
body[style*="f5f7fa"] .hero-title:hover,
body[style*="c3cfe2"] .hero-title:hover,
body[style*="e3ffe7"] .hero-title:hover,
body[style*="d9e7ff"] .hero-title:hover,
body[style*="f5f7fa"] .container h1:first-child:hover,
body[style*="c3cfe2"] .container h1:first-child:hover,
body[style*="e3ffe7"] .container h1:first-child:hover,
body[style*="d9e7ff"] .container h1:first-child:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5) !important;
}

/* Додатковий селектор для всіх елементів з білим кольором тексту на світлому фоні */
body[style*="f5f7fa"] *[style*="color: white"],
body[style*="f5f7fa"] *[style*="color: #fff"],
body[style*="f5f7fa"] *[style*="color:#fff"],
body[style*="f5f7fa"] *[style*="color: #ffffff"],
body[style*="c3cfe2"] *[style*="color: white"],
body[style*="c3cfe2"] *[style*="color: #fff"],
body[style*="c3cfe2"] *[style*="color:#fff"],
body[style*="c3cfe2"] *[style*="color: #ffffff"],
body[style*="e3ffe7"] *[style*="color: white"],
body[style*="e3ffe7"] *[style*="color: #fff"],
body[style*="e3ffe7"] *[style*="color:#fff"],
body[style*="e3ffe7"] *[style*="color: #ffffff"],
body[style*="d9e7ff"] *[style*="color: white"],
body[style*="d9e7ff"] *[style*="color: #fff"],
body[style*="d9e7ff"] *[style*="color:#fff"],
body[style*="d9e7ff"] *[style*="color: #ffffff"] {
    color: #000000 !important;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.9) !important;
}

/* Додаткові універсальні стилі для заголовків на світлих фонах */
.hero-title,
h1.hero-title,
.container h1:first-child {
    position: relative;
    z-index: 10;
}

/* Фіксування через класи - додаємо красиву кнопку-стиль для головного заголовка */
body.light-background-active .hero-title,
body.light-background-active .container h1:first-child,
body[class*="light"] .hero-title,
body[class*="light"] .container h1:first-child {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3498db, #2980b9) !important;
    border: 2px solid #2980b9 !important;
    padding: 15px 25px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4) !important;
    display: inline-block !important;
    margin-bottom: 20px !important;
    transition: all 0.3s ease !important;
}

/* Заголовки секцій */
body:not(.light-theme) .section h2,
body:not(.light-theme) h1,
body:not(.light-theme) h2,
body:not(.light-theme) h3 {
    color: var(--text-primary) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Лейбли */
body:not(.light-theme) label {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

/* Іконки */
body:not(.light-theme) .fa,
body:not(.light-theme) .fas,
body:not(.light-theme) .far,
body:not(.light-theme) .fab,
body:not(.light-theme) i {
    color: var(--text-secondary) !important;
}

/* На світлому page-bg (сірий/білий) темні «скляні» картки НЕ застосовуємо —
   інакше чорніють фільтри/картки і блимають рамки. Контраст дає light-bg CSS. */
body:not(.light-theme).light-background-active[style*="f5f7fa"] .vacancy-item,
body:not(.light-theme).light-background-active[style*="c3cfe2"] .vacancy-item,
body:not(.light-theme).light-background-active[style*="e3ffe7"] .vacancy-item,
body:not(.light-theme).light-background-active[style*="d9e7ff"] .vacancy-item,
body:not(.light-theme).light-background-active[style*="ffffff"] .vacancy-item,
body:not(.light-theme).light-background-active[style*="e2e8f0"] .vacancy-item,
body:not(.light-theme).light-background-active[style*="cbd5e0"] .vacancy-item,
body:not(.light-theme)[style*="f5f7fa"] .vacancy-item,
body:not(.light-theme)[style*="c3cfe2"] .vacancy-item,
body:not(.light-theme)[style*="e3ffe7"] .vacancy-item,
body:not(.light-theme)[style*="d9e7ff"] .vacancy-item,
body:not(.light-theme)[style*="ffffff"] .vacancy-item,
body:not(.light-theme)[style*="e2e8f0"] .vacancy-item,
body:not(.light-theme)[style*="cbd5e0"] .vacancy-item {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
    backdrop-filter: none;
}

body:not(.light-theme).light-background-active[style*="f5f7fa"] .filter-section,
body:not(.light-theme).light-background-active[style*="c3cfe2"] .filter-section,
body:not(.light-theme).light-background-active[style*="e3ffe7"] .filter-section,
body:not(.light-theme).light-background-active[style*="d9e7ff"] .filter-section,
body:not(.light-theme).light-background-active[style*="ffffff"] .filter-section,
body:not(.light-theme).light-background-active[style*="e2e8f0"] .filter-section,
body:not(.light-theme).light-background-active[style*="cbd5e0"] .filter-section,
body:not(.light-theme)[style*="f5f7fa"] .filter-section,
body:not(.light-theme)[style*="c3cfe2"] .filter-section,
body:not(.light-theme)[style*="e3ffe7"] .filter-section,
body:not(.light-theme)[style*="d9e7ff"] .filter-section,
body:not(.light-theme)[style*="ffffff"] .filter-section,
body:not(.light-theme)[style*="e2e8f0"] .filter-section,
body:not(.light-theme)[style*="cbd5e0"] .filter-section {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08) !important;
    color: #0f172a !important;
    backdrop-filter: none;
}

/* Adaptive стилі */
@media (max-width: 768px) {
    body:not(.light-theme) .filter-section {
        padding: 16px;
        gap: 12px;
    }
    
    body:not(.light-theme) .filter-select,
    body:not(.light-theme) input[type="text"],
    body:not(.light-theme) input[type="search"] {
        padding: 10px 14px;
        font-size: 0.95rem;
    }
    
    body:not(.light-theme) .vacancy-item {
        padding: 16px;
    }
    
    body:not(.light-theme) .create-vacancy-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Додаткові покращення для читабельності */
body:not(.light-theme) .vacancy-item strong,
body:not(.light-theme) .vacancy-item b {
    color: var(--text-primary) !important;
    font-weight: 600;
}

body:not(.light-theme) .vacancy-item em,
body:not(.light-theme) .vacancy-item i {
    color: var(--text-muted) !important;
}

/* Покращення скролбарів */
body:not(.light-theme) ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body:not(.light-theme) ::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 4px;
}

body:not(.light-theme) ::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.6);
    border-radius: 4px;
}

body:not(.light-theme) ::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.8);
}

/* Стилі для пагінації */
body:not(.light-theme) .pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

body:not(.light-theme) .pagination a,
body:not(.light-theme) .pagination button {
    background: var(--input-bg) !important;
    border: 2px solid var(--input-border) !important;
    color: var(--text-primary) !important;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

body:not(.light-theme) .pagination a:hover,
body:not(.light-theme) .pagination button:hover {
    background: var(--vacancy-hover-bg) !important;
    border-color: #60a5fa !important;
    transform: translateY(-2px);
}

body:not(.light-theme) .pagination .active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    border-color: #3b82f6 !important;
} 