/* CSS para Filtros Mobile */
.mobile-filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-filters-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-filters-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 400px;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-filters-container.active {
    right: 0;
}

.mobile-filters-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 20px;
    border-bottom: 1px solid #eee;
    z-index: 10001;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.mobile-filters-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-close-filters {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    border-radius: 4px;
}

.mobile-close-filters:hover {
    background: #f0f0f0;
}

.mobile-filters-content {
    padding: 20px;
    padding-bottom: 120px;
}

.mobile-filters-content .filter-block {
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.mobile-filters-content .filter-block:last-child {
    border-bottom: none;
}

.mobile-filters-content h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.mobile-form-group {
    position: relative;
    margin-bottom: 15px;
}

.mobile-filters-content input[type="text"],
.mobile-filters-content select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
}

.mobile-filters-content input[type="text"]:focus,
.mobile-filters-content select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.mobile-form-group .icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    font-size: 16px;
}

/* Mobile Switchbox */
.mobile-switchbox {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mobile-switchbox label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    background: #fff;
}

.mobile-switchbox label:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.mobile-switchbox input[type="checkbox"] {
    margin-right: 8px;
}

.mobile-switchbox input[type="checkbox"]:checked + span {
    color: #007bff;
    font-weight: 600;
}

/* Mobile Checkboxes */
.mobile-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.mobile-checkboxes label {
    display: flex;
    align-items: center;
    padding: 2px 0;
    cursor: pointer;
    font-size: 14px;
}

.mobile-checkboxes input[type="checkbox"],
.mobile-checkboxes input[type="radio"] {
    margin-right: 10px;
}

/* Mobile Salary Range */
.mobile-salary-range {
    margin: 20px 0;
}

.mobile-salary-display {
    text-align: center;
    margin: 15px 0;
    font-weight: 600;
    color: #007bff;
    font-size: 16px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* Action Buttons */
.mobile-filters-actions {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 25%;
    background: #fff;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: none; /* Esconder por padrão */
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10001;
}

.mobile-filters-container.active .mobile-filters-actions {
    display: grid; /* Mostrar apenas quando modal ativo */
}

.mobile-btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.mobile-btn-primary {
    background: #007bff;
    color: white;
}

.mobile-btn-primary:hover {
    background: #0056b3;
}

.mobile-btn-secondary {
    background: #6c757d;
    color: white;
}

.mobile-btn-secondary:hover {
    background: #545b62;
}

/* Results Preview */
.mobile-results-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 25%;
    height: 100vh;
    background: rgb(248 249 250 / 18%);
    z-index: 9998;
    display: none;
    pointer-events: none;
}

.mobile-results-preview.active {
    display: block;
}

/* Counter Badge */
.filter-counter {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: none; /* Remover o display: flex duplicado */
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 999; /* ADICIONAR z-index alto */
    border: 2px solid #fff; /* ADICIONAR borda branca para destacar */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* ADICIONAR sombra */
}

.filter-counter.active {
    display: flex;
}

/* Toggle Button Enhancement - ALTERAÇÕES */
.toggle-filters {
    position: relative;
    overflow: visible !important; /* ADICIONAR para garantir que o badge não seja cortado */
    z-index: 1; /* ADICIONAR z-index base */
}

/* Responsive Adjustments */
@media (max-width: 768px) {

    .page-title {
        position: relative;
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
        text-align: center;
        padding: 94px 0 1px;
        background: #eceef3;
    }

    .page-title h1 {
        position: relative;
        display: block;
        font-weight: 500;
        font-size: 24px;
        line-height: 25px;
        text-align: center;
        color: #202124;
        margin-bottom: 0px;
    }

    .toggle-filters {
        display: block !important;
        margin-bottom: 20px;
        margin-right: 15px; /* ADICIONAR margem direita para dar espaço ao badge */
        overflow: visible !important; /* GARANTIR que o overflow seja visível */
        padding: 8px 18px;
        color: #ffffff;
        background-color: #000000;
    }
    
    .filters-column {
        display: none;
    }
    
    .content-column {
        width: 100% !important;
        flex: none !important;
    }
    
    .mobile-filters-container {
        width: 80%;
    }
    
    .mobile-results-preview {
        width: 20%
    }
    
    .mobile-filters-actions {
        left: 20%;
    }

    select {
        word-wrap: normal;
        padding: 5px 7px;
        border-radius: 8px;
        margin-right: 5px;
    }

    .mobile-form-group {
        position: relative;
        margin-bottom: 0px;
    }

    .mobile-filters-content .filter-block {
        margin-bottom: 0px;
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 20px;
    }

    .mobile-filters-content input[type="text"], .mobile-filters-content select {
        width: 100%;
        padding: 4px 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 14px;
        background: #fff;
        box-sizing: border-box;
    }

    .mobile-switchbox label {
        display: flex;
        align-items: center;
        padding: 0px 10px;
        border: 1px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 14px;
        background: #fff;
    }

    .mobile-filters-content {
        padding: 0px 1px;
        padding-bottom: 120px;
    }

    .mobile-filters-header {
        position: sticky;
        top: 0;
        background: #000000;
        color: #ffffff!important;
        padding: 4px 20px;
        border-bottom: 1px solid #eee;
        z-index: 10001;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
}

@media only screen and (max-width: 767px) {
    .top-companies, .job-section-four, .job-section-five, .main-footer.style-five .newsletter-form, .clients-section.alternate, .testimonial-section-two, .job-section-two, .top-companies, .ads-section, .registeration-banners, .ls-section, .call-to-action-two, .candidates-section, .blog-single, .products-section, .sidebar-page-container, .contact-section, .testimonial-section, .job-section {
        padding: 16px 0;
    }
}

@media (min-width: 769px) {
    .mobile-filters-overlay,
    .mobile-filters-container,
    .mobile-results-preview {
        display: none !important;
    }
}

/* Loading Animation */
.mobile-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.mobile-loading.active {
    display: flex;
}

.mobile-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}