* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Montserrat', sans-serif; background-color: #f8fafc; color: #1e293b; line-height: 1.6; overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.hero.mini-hero { background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=1200') center/cover; height: 30vh; min-height: 250px; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; color: white; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7)); }
.hero-content { position: relative; z-index: 2; }
.logo-text { font-size: 2.5rem; font-weight: 700; color: #60a5fa; margin-bottom: 10px; }

/* Стилі для перемикача мов */
.lang-switcher { position: absolute; top: 20px; right: 20px; z-index: 10; display: flex; gap: 8px; }
.lang-switcher button { background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255,255,255,0.3); color: white; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.2s; backdrop-filter: blur(5px); font-family: inherit; font-size: 0.85rem; }
.lang-switcher button:hover { background: rgba(255, 255, 255, 0.3); }
.lang-switcher button.active { background: #3b82f6; border-color: #3b82f6; color: white; }

.layout { display: flex; gap: 30px; margin-top: 40px; margin-bottom: 60px; align-items: flex-start; }

.sidebar { width: 280px; flex-shrink: 0; background: white; border-radius: 12px; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 1.2rem; font-weight: 700; }
.close-sidebar { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; }
.filter-section { border-bottom: 1px solid #e2e8f0; margin-bottom: 15px; padding-bottom: 10px; }
.filter-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: 600; color: #334155; padding: 10px 0; }
.filter-body { display: none; padding-top: 10px; padding-bottom: 10px; flex-direction: column; gap: 8px; }
.filter-body.open { display: flex; }
.filter-body label { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: #475569; cursor: pointer; }
.filter-body input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #3b82f6; }
.form-select { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #cbd5e1; outline: none; font-family: inherit; font-size: 0.95rem; }

.btn-reset { width: 100%; background: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: 0.2s; margin-top: 10px; font-family: inherit; }
.btn-reset:hover { background: #e2e8f0; color: #1e293b; }

.main-content { flex-grow: 1; min-width: 0; width: 100%; max-width: 100%; }

.content-controls { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; width: 100%; max-width: 100%; }
.search-box { flex-grow: 1; display: flex; align-items: center; background: white; padding: 15px 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); max-width: 100%; box-sizing: border-box; }
.search-box i { color: #94a3b8; font-size: 1.2rem; flex-shrink: 0; }
.search-box input { border: none; outline: none; width: 100%; min-width: 0; margin-left: 15px; font-size: 1rem; font-family: inherit; background: transparent; }
.sort-box { background: white; padding: 0 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); display: flex; align-items: center; gap: 10px; max-width: 100%; box-sizing: border-box; }
.sort-box i { color: #94a3b8; flex-shrink: 0; }
.sort-box select { border: none; outline: none; font-family: inherit; font-size: 1rem; color: #1e293b; cursor: pointer; background: transparent; padding: 15px 0; width: 100%; }

.active-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tag { background: #e0f2fe; color: #0369a1; padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tag i { cursor: pointer; }

.jobs-grid { column-count: 2; column-gap: 20px; width: 100%; }
.job-card { background: white; border-radius: 12px; padding: 25px; border: 1px solid #edf2f7; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); display: flex; flex-direction: column; justify-content: space-between; min-width: 0; word-wrap: break-word; position: relative; break-inside: avoid; margin-bottom: 20px; }
.job-card.inactive { opacity: 0.7; filter: grayscale(50%); }

.action-buttons { position: absolute; top: 20px; right: 20px; display: flex; gap: 8px; z-index: 5; }
.icon-btn { background: #f1f5f9; color: #64748b; border: none; width: 35px; height: 35px; border-radius: 8px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.icon-btn:hover { background: #e2e8f0; color: #1e293b; }
.icon-btn.fav { color: #94a3b8; }
.icon-btn.fav:hover, .icon-btn.fav.active { color: #ef4444; background: #fee2e2; }
.icon-btn.share:hover { background: #10b981; color: white; }

.status-badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; margin-bottom: 15px; }
.status-badge.active { background: #dcfce7; color: #166534; }
.status-badge.inactive { background: #fee2e2; color: #991b1b; }

.job-card h3 { font-size: 1.25rem; color: #0f172a; margin-bottom: 10px; word-break: break-word; padding-right: 90px; }
.job-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; font-size: 0.85rem; color: #475569; }
.job-meta p { display: flex; align-items: center; gap: 6px; }
.job-meta i { color: #3b82f6; }
.job-salary { font-size: 1.2rem; font-weight: 700; color: #10b981; margin-bottom: 15px; }

.desc-wrapper { font-size: 0.9rem; color: #64748b; word-break: break-word; }
.desc-wrapper.collapsed { max-height: 160px; overflow: hidden; position: relative; }
.desc-wrapper.collapsed::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)); pointer-events: none; }
.desc-wrapper.expanded { max-height: none; }

.read-more-btn { color: #3b82f6; cursor: pointer; font-size: 0.85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; border: none; background: none; padding: 0; margin-top: 10px; margin-bottom: 20px; }
.read-more-btn:hover { text-decoration: underline; }

.btn-apply { background: #0f172a; color: white; border: none; padding: 12px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s; font-family: inherit; width: 100%; margin-top: auto; }
.btn-apply:hover { background: #1e293b; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; width: 100%; flex-wrap: wrap; }
.pagination button { min-width: 40px; height: 40px; padding: 0 6px; border-radius: 8px; border: 1px solid #cbd5e1; background: white; color: #334155; font-weight: 600; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
.pagination button:hover:not(:disabled) { background: #f1f5f9; border-color: #94a3b8; }
.pagination button.active { background: #3b82f6; color: white; border-color: #3b82f6; cursor: default; }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; background: #f1f5f9; }

.mobile-filter-btn { display: none; width: 100%; background: #0f172a; color: white; border: none; padding: 15px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-bottom: 20px; }
.input-group { position: relative; margin-bottom: 18px; }
.input-group i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #94a3b8; }
.input-group input { width: 100%; padding: 14px 14px 14px 45px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 1rem; outline: none; font-family: inherit; }
.btn-submit { width: 100%; background: #3b82f6; color: white; border: none; padding: 14px; border-radius: 8px; font-size: 1.1rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.modal { display: none; position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.6); align-items: center; justify-content: center; padding: 15px; }
.modal-content { background: white; padding: 35px; border-radius: 16px; width: 100%; max-width: 450px; position: relative; box-sizing: border-box; }
.close-modal { position: absolute; right: 20px; top: 15px; font-size: 1.8rem; cursor: pointer; color: #94a3b8; }
.toast { position: fixed; bottom: -100px; right: 20px; background: white; border-left: 5px solid #10b981; padding: 15px 20px; border-radius: 8px; display: flex; align-items: center; gap: 15px; z-index: 110; transition: 0.4s; max-width: calc(100% - 40px); }
.toast.show { bottom: 20px; }
.toast-icon { color: #10b981; font-size: 1.5rem; }
.site-footer { text-align: center; padding: 30px; background: #0f172a; color: #94a3b8; margin-top: 60px; width: 100%; }
.admin-link { color: #64748b; text-decoration: none; font-size: 0.8rem; display: block; margin-top: 10px; }

/* Фото і відео */
.job-cover-img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 15px; border: 1px solid #e2e8f0; }
.rich-text-box img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.rich-text-box iframe { max-width: 100%; width: 100%; aspect-ratio: 16/9; border-radius: 8px; margin: 10px 0; border: none; }
.rich-text-box { line-height: 1.6; }
.rich-text-box p { margin-bottom: 10px; }
.rich-text-box strong { color: #0f172a; font-weight: 700; }
.rich-text-box ul, .rich-text-box ol { margin-bottom: 10px; padding-left: 20px; }
.rich-text-box li { margin-bottom: 4px; }

@media (max-width: 768px) {
    .lang-switcher { top: 10px; right: 10px; }
    .container { padding: 0 10px; }
    .layout { flex-direction: column; margin-top: 15px; }
    .sidebar { display: none; width: 100%; position: fixed; top: 0; left: 0; height: 100%; z-index: 200; border-radius: 0; overflow-y: auto; padding-bottom: 80px; }
    .sidebar.open { display: block; }
    .mobile-filter-btn { display: block; }
    .close-sidebar { display: block; }
    
    .content-controls { flex-direction: column; gap: 10px; width: 100%; margin-bottom: 15px; }
    .content-controls > div { display: flex !important; flex-direction: column !important; gap: 10px !important; width: 100% !important; }
    .search-box, .sort-box { width: 100%; max-width: 100%; box-sizing: border-box; }
    
    .jobs-grid { display: flex; flex-direction: column; width: 100%; }
    .job-card { width: 100%; margin-bottom: 15px; padding: 15px; }

    .btn-apply { position: sticky; bottom: 15px; z-index: 10; box-shadow: 0 4px 15px rgba(15, 23, 42, 0.4); border: 2px solid white; }
}
