/* ==========================================================================
   Freelans Core - Jobs Board (Navy & Teal)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@500;600;700&display=swap');

.fc-jobs-board-wrapper * { box-sizing: border-box !important; font-family: 'Inter', sans-serif !important; }

.freelans-fullwidth-section { position: relative; z-index: 1; padding: 60px 0 100px 0 !important; display: flex; justify-content: center; background-color: transparent !important; }
.freelans-fullwidth-section::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100vw; height: 100%; background-color: #F0F9FF !important; border-bottom: 1px solid #E0F2FE; z-index: -1; }

.fc-jobs-board-wrapper {
    width: 100% !important; max-width: 1200px !important;
    display: flex !important; gap: 30px !important; align-items: flex-start !important;
    animation: fcPremiumEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes fcPremiumEntrance { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   Хоризонтална Търсачка (Hero Search)
   ========================================================================== */
.fc-hero-search-bar {
    width: 100% !important;
    background: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    border-bottom: 4px solid #0B2447 !important;
    padding: 15px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 20px 40px -10px rgba(11, 36, 71, 0.08) !important;
    animation: fcPremiumEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.fc-hero-search-form {
    display: flex !important;
    gap: 15px !important;
    align-items: stretch !important;
}

.fc-search-input-group {
    flex: 0 0 55% !important; /* 55% от ширината за полето за търсене */
    position: relative !important;
}

.fc-search-select-group {
    flex: 1 !important;
}

.fc-search-btn {
    flex: 0 0 15% !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-family: 'Poppins', sans-serif !important;
    background-color: #0B2447 !important;
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.fc-search-btn:hover {
    background-color: #0D9488 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px -3px rgba(13, 148, 136, 0.3) !important;
}

.fc-search-icon {
    position: absolute !important;
    top: 50% !important;
    left: 20px !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
    opacity: 0.4 !important;
    pointer-events: none !important;
}

.fc-hero-search-form input[type="text"] {
    width: 100% !important;
    height: 100% !important;
    background: #F8FAFC !important;
    border: 1px solid #CBD5E1 !important;
    padding: 16px 20px 16px 55px !important;
    font-size: 15px !important;
    color: #0B2447 !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    border-radius: 0 !important;
}

.fc-hero-search-form input[type="text"]:focus {
    background: #FFFFFF !important;
    border-color: #0D9488 !important;
    box-shadow: 0 5px 15px rgba(13, 148, 136, 0.1) !important;
}

.fc-hero-search-form .fc-premium-select {
    padding: 16px 40px 16px 20px !important;
    height: 100% !important;
    border: 1px solid #CBD5E1 !important;
    font-size: 15px !important;
}

/* ==========================================================================
   ЛЯВА КОЛОНА (Филтри - Sticky)
   ========================================================================== */
.fc-jobs-sidebar { 
    width: 280px !important; flex-shrink: 0 !important; 
    position: sticky !important; top: 40px !important; /* Прави менюто лепкаво */
    max-height: calc(100vh - 80px) !important; overflow-y: auto !important;
}
/* Скриване на грозния скролбар в сайдбара */
.fc-jobs-sidebar::-webkit-scrollbar { width: 4px; }
.fc-jobs-sidebar::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

.fc-filter-box { background: #FFFFFF !important; padding: 25px !important; border: 1px solid #E5E7EB !important; border-top: 4px solid #0B2447 !important; box-shadow: 0 10px 30px -10px rgba(11, 36, 71, 0.05) !important; }

.fc-filter-header { display: flex !important; justify-content: space-between !important; align-items: center !important; margin-bottom: 20px !important; border-bottom: 1px solid #F1F5F9 !important; padding-bottom: 15px !important; }
.fc-filter-header h3 { font-family: 'Poppins', sans-serif !important; font-size: 16px !important; font-weight: 600 !important; color: #0B2447 !important; margin: 0 !important; text-transform: uppercase !important; }
.fc-clear-filters { font-size: 12px !important; color: #DC2626 !important; text-decoration: none !important; font-weight: 600 !important; }
.fc-clear-filters:hover { text-decoration: underline !important; }

.fc-filter-divider { border: 0 !important; border-top: 1px solid #E2E8F0 !important; margin: 25px 0 !important; }

.fc-filter-group { margin-bottom: 20px !important; }
.fc-filter-group label:first-child { display: block !important; font-family: 'Poppins', sans-serif !important; font-size: 13px !important; font-weight: 600 !important; color: #0B2447 !important; margin-bottom: 10px !important; }

/* Инпути и Селекти във филтрите */
.fc-filter-box input[type="text"], .fc-premium-select {
    width: 100% !important; background-color: #F8FAFC !important; border: 1px solid #CBD5E1 !important; border-radius: 0 !important; color: #0B2447 !important; font-size: 13px !important; padding: 12px 15px !important; transition: all 0.3s ease !important; appearance: none !important;
}
.fc-premium-select { background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230D9488%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E') !important; background-repeat: no-repeat !important; background-position: right 12px top 50% !important; background-size: 10px auto !important; padding-right: 35px !important; }
.fc-filter-box input[type="text"]:focus, .fc-premium-select:focus { background-color: #FFFFFF !important; border-color: #0D9488 !important; outline: none !important; }

/* Радио Бутони */
.fc-custom-radio { display: flex !important; align-items: flex-start !important; cursor: pointer !important; position: relative !important; margin-bottom: 8px !important; }
.fc-custom-radio input[type="radio"] { position: absolute !important; opacity: 0 !important; width: 0 !important; height: 0 !important; }
.fc-radio-mark { width: 16px !important; height: 16px !important; background-color: #FFFFFF !important; border: 2px solid #CBD5E1 !important; display: flex !important; align-items: center !important; justify-content: center !important; flex-shrink: 0 !important; transition: all 0.2s ease !important; margin-right: 10px !important; margin-top: 2px !important; border-radius: 50% !important; }
.fc-custom-radio:hover .fc-radio-mark { border-color: #0D9488 !important; }
.fc-custom-radio input:checked + .fc-radio-mark { border-color: #0D9488 !important; }
.fc-radio-mark::after { content: "" !important; width: 6px !important; height: 6px !important; background: #0D9488 !important; display: block !important; transform: scale(0) !important; transition: all 0.2s ease !important; border-radius: 50% !important; }
.fc-custom-radio input:checked + .fc-radio-mark::after { transform: scale(1) !important; }
.fc-radio-text { font-size: 13px !important; color: #475569 !important; }
.fc-custom-radio input:checked ~ .fc-radio-text { color: #0B2447 !important; font-weight: 600 !important; }

/* Бутон Търси */
.fc-btn-primary { font-family: 'Poppins', sans-serif !important; background-color: #0B2447 !important; color: #FFFFFF !important; border: none !important; font-size: 13px !important; font-weight: 600 !important; text-transform: uppercase !important; letter-spacing: 1px !important; cursor: pointer !important; transition: all 0.3s ease !important; }
.fc-btn-primary:hover { background-color: #0D9488 !important; transform: translateY(-2px) !important; box-shadow: 0 5px 15px -3px rgba(13, 148, 136, 0.3) !important; }

/* ==========================================================================
   ДЯСНА КОЛОНА (Обяви)
   ========================================================================== */
.fc-jobs-main { flex: 1 !important; display: flex !important; flex-direction: column !important; gap: 20px !important; }
.fc-jobs-header h2 { font-family: 'Poppins', sans-serif !important; font-size: 20px !important; font-weight: 600 !important; color: #0B2447 !important; margin: 0 0 10px 0 !important; }

.fc-jobs-list { display: flex !important; flex-direction: column !important; gap: 20px !important; }

/* Карти */
.fc-job-card { background: #FFFFFF !important; border: 1px solid #E5E7EB !important; padding: 25px 30px !important; transition: all 0.3s ease !important; border-left: 4px solid transparent !important; }
.fc-job-card:hover { border-left-color: #0D9488 !important; box-shadow: 0 15px 30px -10px rgba(11, 36, 71, 0.1) !important; transform: translateX(2px) !important; }

.fc-job-card-header { display: flex !important; justify-content: space-between !important; align-items: flex-start !important; margin-bottom: 15px !important; }

.fc-job-cat-badge { display: inline-block !important; font-size: 11px !important; font-weight: 600 !important; text-transform: uppercase !important; color: #64748B !important; margin-bottom: 8px !important; letter-spacing: 0.5px !important; }
.fc-job-title { margin: 0 !important; font-family: 'Poppins', sans-serif !important; font-size: 18px !important; font-weight: 600 !important; line-height: 1.3 !important; }
.fc-job-title a { color: #0B2447 !important; text-decoration: none !important; transition: color 0.2s ease !important; }
.fc-job-title a:hover { color: #0D9488 !important; }

.fc-job-budget { text-align: right !important; flex-shrink: 0 !important; margin-left: 20px !important; }
.fc-job-budget strong { display: block !important; font-family: 'Poppins', sans-serif !important; font-size: 18px !important; font-weight: 700 !important; color: #0B2447 !important; }
.fc-job-budget span { font-size: 11px !important; color: #64748B !important; text-transform: uppercase !important; font-weight: 600 !important; }

/* Мета данни */
.fc-job-meta { display: flex !important; flex-wrap: wrap !important; gap: 20px !important; margin-bottom: 15px !important; padding-bottom: 15px !important; border-bottom: 1px solid #F1F5F9 !important; }
.fc-meta-item { display: flex !important; align-items: center !important; font-size: 12px !important; color: #64748B !important; font-weight: 500 !important; }
.fc-meta-item img { width: 14px !important; height: 14px !important; margin-right: 6px !important; opacity: 0.5 !important; }

.fc-job-excerpt { font-size: 14px !important; color: #475569 !important; line-height: 1.6 !important; margin-bottom: 20px !important; }

/* Тагове */
.fc-job-skills { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
.fc-skill-tag { display: inline-block !important; padding: 5px 10px !important; background-color: #F0F9FF !important; color: #0D9488 !important; font-size: 11px !important; font-weight: 600 !important; border-radius: 4px !important; text-transform: uppercase !important; }

@media (max-width: 992px) {
    .fc-hero-search-form { flex-direction: column !important; }
    .fc-search-input-group, .fc-search-select-group, .fc-search-btn { flex: auto !important; width: 100% !important; }
    .fc-hero-search-form input[type="text"], .fc-hero-search-form .fc-premium-select { padding: 16px 20px !important; height: 52px !important;}
    .fc-hero-search-form input[type="text"] { padding-left: 55px !important; }
    
    .fc-jobs-board-wrapper { flex-direction: column !important; padding: 0 20px !important; }
    .fc-jobs-sidebar { width: 100% !important; position: static !important; max-height: none !important; }
    .fc-job-card-header { flex-direction: column !important; gap: 10px !important; }
    .fc-job-budget { text-align: left !important; margin-left: 0 !important; }
}

/* ==========================================================================
   Къстъм Мулти-Селект (Custom JS Dropdown + Search)
   ========================================================================== */
.fc-custom-multi-select {
    position: relative !important;
    height: 100% !important;
}

.fc-select-header {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    padding: 16px 20px !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    font-size: 15px !important;
    color: #0B2447 !important;
    transition: all 0.3s ease !important;
    user-select: none !important;
}

.fc-select-header:hover { border-color: #0D9488 !important; }
.fc-select-header.active { border-color: #0D9488 !important; box-shadow: 0 5px 15px rgba(13, 148, 136, 0.1) !important; }

.fc-select-arrow {
    width: 10px !important;
    height: 10px !important;
    border-right: 2px solid #0B2447 !important;
    border-bottom: 2px solid #0B2447 !important;
    transform: rotate(45deg) translateY(-2px) !important;
    transition: transform 0.3s ease !important;
}
.fc-select-header.active .fc-select-arrow { transform: rotate(-135deg) translateY(-2px) !important; }

/* Разширено падащо меню */
.fc-select-dropdown {
    position: absolute !important;
    top: calc(100% + 5px) !important;
    left: 0 !important;
    min-width: 320px !important; /* Правим го по-широко за дълги имена */
    width: 100% !important;
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    box-shadow: 0 15px 30px rgba(11, 36, 71, 0.1) !important;
    z-index: 100 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(10px) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
}

.fc-select-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Вътрешна търсачка */
.fc-dropdown-search-wrapper {
    padding: 12px !important;
    border-bottom: 1px solid #E5E7EB !important;
    background: #F8FAFC !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
}

.fc-dropdown-search-wrapper input {
    width: 100% !important;
    padding: 10px 15px !important;
    border: 1px solid #CBD5E1 !important;
    font-size: 13px !important;
    border-radius: 0 !important;
    outline: none !important;
    background-color: #FFFFFF !important;
    color: #0B2447 !important;
    transition: border-color 0.3s ease !important;
}

.fc-dropdown-search-wrapper input:focus { border-color: #0D9488 !important; }

/* Списък с категории (Scrollable) */
.fc-dropdown-list {
    max-height: 280px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.fc-dropdown-list::-webkit-scrollbar { width: 6px; }
.fc-dropdown-list::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

/* Фикс за счупения изглед на чекбоксовете */
.fc-dropdown-option {
    display: flex !important;
    align-items: flex-start !important;
    padding: 12px 20px !important;
    margin: 0 !important;
    border-bottom: 1px solid #F1F5F9 !important;
    transition: background-color 0.2s ease !important;
    width: 100% !important;
    cursor: pointer !important;
}

.fc-dropdown-option:last-child { border-bottom: none !important; }
.fc-dropdown-option:hover { background-color: #F8FAFC !important; }

.fc-dropdown-option .fc-check-mark {
    margin-right: 12px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important; /* Пречи на кутийката да се смачка */
}

.fc-dropdown-option .fc-check-text {
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #475569 !important;
    word-break: break-word !important; /* Предпазва от излизане на текста */
}
.fc-dropdown-option input:checked ~ .fc-check-text {
    color: #0B2447 !important;
    font-weight: 600 !important;
}

/* Скролбар за менюто */
.fc-select-dropdown::-webkit-scrollbar { width: 6px; }
.fc-select-dropdown::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

.fc-dropdown-option {
    padding: 12px 20px !important;
    margin: 0 !important;
    border-bottom: 1px solid #F1F5F9 !important;
    transition: background-color 0.2s ease !important;
    width: 100% !important;
}
.fc-dropdown-option:last-child { border-bottom: none !important; }
.fc-dropdown-option:hover { background-color: #F8FAFC !important; }

/* Фикс за дълги думи без интервали, които чупят дизайна */
.fc-job-title, 
.fc-job-title a,
.fc-project-desc, 
.fc-dpc-cover-letter {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: pre-wrap !important;
}

/* За excerpt-а премахваме pre-wrap, за да не чете празни места от кода */
.fc-job-excerpt {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* Фикс за изрязания текст в падащите менюта */
.fc-premium-select {
    height: auto !important;
    line-height: 1.5 !important;
}

/* ==========================================================================
   ГЛОБАЛЕН ФИКС ЗА БУТОНИТЕ, ЧЕКБОКСОВЕТЕ И Z-INDEX
   ========================================================================== */

/* 1. Фикс за смачканите бутони */
.fc-btn-primary {
    padding: 14px 28px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.4 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

/* 2. Гарантиране, че списъкът стои плътно в една колона */
.fc-dropdown-list {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}
.fc-dropdown-option {
    width: 100% !important;
}

/* 3. Фикс за Z-INDEX (Да не пробиват аватари и карти през менюто) */
.fc-talent-card, .fc-job-card, .fc-service-card {
    position: relative !important;
    z-index: 1 !important; /* Държи ги под падащото меню (което е z-index: 100) */
}

.fc-talent-avatar {
    z-index: 1 !important; /* Гарантира, че снимката не излиза отгоре */
}

/* 4. Фикс за счупените ЧЕКБОКСОВЕ (Само за квадратните) */
.fc-custom-checkbox { 
    display: flex !important; 
    align-items: flex-start !important; 
    cursor: pointer !important; 
    position: relative !important; 
    margin-bottom: 0 !important; 
}
.fc-custom-checkbox input[type="checkbox"] { 
    position: absolute !important; 
    opacity: 0 !important; 
    width: 0 !important; 
    height: 0 !important; 
}
.fc-custom-checkbox .fc-check-mark { 
    width: 18px !important; 
    height: 18px !important; 
    background-color: #FFFFFF !important; 
    border: 2px solid #CBD5E1 !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    flex-shrink: 0 !important; 
    transition: all 0.2s ease !important; 
    margin-right: 12px !important; 
    margin-top: 1px !important; 
    border-radius: 3px !important; 
}
.fc-custom-checkbox:hover .fc-check-mark { border-color: #0D9488 !important; }
.fc-custom-checkbox input:checked + .fc-check-mark { 
    border-color: #0D9488 !important; 
    background-color: #0D9488 !important;
}
.fc-custom-checkbox .fc-check-mark::after { 
    content: "" !important; 
    width: 4px !important; 
    height: 9px !important; 
    border: solid #FFFFFF !important; 
    border-width: 0 2px 2px 0 !important; 
    transform: rotate(45deg) scale(0) !important; 
    display: block !important; 
    opacity: 0 !important; 
    transition: all 0.2s ease !important; 
    margin-bottom: 2px !important;
}
.fc-custom-checkbox input:checked + .fc-check-mark::after { 
    transform: rotate(45deg) scale(1) !important; 
    opacity: 1 !important; 
}

/* 5. Връщане на РАДИО БУТОНИТЕ в сайдбара (Кръглите) */
.fc-custom-radio { 
    display: flex !important; 
    align-items: flex-start !important; 
    cursor: pointer !important; 
    position: relative !important; 
    margin-bottom: 8px !important; 
}
.fc-custom-radio input[type="radio"] { 
    position: absolute !important; 
    opacity: 0 !important; 
    width: 0 !important; 
    height: 0 !important; 
}
.fc-custom-radio .fc-radio-mark { 
    width: 16px !important; 
    height: 16px !important; 
    background-color: #FFFFFF !important; 
    border: 2px solid #CBD5E1 !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    flex-shrink: 0 !important; 
    transition: all 0.2s ease !important; 
    margin-right: 10px !important; 
    margin-top: 2px !important; 
    border-radius: 50% !important; 
}
.fc-custom-radio:hover .fc-radio-mark { border-color: #0D9488 !important; }
.fc-custom-radio input:checked + .fc-radio-mark { border-color: #0D9488 !important; }
.fc-custom-radio .fc-radio-mark::after { 
    content: "" !important; 
    width: 6px !important; 
    height: 6px !important; 
    background: #0D9488 !important; 
    display: block !important; 
    transform: scale(0) !important; 
    transition: all 0.2s ease !important; 
    border-radius: 50% !important; 
}
.fc-custom-radio input:checked + .fc-radio-mark::after { transform: scale(1) !important; }

.badge-service { background: #F0FDFA !important; color: #0D9488 !important; border: 1px solid #CCFBF1 !important; }
.badge-project { background: #F1F5F9 !important; color: #475569 !important; border: 1px solid #E2E8F0 !important; }

/* Табове за Борсата */
.fc-type-tabs { display: flex; gap: 12px; margin-bottom: 25px; flex-wrap: wrap; }
.fc-type-tab { padding: 10px 22px; background: #fff; border: 1px solid #E2E8F0; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; color: #475569; transition: all 0.2s ease; font-family: 'Poppins', sans-serif; }
.fc-type-tab:hover { border-color: #0D9488; color: #0D9488; }
.fc-type-tab.active { background: #0B2447; color: #fff; border-color: #0B2447; box-shadow: 0 4px 12px rgba(11, 36, 71, 0.15); }
.badge-job-offer { background: #EEF2FF !important; color: #4338CA !important; border: 1px solid #C7D2FE !important; }
.badge-service { background: #F0FDFA !important; color: #0D9488 !important; border: 1px solid #CCFBF1 !important; }
.badge-project { background: #F1F5F9 !important; color: #475569 !important; border: 1px solid #E2E8F0 !important; }