* {
    font-family: 'Tajawal', sans-serif;
}

body {
    background: #F9FAFB;
}

/* YouTube-style filter sidebar */
.filter-sidebar {
    width: 280px;
    background: white;
    border-left: 1px solid #E5E7EB;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.filter-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.filter-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0;
}

.close-filter-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
    transition: color 0.3s ease;
}

.close-filter-btn:hover {
    color: #1F2937;
}

/* Collapsible filter sections like YouTube */
.filter-section {
    border: none;
    border-bottom: 1px solid #E5E7EB;
    padding: 0;
    margin: 0;
    background: none;
    box-shadow: none;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-title {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.filter-title:hover {
    background-color: #F9FAFB;
}

.filter-title-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-title::before {
    content: '';
    display: none;
}

.filter-toggle-icon {
    font-size: 1rem;
    color: #6B7280;
    transition: transform 0.3s ease;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-section.collapsed .filter-toggle-icon {
    transform: rotate(-90deg);
}

.filter-content {
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
    background: #FAFBFC;
}

.filter-section.collapsed .filter-content {
    max-height: 0;
    padding: 0 1.5rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-wrapper input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #D1D5DB;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:hover {
    border-color: #FFA500;
}

.checkbox-wrapper input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    border-color: #FFA500;
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
}

.checkbox-wrapper label {
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    color: #374151;
    margin: 0;
}

.checkbox-wrapper label:hover {
    color: #1F2937;
}

.select-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
}

.select-group select {
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
    color: #374151;
}

.select-group select:hover {
    border-color: #FFA500;
}

.select-group select:focus {
    outline: none;
    border-color: #FFA500;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.1);
}

/* Action buttons in filter sidebar */
.filter-actions {
    padding: 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: sticky;
    bottom: 0;
    background: white;
}

.btn-filter {
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.625rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
    transform: translateY(-1px);
}

.btn-reset {
    background: white;
    color: #374151;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    padding: 0.625rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background: #F9FAFB;
    border-color: #FFA500;
    color: #FFA500;
}

.worker-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #E5E7EB;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.worker-card:hover {
    border-color: #FCD34D;
    box-shadow: 0 8px 20px rgba(255, 165, 0, 0.15);
    transform: translateY(-4px);
}

.worker-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFA500, #FF8C00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.25rem 0.25rem 0.25rem 0;
}

.badge-country {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-arabic {
    background: #D1FAE5;
    color: #065F46;
}

.badge-english {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-religion {
    background: #F3E8FF;
    color: #6B21A8;
}

.results-info {
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: #92400E;
}

.no-results {
    background: white;
    border-radius: 0.75rem;
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6B7280;
}

/* Mobile responsive - filter sidebar slides in from right */
@media (max-width: 768px) {
    .filter-sidebar {
        position: fixed;
        right: 0;
        top: 80px;
        width: 280px;
        z-index: 999;
        border-left: 1px solid #E5E7EB;
        border-right: none;
        transform: translateX(100%);
        transition: transform 0.3s ease-out;
        max-height: calc(100vh - 80px);
    }

    .filter-sidebar.mobile-open {
        transform: translateX(0);
    }

    .close-filter-btn {
        display: block;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 99;
        backdrop-filter: blur(2px);
    }

    .overlay.show {
        display: block;
    }

    .main-content {
        flex: 1;
    }

    .filter-sidebar {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .results-info {
        margin-bottom: 1rem;
    }

    .worker-card {
        padding: 1rem;
    }

    #workersGrid {
        gap: 1rem !important;
    }
}

/* Scrollbar styling */
.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}