{"id":518,"date":"2025-10-28T18:11:17","date_gmt":"2025-10-28T18:11:17","guid":{"rendered":"https:\/\/rsu.edu.so\/?page_id=518"},"modified":"2025-10-28T18:23:49","modified_gmt":"2025-10-28T18:23:49","slug":"research","status":"publish","type":"page","link":"https:\/\/rsu.edu.so\/index.php\/research\/","title":{"rendered":"Research"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"518\" class=\"elementor elementor-518\">\n\t\t\t\t<div class=\"elementor-element elementor-element-23775a9 e-con-full e-flex e-con e-parent\" data-id=\"23775a9\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ad61997 elementor-widget elementor-widget-html\" data-id=\"ad61997\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <title>Research Repository - Red Sea University<\/title>\r\n    <style>\r\n        * {\r\n            margin: 0;\r\n            padding: 0;\r\n            box-sizing: border-box;\r\n            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\r\n        }\r\n\r\n        :root {\r\n            --primary-color: #1a73e8;\r\n            --accent-color: #34a853;\r\n            --dark-text: #1a1a1a;\r\n            --light-bg: #f8f9fa;\r\n            --border-color: #e0e0e0;\r\n            --white: #ffffff;\r\n            --sidebar-bg: #f1f3f4;\r\n        }\r\n\r\n        body {\r\n            background-color: var(--light-bg);\r\n            color: var(--dark-text);\r\n            line-height: 1.6;\r\n        }\r\n\r\n        .container {\r\n            display: flex;\r\n            max-width: 1400px;\r\n            margin: 0 auto;\r\n            padding: 20px;\r\n            gap: 30px;\r\n        }\r\n\r\n        \/* Header *\/\r\n        .header {\r\n            background-color: var(--white);\r\n            padding: 30px 20px;\r\n            border-bottom: 3px solid var(--primary-color);\r\n            text-align: center;\r\n            margin-bottom: 30px;\r\n            box-shadow: 0 2px 5px rgba(0,0,0,0.1);\r\n        }\r\n\r\n        .header h1 {\r\n            font-size: 2.2rem;\r\n            color: var(--primary-color);\r\n            margin-bottom: 10px;\r\n        }\r\n\r\n        .header p {\r\n            font-size: 1.1rem;\r\n            color: var(--dark-text);\r\n            max-width: 800px;\r\n            margin: 0 auto;\r\n        }\r\n\r\n        \/* Sidebar *\/\r\n        .sidebar {\r\n            flex: 0 0 300px;\r\n            background-color: var(--sidebar-bg);\r\n            padding: 25px;\r\n            border-radius: 8px;\r\n            box-shadow: 0 2px 8px rgba(0,0,0,0.1);\r\n            height: fit-content;\r\n        }\r\n\r\n        .sidebar h2 {\r\n            color: var(--primary-color);\r\n            margin-bottom: 20px;\r\n            padding-bottom: 10px;\r\n            border-bottom: 2px solid var(--border-color);\r\n        }\r\n\r\n        .filter-section {\r\n            margin-bottom: 25px;\r\n        }\r\n\r\n        .filter-section h3 {\r\n            color: var(--primary-color);\r\n            margin-bottom: 12px;\r\n            font-size: 1.1rem;\r\n        }\r\n\r\n        .filter-options {\r\n            display: flex;\r\n            flex-direction: column;\r\n            gap: 10px;\r\n        }\r\n\r\n        .filter-option {\r\n            display: flex;\r\n            align-items: center;\r\n            gap: 8px;\r\n            cursor: pointer;\r\n            padding: 8px;\r\n            border-radius: 4px;\r\n            transition: background-color 0.2s;\r\n        }\r\n\r\n        .filter-option:hover {\r\n            background-color: rgba(26, 115, 232, 0.1);\r\n        }\r\n\r\n        .filter-option input {\r\n            cursor: pointer;\r\n        }\r\n\r\n        .filter-option label {\r\n            cursor: pointer;\r\n            flex: 1;\r\n        }\r\n\r\n        .count {\r\n            background-color: var(--primary-color);\r\n            color: white;\r\n            padding: 2px 8px;\r\n            border-radius: 12px;\r\n            font-size: 0.8rem;\r\n        }\r\n\r\n        \/* Content Area *\/\r\n        .content-area {\r\n            flex: 1;\r\n        }\r\n\r\n        .content-header {\r\n            display: flex;\r\n            justify-content: space-between;\r\n            align-items: center;\r\n            margin-bottom: 25px;\r\n        }\r\n\r\n        .content-header h2 {\r\n            color: var(--primary-color);\r\n            font-size: 1.8rem;\r\n        }\r\n\r\n        .search-box {\r\n            display: flex;\r\n            gap: 10px;\r\n        }\r\n\r\n        .search-box input {\r\n            padding: 10px 15px;\r\n            border: 1px solid var(--border-color);\r\n            border-radius: 4px;\r\n            width: 250px;\r\n        }\r\n\r\n        .search-box button {\r\n            background-color: var(--primary-color);\r\n            color: white;\r\n            border: none;\r\n            padding: 10px 15px;\r\n            border-radius: 4px;\r\n            cursor: pointer;\r\n            transition: background-color 0.3s;\r\n        }\r\n\r\n        .search-box button:hover {\r\n            background-color: #0d62d9;\r\n        }\r\n\r\n        \/* Research Grid *\/\r\n        .research-grid {\r\n            display: grid;\r\n            grid-template-columns: repeat(3, 1fr);\r\n            gap: 25px;\r\n        }\r\n\r\n        .research-box {\r\n            background-color: var(--white);\r\n            border-radius: 8px;\r\n            padding: 20px;\r\n            box-shadow: 0 2px 8px rgba(0,0,0,0.1);\r\n            transition: transform 0.3s, box-shadow 0.3s;\r\n            display: flex;\r\n            flex-direction: column;\r\n            height: 100%;\r\n        }\r\n\r\n        .research-box:hover {\r\n            transform: translateY(-5px);\r\n            box-shadow: 0 5px 15px rgba(0,0,0,0.1);\r\n        }\r\n\r\n        .research-title {\r\n            color: var(--primary-color);\r\n            font-size: 1.2rem;\r\n            margin-bottom: 15px;\r\n            line-height: 1.4;\r\n            flex: 1;\r\n        }\r\n\r\n        .research-meta {\r\n            display: flex;\r\n            justify-content: space-between;\r\n            margin-bottom: 15px;\r\n            font-size: 0.9rem;\r\n            color: #666;\r\n        }\r\n\r\n        .research-author {\r\n            font-weight: 500;\r\n        }\r\n\r\n        .research-date {\r\n            color: #888;\r\n        }\r\n\r\n        .research-category {\r\n            background-color: #e8f0fe;\r\n            color: var(--primary-color);\r\n            padding: 4px 8px;\r\n            border-radius: 4px;\r\n            font-size: 0.8rem;\r\n            display: inline-block;\r\n            margin-bottom: 10px;\r\n        }\r\n\r\n        .download-section {\r\n            display: flex;\r\n            justify-content: space-between;\r\n            align-items: center;\r\n            margin-top: auto;\r\n        }\r\n\r\n        .download-btn {\r\n            background-color: var(--accent-color);\r\n            color: white;\r\n            border: none;\r\n            padding: 8px 15px;\r\n            border-radius: 4px;\r\n            cursor: pointer;\r\n            transition: background-color 0.3s;\r\n            font-weight: 500;\r\n        }\r\n\r\n        .download-btn:hover {\r\n            background-color: #2d8c47;\r\n        }\r\n\r\n        .download-count {\r\n            display: flex;\r\n            align-items: center;\r\n            gap: 5px;\r\n            color: #666;\r\n            font-size: 0.9rem;\r\n        }\r\n\r\n        .download-icon {\r\n            color: var(--primary-color);\r\n        }\r\n\r\n        .no-results {\r\n            grid-column: 1 \/ -1;\r\n            text-align: center;\r\n            padding: 40px;\r\n            color: #666;\r\n            font-size: 1.1rem;\r\n        }\r\n\r\n        \/* Responsive Design *\/\r\n        @media (max-width: 1200px) {\r\n            .research-grid {\r\n                grid-template-columns: repeat(2, 1fr);\r\n            }\r\n        }\r\n\r\n        @media (max-width: 900px) {\r\n            .container {\r\n                flex-direction: column;\r\n            }\r\n            \r\n            .sidebar {\r\n                flex: 1;\r\n                width: 100%;\r\n            }\r\n        }\r\n\r\n        @media (max-width: 600px) {\r\n            .research-grid {\r\n                grid-template-columns: 1fr;\r\n            }\r\n            \r\n            .content-header {\r\n                flex-direction: column;\r\n                gap: 15px;\r\n                align-items: flex-start;\r\n            }\r\n            \r\n            .search-box {\r\n                width: 100%;\r\n            }\r\n            \r\n            .search-box input {\r\n                flex: 1;\r\n            }\r\n        }\r\n    <\/style>\r\n<\/head>\r\n<body>\r\n    <!-- Header Section -->\r\n    <div class=\"header\">\r\n        <h1>Research Repository<\/h1>\r\n        <p>Explore the latest research publications from Red Sea University<\/p>\r\n    <\/div>\r\n\r\n    <!-- Main Container -->\r\n    <div class=\"container\">\r\n        <!-- Sidebar with Filters -->\r\n        <div class=\"sidebar\">\r\n            <h2>Filters<\/h2>\r\n            \r\n            <div class=\"filter-section\">\r\n                <h3>Filter by Date<\/h3>\r\n                <div class=\"filter-options\" id=\"date-filters\">\r\n                    <!-- Will be populated by JavaScript -->\r\n                <\/div>\r\n            <\/div>\r\n            \r\n            <div class=\"filter-section\">\r\n                <h3>Filter by Author<\/h3>\r\n                <div class=\"filter-options\" id=\"author-filters\">\r\n                    <!-- Will be populated by JavaScript -->\r\n                <\/div>\r\n            <\/div>\r\n            \r\n            <div class=\"filter-section\">\r\n                <h3>Filter by Category<\/h3>\r\n                <div class=\"filter-options\" id=\"category-filters\">\r\n                    <!-- Will be populated by JavaScript -->\r\n                <\/div>\r\n            <\/div>\r\n            \r\n            <button id=\"reset-filters\" style=\"width: 100%; padding: 10px; background-color: #666; color: white; border: none; border-radius: 4px; cursor: pointer; margin-top: 10px;\">\r\n                Reset All Filters\r\n            <\/button>\r\n        <\/div>\r\n\r\n        <!-- Content Area -->\r\n        <div class=\"content-area\">\r\n            <div class=\"content-header\">\r\n                <h2>Research Publications<\/h2>\r\n                <div class=\"search-box\">\r\n                    <input type=\"text\" id=\"search-input\" placeholder=\"Search research...\">\r\n                    <button id=\"search-button\">Search<\/button>\r\n                <\/div>\r\n            <\/div>\r\n            \r\n            <div class=\"research-grid\" id=\"research-container\">\r\n                <!-- Research boxes will be populated by JavaScript -->\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <script>\r\n        \/\/ Research data\r\n        const researchData = [\r\n            {\r\n                id: 1,\r\n                title: \"Artificial Intelligence in Medical Diagnostics: A Comprehensive Review\",\r\n                author: \"Dr. Ahmed Hassan\",\r\n                date: \"2024-03-15\",\r\n                category: \"Medicine & Health\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 2,\r\n                title: \"Blockchain Technology for Secure Academic Records\",\r\n                author: \"Dr. Fatima Ali\",\r\n                date: \"2024-02-28\",\r\n                category: \"Technology\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 3,\r\n                title: \"Comparative Analysis of Sharia and Conventional Banking Systems\",\r\n                author: \"Prof. Mohamed Omar\",\r\n                date: \"2024-01-10\",\r\n                category: \"Law & Sharia\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 4,\r\n                title: \"Impact of Climate Change on Coastal Communities in Somalia\",\r\n                author: \"Dr. Samia Abdi\",\r\n                date: \"2023-12-05\",\r\n                category: \"Environmental Science\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 5,\r\n                title: \"Machine Learning Algorithms for Early Disease Detection\",\r\n                author: \"Dr. Ahmed Hassan\",\r\n                date: \"2023-11-20\",\r\n                category: \"Medicine & Health\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 6,\r\n                title: \"Digital Transformation in Higher Education: Challenges and Opportunities\",\r\n                author: \"Dr. Khalid Ibrahim\",\r\n                date: \"2023-10-15\",\r\n                category: \"Education\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 7,\r\n                title: \"Islamic Finance and Economic Development in East Africa\",\r\n                author: \"Prof. Mohamed Omar\",\r\n                date: \"2023-09-08\",\r\n                category: \"Law & Sharia\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 8,\r\n                title: \"Renewable Energy Solutions for Rural Somalia\",\r\n                author: \"Dr. Fatima Ali\",\r\n                date: \"2022-08-22\",\r\n                category: \"Technology\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 9,\r\n                title: \"Modern Teaching Methodologies in Islamic Education\",\r\n                author: \"Dr. Samia Abdi\",\r\n                date: \"2022-07-10\",\r\n                category: \"Education\",\r\n                downloads: 0\r\n            },\r\n            {\r\n                id: 10,\r\n                title: \"Telemedicine Implementation in Remote Areas: A Case Study\",\r\n                author: \"Dr. Ahmed Hassan\",\r\n                date: \"2022-06-05\",\r\n                category: \"Medicine & Health\",\r\n                downloads: 0\r\n            }\r\n        ];\r\n\r\n        \/\/ State for current filters\r\n        let currentFilters = {\r\n            date: 'all',\r\n            author: 'all',\r\n            category: 'all',\r\n            search: ''\r\n        };\r\n\r\n        \/\/ Initialize the application\r\n        document.addEventListener('DOMContentLoaded', function() {\r\n            \/\/ Load download counts from localStorage\r\n            loadDownloadCounts();\r\n            \r\n            \/\/ Initialize filters\r\n            initializeFilters();\r\n            \r\n            \/\/ Render research items\r\n            renderResearchItems();\r\n            \r\n            \/\/ Set up event listeners\r\n            setupEventListeners();\r\n        });\r\n\r\n        \/\/ Load download counts from localStorage\r\n        function loadDownloadCounts() {\r\n            researchData.forEach(research => {\r\n                const savedCount = localStorage.getItem(`download-count-${research.id}`);\r\n                if (savedCount !== null) {\r\n                    research.downloads = parseInt(savedCount);\r\n                }\r\n            });\r\n        }\r\n\r\n        \/\/ Initialize filter options\r\n        function initializeFilters() {\r\n            \/\/ Extract unique values for filters\r\n            const dates = [...new Set(researchData.map(item => item.date.substring(0, 4)))].sort().reverse();\r\n            const authors = [...new Set(researchData.map(item => item.author))].sort();\r\n            const categories = [...new Set(researchData.map(item => item.category))].sort();\r\n            \r\n            \/\/ Create date filters\r\n            const dateFiltersContainer = document.getElementById('date-filters');\r\n            dateFiltersContainer.innerHTML = '';\r\n            \r\n            \/\/ Add \"All Dates\" option\r\n            const allDatesOption = createFilterOption('date', 'all', 'All Dates', researchData.length);\r\n            dateFiltersContainer.appendChild(allDatesOption);\r\n            \r\n            \/\/ Add year options\r\n            dates.forEach(year => {\r\n                const count = researchData.filter(item => item.date.startsWith(year)).length;\r\n                const option = createFilterOption('date', year, year, count);\r\n                dateFiltersContainer.appendChild(option);\r\n            });\r\n            \r\n            \/\/ Create author filters\r\n            const authorFiltersContainer = document.getElementById('author-filters');\r\n            authorFiltersContainer.innerHTML = '';\r\n            \r\n            \/\/ Add \"All Authors\" option\r\n            const allAuthorsOption = createFilterOption('author', 'all', 'All Authors', researchData.length);\r\n            authorFiltersContainer.appendChild(allAuthorsOption);\r\n            \r\n            \/\/ Add author options\r\n            authors.forEach(author => {\r\n                const count = researchData.filter(item => item.author === author).length;\r\n                const option = createFilterOption('author', author, author, count);\r\n                authorFiltersContainer.appendChild(option);\r\n            });\r\n            \r\n            \/\/ Create category filters\r\n            const categoryFiltersContainer = document.getElementById('category-filters');\r\n            categoryFiltersContainer.innerHTML = '';\r\n            \r\n            \/\/ Add \"All Categories\" option\r\n            const allCategoriesOption = createFilterOption('category', 'all', 'All Categories', researchData.length);\r\n            categoryFiltersContainer.appendChild(allCategoriesOption);\r\n            \r\n            \/\/ Add category options\r\n            categories.forEach(category => {\r\n                const count = researchData.filter(item => item.category === category).length;\r\n                const option = createFilterOption('category', category, category, count);\r\n                categoryFiltersContainer.appendChild(option);\r\n            });\r\n        }\r\n\r\n        \/\/ Create a filter option element\r\n        function createFilterOption(type, value, label, count) {\r\n            const option = document.createElement('div');\r\n            option.className = 'filter-option';\r\n            \r\n            const input = document.createElement('input');\r\n            input.type = 'radio';\r\n            input.name = `${type}-filter`;\r\n            input.id = `${type}-${value.replace(\/\\s+\/g, '-').toLowerCase()}`;\r\n            input.value = value;\r\n            input.checked = value === 'all';\r\n            \r\n            input.addEventListener('change', function() {\r\n                currentFilters[type] = this.value;\r\n                renderResearchItems();\r\n            });\r\n            \r\n            const labelEl = document.createElement('label');\r\n            labelEl.htmlFor = input.id;\r\n            labelEl.textContent = label;\r\n            \r\n            const countEl = document.createElement('span');\r\n            countEl.className = 'count';\r\n            countEl.textContent = count;\r\n            \r\n            option.appendChild(input);\r\n            option.appendChild(labelEl);\r\n            option.appendChild(countEl);\r\n            \r\n            return option;\r\n        }\r\n\r\n        \/\/ Set up event listeners\r\n        function setupEventListeners() {\r\n            \/\/ Search functionality\r\n            const searchInput = document.getElementById('search-input');\r\n            const searchButton = document.getElementById('search-button');\r\n            \r\n            searchButton.addEventListener('click', performSearch);\r\n            searchInput.addEventListener('keyup', function(event) {\r\n                if (event.key === 'Enter') {\r\n                    performSearch();\r\n                }\r\n            });\r\n            \r\n            \/\/ Reset filters button\r\n            document.getElementById('reset-filters').addEventListener('click', resetFilters);\r\n        }\r\n\r\n        \/\/ Perform search\r\n        function performSearch() {\r\n            const searchInput = document.getElementById('search-input');\r\n            currentFilters.search = searchInput.value.toLowerCase();\r\n            renderResearchItems();\r\n        }\r\n\r\n        \/\/ Reset all filters\r\n        function resetFilters() {\r\n            currentFilters = {\r\n                date: 'all',\r\n                author: 'all',\r\n                category: 'all',\r\n                search: ''\r\n            };\r\n            \r\n            \/\/ Reset radio buttons\r\n            document.querySelectorAll('.filter-option input').forEach(input => {\r\n                if (input.value === 'all') {\r\n                    input.checked = true;\r\n                }\r\n            });\r\n            \r\n            \/\/ Clear search\r\n            document.getElementById('search-input').value = '';\r\n            \r\n            \/\/ Re-render\r\n            renderResearchItems();\r\n        }\r\n\r\n        \/\/ Render research items based on current filters\r\n        function renderResearchItems() {\r\n            const container = document.getElementById('research-container');\r\n            container.innerHTML = '';\r\n            \r\n            \/\/ Filter research data\r\n            const filteredResearch = researchData.filter(research => {\r\n                \/\/ Date filter\r\n                if (currentFilters.date !== 'all' && !research.date.startsWith(currentFilters.date)) {\r\n                    return false;\r\n                }\r\n                \r\n                \/\/ Author filter\r\n                if (currentFilters.author !== 'all' && research.author !== currentFilters.author) {\r\n                    return false;\r\n                }\r\n                \r\n                \/\/ Category filter\r\n                if (currentFilters.category !== 'all' && research.category !== currentFilters.category) {\r\n                    return false;\r\n                }\r\n                \r\n                \/\/ Search filter\r\n                if (currentFilters.search) {\r\n                    const searchTerm = currentFilters.search;\r\n                    const searchableText = `${research.title} ${research.author} ${research.category}`.toLowerCase();\r\n                    if (!searchableText.includes(searchTerm)) {\r\n                        return false;\r\n                    }\r\n                }\r\n                \r\n                return true;\r\n            });\r\n            \r\n            \/\/ Display results or no results message\r\n            if (filteredResearch.length === 0) {\r\n                const noResults = document.createElement('div');\r\n                noResults.className = 'no-results';\r\n                noResults.textContent = 'No research papers found matching your criteria.';\r\n                container.appendChild(noResults);\r\n            } else {\r\n                \/\/ Create research boxes\r\n                filteredResearch.forEach(research => {\r\n                    const researchBox = createResearchBox(research);\r\n                    container.appendChild(researchBox);\r\n                });\r\n            }\r\n            \r\n            \/\/ Update filter counts\r\n            updateFilterCounts();\r\n        }\r\n\r\n        \/\/ Create a research box element\r\n        function createResearchBox(research) {\r\n            const box = document.createElement('div');\r\n            box.className = 'research-box';\r\n            \r\n            \/\/ Format date for display\r\n            const displayDate = new Date(research.date).toLocaleDateString('en-US', {\r\n                year: 'numeric',\r\n                month: 'long',\r\n                day: 'numeric'\r\n            });\r\n            \r\n            box.innerHTML = `\r\n                <span class=\"research-category\">${research.category}<\/span>\r\n                <h3 class=\"research-title\">${research.title}<\/h3>\r\n                <div class=\"research-meta\">\r\n                    <span class=\"research-author\">${research.author}<\/span>\r\n                    <span class=\"research-date\">${displayDate}<\/span>\r\n                <\/div>\r\n                <div class=\"download-section\">\r\n                    <button class=\"download-btn\" data-id=\"${research.id}\">Download PDF<\/button>\r\n                    <div class=\"download-count\">\r\n                        <span class=\"download-icon\">\u2b07\ufe0f<\/span>\r\n                        <span id=\"count-${research.id}\">${research.downloads}<\/span> downloads\r\n                    <\/div>\r\n                <\/div>\r\n            `;\r\n            \r\n            \/\/ Add download event listener\r\n            const downloadBtn = box.querySelector('.download-btn');\r\n            downloadBtn.addEventListener('click', function() {\r\n                handleDownload(research.id);\r\n            });\r\n            \r\n            return box;\r\n        }\r\n\r\n        \/\/ Handle download\r\n        function handleDownload(researchId) {\r\n            \/\/ Find the research item\r\n            const research = researchData.find(item => item.id === researchId);\r\n            if (!research) return;\r\n            \r\n            \/\/ Increment download count\r\n            research.downloads++;\r\n            \r\n            \/\/ Save to localStorage\r\n            localStorage.setItem(`download-count-${researchId}`, research.downloads);\r\n            \r\n            \/\/ Update display\r\n            const countElement = document.getElementById(`count-${researchId}`);\r\n            if (countElement) {\r\n                countElement.textContent = research.downloads;\r\n            }\r\n            \r\n            \/\/ Simulate download (in a real application, this would trigger actual file download)\r\n            alert(`Downloading: \"${research.title}\"\\n\\nIn a real application, this would download the PDF file.`);\r\n            \r\n            \/\/ Update filter counts\r\n            updateFilterCounts();\r\n        }\r\n\r\n        \/\/ Update filter counts based on current filters\r\n        function updateFilterCounts() {\r\n            \/\/ Extract unique values for filters\r\n            const dates = [...new Set(researchData.map(item => item.date.substring(0, 4)))].sort().reverse();\r\n            const authors = [...new Set(researchData.map(item => item.author))].sort();\r\n            const categories = [...new Set(researchData.map(item => item.category))].sort();\r\n            \r\n            \/\/ Get filtered research based on current filters (excluding search for count purposes)\r\n            const filteredResearch = researchData.filter(research => {\r\n                if (currentFilters.date !== 'all' && !research.date.startsWith(currentFilters.date)) {\r\n                    return false;\r\n                }\r\n                if (currentFilters.author !== 'all' && research.author !== currentFilters.author) {\r\n                    return false;\r\n                }\r\n                if (currentFilters.category !== 'all' && research.category !== currentFilters.category) {\r\n                    return false;\r\n                }\r\n                return true;\r\n            });\r\n            \r\n            \/\/ Update \"All\" counts\r\n            document.querySelectorAll('.filter-option .count').forEach(countEl => {\r\n                const input = countEl.parentElement.querySelector('input');\r\n                if (input.value === 'all') {\r\n                    countEl.textContent = filteredResearch.length;\r\n                }\r\n            });\r\n            \r\n            \/\/ Update date filter counts\r\n            dates.forEach(year => {\r\n                const count = filteredResearch.filter(item => item.date.startsWith(year)).length;\r\n                const countEl = document.querySelector(`#date-${year} ~ .count`);\r\n                if (countEl) {\r\n                    countEl.textContent = count;\r\n                }\r\n            });\r\n            \r\n            \/\/ Update author filter counts\r\n            authors.forEach(author => {\r\n                const count = filteredResearch.filter(item => item.author === author).length;\r\n                const countEl = document.querySelector(`#author-${author.replace(\/\\s+\/g, '-').toLowerCase()} ~ .count`);\r\n                if (countEl) {\r\n                    countEl.textContent = count;\r\n                }\r\n            });\r\n            \r\n            \/\/ Update category filter counts\r\n            categories.forEach(category => {\r\n                const count = filteredResearch.filter(item => item.category === category).length;\r\n                const countEl = document.querySelector(`#category-${category.replace(\/\\s+\/g, '-').toLowerCase()} ~ .count`);\r\n                if (countEl) {\r\n                    countEl.textContent = count;\r\n                }\r\n            });\r\n        }\r\n    <\/script>\r\n<\/body>\r\n<\/html>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Research Repository &#8211; Red Sea University Research Repository Explore the latest research publications from Red Sea University Filters Filter by Date Filter by Author Filter by Category Reset All Filters Research Publications Search<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-518","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/pages\/518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/comments?post=518"}],"version-history":[{"count":7,"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/pages\/518\/revisions"}],"predecessor-version":[{"id":525,"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/pages\/518\/revisions\/525"}],"wp:attachment":[{"href":"https:\/\/rsu.edu.so\/index.php\/wp-json\/wp\/v2\/media?parent=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}